Sunday, February 14, 2010

Restore root and var solaris 9

Restore root and var

1. check which jumpstart for the server, verify by the subnet mask
2. boot at jumpstart server in single mode

Ok boot net -s

3. If fail to boot net with the correct jump start server, access the jumpstart server and execute command do_add_install
If the server build as Solaris 10:-

# cd /export/jump/Solaris_10
# ./do_add_install server

Boot param will be restarted.

4. Go back to OK prompt at server and do boot net in single mode

Ok boot net -s

5. Successfull booted in jumpstart server. Mount the disk that going to be restored to /tmp/rootdsk & /tmp/vardsk ( just name convention, do name it up to your imagination )

# mount /dev/dsk/c0t0d0s0 /tmp/rootdsk
# mount /dev/dsk/c0t0d0s5 /tmp/vardsk

To make the NFS available and allow bkp server to mount the rootdsk and vardsk, /etc/dfs should in read write mode.

# mount /dev/dsk/c1t1d0s0 /tmp/tmpdfs
# mount -F lofs /tmp/tmpdfs/etc/dfs /etc/dfs
# ls -al /etc/dfs
total 21
drwxr-xr-x 2 root sys 512 Oct 16 2008 .
drwxr-xr-x 90 root sys 6656 Feb 14 06:03 ..
-rw-r--r-- 1 root sys 434 Oct 16 2008 dfstab
-rw-r--r-- 1 root root 68 Jul 13 2007 fstypes
-r--r--r-- 1 root root 29 Feb 14 06:03 sharetab
#

Make sure the mounted /etc/dfs has file dfstab & fstypes as per requirement NFS to start. fstypes contains of NFS utilities.

Edit /etc/dfs/dfstab;

share -F nfs -o rw,anon=0 /tmp/rootdsk
share -F nfs -o rw,anon=0 /tmp/vardsk

Start the process, rpc, nfs.client & nfs.server

# cd /etc/init.d
# ./rpc start
# ./nfs.client start
# ./nfs.server start
# shareall

To verify the filesystem has been exported.

# showmount -e
bash-2.03$ showmount -e
export list for server:
/tmp/rootdsk (everyone)
/tmp/vardsk (everyone)
bash-2.03$


Then access to bkp server and mount the exported filesystem.

# mount -F nfs server:/tmp/rootdsk /mnt/rootdsk
# mount -F nfs server:/tmp/vardsk /mnt/vardsk
# df -k
server:/tmp/rootdsk
734003200 412299024 321704176 57% /mnt/rootdsk
server:/tmp/vardsk
34976657 23268937 11357954 68% /mnt/vardsk
bash-2.03$

Inform Storage team to perform restoration once tape loaded.

0 comments:

Post a Comment

 
;