Summary: Disaster recovery for ODS,

Ju-Lien Lim (jlim@postino.gartner.com)
Mon, 15 Dec 1997 13:30:10 -0500

I know there have been numerous questions on how to do disaster recovery
with Online Disksuite, and below is some documentation I received
recently that I thought I would share with all of you.

Ju
julienlim@rocketmail.com

-------------------------------- cut here
--------------------------------
Summary: Disaster recovery for ODS, restoring a mirrored root from
backup

DETAIL DESCRIPTION:

keywords: SDS, ODS, Online Disksuite

If your ODS machine has been destroyed in a fire, and you need to
restore from
backup, then this is how to handle the state database replacement and
issues
with the mirrored boot configuration on your backup tapes.

SOLUTION SUMMARY:

NOTE: In order to restore the machine exactly the way it was, it is
necessary
to have a record of the loactions of the state databases, and also the
configuration of the meta-devices. These are *not* held in user-readable
form
on the root filesystem, so it is useful to get the information *before*
a crash
with the commands:

metadb -i
metastat -p

1) Use the normal disaster recovery procedures to restore the root
filesystem,
except edit the /etc/system and /etc/vfstab files as follows:

vi /a/etc/system

** Put a "*" in front of all the lines that relate to ods.

-------------------------------------------------------------
** EXAMPLE OF FILE BEFORE:

* Begin MDD root info (do not edit)
forceload: misc/md_trans
forceload: misc/md_raid
forceload: misc/md_hotspares
forceload: misc/md_stripe
forceload: misc/md_mirror
forceload: drv/sd
forceload: drv/esp
forceload: drv/espdma
forceload: drv/sbus
forceload: drv/iommu
rootdev:/pseudo/md@0:0,3,blk
* End MDD root info (do not edit)
* Begin MDD database info (do not edit)
set md:mddb_bootlist1="sd:14:16 sd:15:16"
* End MDD database info (do not edit)
-------------------------------------------------------------
** EXAMPLE OF FILE AFTER:

* Begin MDD root info (do not edit)
** forceload: misc/md_trans
** forceload: misc/md_raid
** forceload: misc/md_hotspares
** forceload: misc/md_stripe
** forceload: misc/md_mirror
** forceload: drv/sd
** forceload: drv/esp
** forceload: drv/espdma
** forceload: drv/sbus
** forceload: drv/iommu
** rootdev:/pseudo/md@0:0,3,blk
* End MDD root info (do not edit)
* Begin MDD database info (do not edit)
** set md:mddb_bootlist1="sd:14:16 sd:15:16"
* End MDD database info (do not edit)
-------------------------------------------------------------

cp /a/etc/vfstab /a/etc/vfstab.ods
vi /a/etc/vfstab

** change all metadevices back to regular device
(/dev/dsk/cxtxdxsx)
for the boot disk, and comment out the rest.

-------------------------------------------------------------------------------

** EXAMPLE FILE BEFORE:

#device device mount FS fsck mount
mount
#to mount to fsck point type pass at boot
options
#
/proc - /proc proc - no
-
fd - /dev/fd fd - no
-
swap - /tmp tmpfs - yes
-
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no
-
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 no
-
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 2 yes
-
/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 2 yes
-
/dev/md/dsk/d1 - - swap - no
-
/dev/md/dsk/d5 /dev/md/rdsk/d5 /export/home ufs 3 yes
quota
/dev/md/dsk/d6 /dev/md/rdsk/d6 /export/home1 ufs 3 yes
quota

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

** EXAMPLE FILE AFTER:
#device device mount FS fsck mount
mount
#to mount to fsck point type pass at boot
options
#
/proc - /proc proc - no
-
fd - /dev/fd fd - no
-
swap - /tmp tmpfs - yes
-
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no
-
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no
-
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /var ufs 2 yes
-
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /opt ufs 2 yes
-
/dev/dsk/c0t0d0s1 - - swap - no
-
#/dev/md/dsk/d5 /dev/md/rdsk/d5 /export/home ufs 3 yes
quota
#/dev/md/dsk/d6 /dev/md/rdsk/d6 /export/home1 ufs 3 yes
quota
-------------------------------------------------------------------------------

2) Use the normal disaster recovery procedures to recover the remaining
filesystems on the boot disk.

3) Boot the system from the newly restored boot disk.

4) Re-add the state databases with the metadb command:
metadb -a -f <location1>
metadb -a -f <location2>
metadb -a -f <location3>

5) Re-create the md.tab file from the metastat output or from memory,
except
edit it as follows:

vi /etc/opt/SUNWmd/md.tab

** change all mirrors to be one-way mirrors. For the boot disk
ensure
that the one-way mirrors refer to the side which has been
restored.

-------------------------------------------------------------------------------

** EXAMPLE FILE BEFORE:

d0 -m d10 d20
d10 1 1 c0t0d0s0
d20 1 1 c1t0d0s0
d1 -m d11 d21
d11 1 1 c0t0d0s1
d21 1 1 c1t0d0s1
d2 -m d12 d22
d12 1 1 c0t0d0s6
d22 1 1 c1t0d0s6
d3 -m d13 d23
d13 1 1 c0t0d0s7
d23 1 1 c1t0d0s7
d4 -m d14 d24
d14 1 1 c0t0d0s4
d24 1 1 c1t0d0s4
d5 -m d15 d25
d15 4 c0t1d0s2 c0t2d0s2 c1t1d0s2 c1t2d0s2
d25 4 c0t3d0s2 c1t3d0s2 c1t4d0s2 c1t5d0s2
d6 3 c1t6d0s2 c1t8d0s2 c1t9d0s2
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

** EXAMPLE FILE AFTER:

d0 -m d10
d10 1 1 c0t0d0s0
d20 1 1 c1t0d0s0
d1 -m d11
d11 1 1 c0t0d0s1
d21 1 1 c1t0d0s1
d2 -m d12
d12 1 1 c0t0d0s6
d22 1 1 c1t0d0s6
d3 -m d13
d13 1 1 c0t0d0s7
d23 1 1 c1t0d0s7
d4 -m d14
d14 1 1 c0t0d0s4
d24 1 1 c1t0d0s4
d5 -m d15
d15 4 c0t1d0s2 c0t2d0s2 c1t1d0s2 c1t2d0s2
d25 4 c0t3d0s2 c1t3d0s2 c1t4d0s2 c1t5d0s2
d6 3 c1t6d0s2 c1t8d0s2 c1t9d0s2
-------------------------------------------------------------------------------

6) Next run the metainit & metaroot commands, restore the vfstab, and
reboot.

metainit -a
metaroot d0
cp /etc/vfstab.ods /etc/vfstab
reboot

7) Finally, metattach the mirrors, and continue restoring the other
filesystems.

PRODUCT AREA: System Administration
PRODUCT: Disk admin
SUNOS RELEASE: Solaris 2.x
HARDWARE: any