PRIMECLUSTER Global Disk Services Configuration and Administration Guide 4.1 (Solaris(TM) Operating System) |
Contents |
Chapter 6 Backing Up and Restoring | > 6.1 Backing Up and Restoring a System Disk |
1) Boot the system from a CD-ROM device.
ok boot cdrom -s |
The version of an OS booted from a CD-ROM device must correspond to the version of the OS you are restoring.
In a system where mirroring is conducted by GDS, booting from a CD-ROM device and performing an illegal operation may disrupt the mirroring environment. Be sure to follow the procedure described here and to avoid operations not provided in this procedure.
When mounting the file system on a physical slice at the time of recovery, mounting as read-only is recommended to write-lock.
2) Create a special file for a tape device.
# tapes |
3) Check the names of the physical slices that will be the restore destinations for the root (/), /usr, and /var file systems and make a note of them.
# eeprom nvramrc | grep sdx-root-slice devalias sdx-root-slice-1 /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw # eeprom nvramrc | grep sdx-usr-slice devalias sdx-usr-slice-1 /devices/pci@1f,4000/scsi@3/sd@0,0:g,raw # eeprom nvramrc | grep sdx-var-slice devalias sdx-var-slice-1 /devices/pci@1f,4000/scsi@3/sd@0,0:b,raw |
In this example, the original physical slice names are:
/ : /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw
/usr : /devices/pci@1f,4000/scsi@3/sd@0,0:g,raw
/var : /devices/pci@1f,4000/scsi@3/sd@0,0:b,raw
The mirror physical slice names are:
/ : /devices/pci@1e,4000/scsi@3/sd@0,0:a,raw
/usr : /devices/pci@1e,4000/scsi@3/sd@0,0:g,raw
/var : /devices/pci@1e,4000/scsi@3/sd@0,0:b,raw
If multiplicity of the mirroring configuration is 3 or more, there are multiple mirror physical slices.
If /usr and /var file systems do not exist, the physical slice names are not displayed as shown below.
# eeprom nvramrc | grep sdx-usr-slice |
4) Restore the backup data on a tape medium back to the original physical slices respectively.
The following example shows the procedure for restoring backup data created with the ufsdump(1M) command.
# newfs /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw |
If restoring data to an original physical slice fails due to an I/O error and so on, restore data to the mirror physical slice.
,raw should not be added at the end of the device special file name specified with the mount(1M) command.
Data should not be restored from backup data created before the system disk was mirrored.
For details on the ufsrestore(1M) command, see the Solaris(TM) Operating System manual.
5) Install the boot block to the root partition of system disk.
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw |
6) Check the sector size and cylinder size of disk and make a note of them.
# prtvtoc /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw ~ * Dimensions: * 512 bytes/sector * 248 sectors/track * 19 tracks/cylinder * 4712 sectors/cylinder ~ |
In this example, the sector size is 512 (bytes) = 1 (block) and the cylinder size is 512 x 4712 (bytes) = 4712 (blocks).
7) Check the physical slice that contains the first sector (VTOC area) of the disk.
In the prtvtoc(1M) command output, a physical slice with 0 in the First Sector field contains the disk's first sector.
# prtvtoc /devices/pci@1f,4000/scsi@3/sd@0,0:a,raw ~ * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 0 409656 409655 1 7 00 409656 307242 716897 2 5 00 0 4117568 4117567 3 3 01 737906 388648 1126553 4 33 00 716898 21008 737905 5 4 00 1126554 942734 2069287 6 4 00 2069288 2048280 4117567 ~ |
In this example, the physical slice (:a) contains the first sector.
Partition 2 is a special partition that corresponds to the entire disk.
8) Copy data from the restored original physical slices to the mirror physical slices.
Copy data by following step 8a) if the physical slice does not contain the first sector or by following step 8b) if the physical slice contains the first sector.
If the multiplicity of the mirroring configuration is 3 or more, there are multiple mirror physical slices. Be sure to copy data to all of the mirror physical slices.
There is no need to copy data on an original slice that was not restored in step 4).
8a) If the physical slice does not contain the first sector:
To reduce copying time, specify the cylinder size found in step 6) to the bs option (I/O block size) of the dd(1M) command.
# dd if=/devices/pci@1f,4000/scsi@3/sd@0,0:g,raw of=/devices/pci@1e,4000/scsi@3/sd@0,0:g,raw bs=4712b |
8b) If the physical slice contains the first sector:
Take the following steps.
8b-1) Copy only the first cylinder of the physical slice first. Skip the first sector not to overwrite the first sector (VTOC area) of the mirror slice and copy by sector.
To skip the first sector, specify 1 to the iseek option and the oseek option of the dd(1M) command. Specify the sector size found in step 6) to the bs option. Specify the cylinder size (in blocks) found in step 6) subtracting 1 to the count option.
# dd if=/devices/pci@1f,4000/scsi@3/sd@0,0:a,raw of=/devices/pci@1e,4000/scsi@3/sd@0,0:a,raw bs=512 iseek=1 oseek=1 count=4711 |
8b-2) Copy the rest of cylinders of the physical slice next.
To reduce copying time, specify the cylinder size found in step 6) to the bs option of the dd(1M) command. To skip the first sector copied in step 8b-1), specify 1 to the iseek option and the oseek option of the dd(1M) command.
# dd if=/devices/pci@1f,4000/scsi@3/sd@0,0:a,raw of=/devices/pci@1e,4000/scsi@3/sd@0,0:a,raw bs=4712b iseek=1 oseek=1 |
9) Reboot the system.
# shutdown -g0 -i6 -y |
Contents |