PRIMECLUSTER Global Disk Services Configuration and Administration Guide 4.1 (Solaris(TM) Operating System)
Contents PreviousNext

Chapter 6 Backing Up and Restoring> 6.1 Backing Up and Restoring a System Disk

6.1.3 Restoring (When the System Cannot Be Booted)

1) Boot the system from a CD-ROM device.

ok boot cdrom -s


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
devalias sdx-root-slice-2 /devices/pci@1e,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
devalias sdx-usr-slice-2 /devices/pci@1e,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
devalias sdx-var-slice-2 /devices/pci@1e,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
# eeprom nvramrc | grep sdx-var-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
# mount -F ufs /devices/pci@1f,4000/scsi@3/sd@0,0:a /mnt
# cd /mnt
# ufsrestore rvf /dev/rmt/0
# cd /
# umount /mnt

# newfs /devices/pci@1f,4000/scsi@3/sd@0,0:g,raw
# mount -F ufs /devices/pci@1f,4000/scsi@3/sd@0,0:g /mnt
# cd /mnt
# ufsrestore rvf /dev/rmt/0
# cd /
# umount /mnt

# newfs /devices/pci@1f,4000/scsi@3/sd@0,0:b,raw
# mount -F ufs /devices/pci@1f,4000/scsi@3/sd@0,0:b /mnt
# cd /mnt
# ufsrestore rvf /dev/rmt/0
# cd /
# umount /mnt



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.

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
# dd if=/devices/pci@1f,4000/scsi@3/sd@0,0:b,raw of=/devices/pci@1e,4000/scsi@3/sd@0,0:b,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 PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2005