Top
PRIMECLUSTERGlobal Disk Services Configuration and AdministrationGuide 4.5
FUJITSU Software

6.2.2 Restoring

Restoring a system disk at a ZFS boot environment is performed by the following procedure.

Note

You cannot restore data to a different server from the one you have backed up.

1) Add any file.

When the system can be booted, add any file before restoring to ensure that restoring is being performed correctly.

Example) For adding hosts_new files

# cd /etc/inet
# cp hosts hosts_new
# ls host*
hosts hosts_new

2) Stop the system.

# /usr/sbin/shutdown -i0 -g0 -y

3) Swap physical disks if necessary.

Swapping operation is performed according to a defined procedure for each device.

Note

When restoring to the disk that was used in GDS before without swapping a physical disk, boot the system from the CD-ROM device (or network) and restore all the physical disks registered in a root class to the initial status. For the method of booting the system from the CD-ROM device (or network), see step 4).

# format c0t0d0
format> type AVAILABLE DRIVE TYPES: 0. Auto configure ... Specify disk type (enter its number)[14]: 0 c0t0d0: configured with capacity of 4.00GB <SUN4.2G cyl 3880 alt 2 hd 16 sec 135> selecting c0t0d0 [disk formatted] format> label Ready to label disk, continue? y format> quit

4) When the ok prompt is displayed, boot the target server in single user mode.

4a) For using an internal DAT device, on-board SAS interface, or external tape drive by using a Fujitsu SAS card:

Insert the Solaris installation DVD-ROM into the target server and boot the system from the DVD-ROM.

For how to boot the system, see the Solaris manual.

4b) For using an external tape drive with Fujitsu SCSI card.

4b-1) Check the OBP local-mac-address? variable. If the value is "true," change it to "false."

ok printenv local-mac-address?
local-mac-address? = true ok setenv local-mac-address? false local-mac-address? = false

4b-2) Prepare a boot server on the same segment as the target server and boot the system via the network.

For how to boot it, see the Solaris manual.


5) Create a slice to the target system disk.

Execute the format(1M) command based on the partition information recorded at the time of backing up and create a slice to the system disk which is restored.

For the partition information recorded at the time of backing up, the partition that displays "-" (hyphen) in the Tag column is a private slice of GDS. Do not create this partition. Moreover, delete it if a private slice exists.


6) Restore ZFS file systems.

The outline of the restoration procedure is as follows. For details, see the Solaris and ZFS manuals.

6-1) Use the zfs create command to create a ZFS storage pool to a slice of the restoration destination.

6-2) Use the zfs receive command to restore the ZFS snapshots from the tape media.

6-3) Use the installboot command and other commands to create a boot block to a slice of the restoration destination.

In this stage, neither an export of the ZFS storage pool (by the zpool export command) created in step 6-1) nor the system reboot should be done.


7) Mount the restored root file system if it has not been mounted.

For Solaris 11, mount the BE (Boot Environment) that was enabled in step 6).

For how to mount it, see the Solaris and ZFS manuals.

The following procedure indicates when the mountpoint is /tmp/mnt.


8) When using the shared class or local class, and the GDS configuration parameter SDX_DB_FAIL_NUM=0 was not set in "6.2.1 Backing Up", set the GDS configuration parameter.

Add the setting of SDX_DB_FAIL_NUM=0 to the end of /tmp/mnt/etc/opt/FJSVsdx/sdx.cf configuration file.

# vi /tmp/mnt/etc/opt/FJSVsdx/sdx.cf
 ...
SDX_DB_FAIL_NUM=0    <- Added

9) Delete the system disk settings of GDS.

Delete all the lines where sysvol-db is stated from /tmp/mnt/kernel/drv/sfdsk.conf.

# vi /tmp/mnt/kernel/drv/sfdsk.conf
# # Copyright (c) 1998, by Fujitsu, Ltd. # All rights reserved. # name="sfdsk" parent="pseudo"; sysvol-db0="sd","2"; <- Delete this line. sysvol-db1="sd","18"; <- Delete this line.

10) Update the boot-archive file.

10-1) Check if there is the boot-archive file under /tmp/mnt/platform.

# ls /tmp/mnt/platform/`uname -m`/boot_archive

10-2) If there is the boot-archive file, the file name is displayed. Execute the bootadm command to update the boot-archive file.

Do not execute this command for other cases.

# /sbin/bootadm update-archive -R /tmp/mnt

11) For Solaris 11, unmount the BE mounted in step 7).

For how to unmount it, see the Solaris and ZFS manuals.


12) Export the ZFS storage pool.

# zpool export rpool

13) Set the boot-device property of OpenBoot.

The procedure is different for the following three cases:

For the procedure for SAN Boot environment, see SAN Boot manual.


The disk connected to a 12Gbps SAS card

13a-1) Check the device path of a slice of the restore destination.

Execute the following command to check the device path of a slice of the restore destination. Note and save this path for later reference.

# ls -l /dev/dsk | grep slice_name_of_the_restore_destination

Example: when the slice of the restore destination is c0t600000E00D0000000001060300040000d0s0

# ls -l /dev/dsk | grep c0t600000E00D0000000001060300040000d0s0
lrwxrwxrwx 1 root root 64 Feb 2 13:57 c0t600000E00D0000000001060300040000d0s0 -> ../../devices/scsi_vhci/disk@g600000e00d0000000001060300040000:a

13a-2) Check the disk information of the restore destination.

Execute the following command to check the device path of a slice of the restore destination. Note and save this path for later reference.

# prtconf -v slice_name_of_the_restore_destination

Example: when the slice of the restore destination is c0t600000E00D0000000001060300040000d0s0

# prtconf -v /dev/rdsk/c0t600000E00D0000000001060300040000d0s0
disk, instance #0 Driver properties: ... Hardware properties: ... Paths from multipath bus adapters: Path 33: /pci@8100/pci@4/pci@0/pci@0/LSI,sas@0/iport@f0/disk@w500000e0d0460306,0
(*1) (*2) lsc#3(online) ...

(*1) disk node name (disk@w500000e0d0460306,0 in this example)
(*2) SAS Address (500000e0d0460306 in this example)

Note

If MPxIO is disabled, the line "Paths from multipath bus adapters:" is not displayed.


13a-3) Enter the OpenBoot environment.

# shutdown -y -g0 -i0

13a-4) Check the device path of SAS HBA that is connected to the disk of the restore destination.

Execute the following command to check the device path of SAS HBA of the restore destination.

ok probe-scsi-all

Example: when SAS HBA of the restore destination is 500000e0d046030

ok probe-scsi-all
/pci@8100/pci@4/pci@0/pci@0/LSI,sas@0
(*1) FCode Version 1.00.65, MPT Version 2.05, Firmware Version 4.00.00.00 Target a Unit 0 Disk TOSHIBA MBF2300RC 3706 585937500 Blocks, 300 GB SASDeviceName 50000393d82956d4 SASAddress 500000e0d0460306 PhyNum 0 Target b (*2) Unit 0 Disk TOSHIBA MBF2300RC 3706 585937500 Blocks, 300 GB SASDeviceName 50000393d828bbfc SASAddress 500000e0da0cc620 PhyNum b ... ok

(*1) Device path
(*2) SAS Address (SAS Address checked in *2 of Step 13a-2)


13a-5) Set boot-device property.

Concatenate the device path checked in step 13a-4), the disk node name checked in step 13a-2), and the slice name checked in step 13a-1). Set this concatenated value to the boot-device property of OBP.

ok setenv boot-device /pci@8100/pci@4/pci@0/pci@0/LSI,sas@0/disk@w500000e0d0460306,0:a

13a-6) Set false to the multipath-boot? property.

ok setenv multipath-boot? false

The disk of Expansion File Unit connected to a 6 Gbps SAS card, or the internal disks of SPARC M12/M10 and SPARC T4-4/T4-2/T4-1/T3-4/T3-2/T3-1 servers

13b-1) Check the device path of a slice of the restore destination.

Execute the following command to check the device path of a slice of the restore destination. Note and save this path for later reference.

# ls -l /dev/dsk | grep  slice_name_of_the_restore_destination

[Example for Solaris 11.3 or earlier]

When the slice of the restore destination is c0t5000CCA0150FEA10d0s0

# ls -l /dev/dsk | grep c0t5000CCA0150FEA10d0s0
lrwxrwxrwx 1 root root 48 Apr 25 13:46 c0t5000CCA0150FEA10d0s0 -> ../../devices/scsi_vhci/disk@g5000cca0150fea10:a

[Example for Solaris 11.4 or later]

When the slice of the restore destination is c1t50000397683346AAd0s0

# ls -l /dev/dsk | grep c1t50000397683346AAd0s0
lrwxrwxrwx   1 root     root           0 Aug 17 10:51 c1t50000397683346AAd0s0 -> ../../devices/pci@8000/pci@4/pci@0/pci@0/scsi@0/iport@f/disk@w50000397683346aa,0:a

13b-2) Check the restore destination slice information.

# prtconf -v /dev/rdsk/slice_of_the_restore_destination

How to check information depends on the OS version and whether or not MPxIO is currently enabled.

You can check whether or not MPxIO is enabled by using the current subcommand of the format(1M) command.MPxIO is enabled if the logical path of the restore destination has the /scsi_vhci directory inside.

Example: when the disk of the restore destination is c0t50000394882261A0d0

# format c0t50000394882261A0d0
format> current Current Disk = c0t50000394882261A0d0: 00000000 <TOSHIBA-MBF2600RC-3706 cyl 64986 alt 2 hd 27 sec 668> /scsi_vhci/disk@g50000394882261a0 /dev/chassis/SYS/HDD0/disk

[Solaris 11.3 or earlier]

[Solaris 11.4 or later]


13b-3) Enter the OpenBoot environment.

# halt

Note

If the system is started from an emergency startup disk for restoration, enter the OpenBoot environment using the shutdown(1M) command.


13b-4) Set boot-device property.

[Example for Solaris 11.3 or earlier]

Concatenate the obp-path parameter checked in step 13b-2) and the slice name of the restore destination device checked in step 13b-1). Set this concatenated value to the boot-device property of OBP.

ok setenv boot-device /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@w5000cca0150fea11,0:a

[Example for Solaris 11.4 or later]

Concatenate the ddi-boot-path parameter checked in step 13b-2) and the slice name of the restore destination device checked in step 13b-1). Set this concatenated value to the boot-device property of OBP.

ok setenv boot-device /pci@8000/pci@4/pci@0/pci@0/scsi@0/disk@w50000397683346aa,0:a


Other than the above disks

13c-1) Check the device path of a slice of the restore destination.

Execute the following command to check the device path of a slice of the restore destination. Note and save this path for later reference.

# ls -l /dev/dsk | grep  slice_of_the_restore_destination

Example: when a slice of the restore destination is c0t1d0s0

# ls -l /dev/dsk | grep c0t1d0s0

lrwxrwxrwx 1 root root 48 Dec 1 15:37 c0t1d0s0 -> ../../devices/pci@83,4000/FJSV,ulsa@2,1/sd@1,0:a

13c-2) Enter the OpenBoot environment.

# halt

Note

If the system is started from an emergency startup disk for restoration, enter the OpenBoot environment using the shutdown(1M) command.


13c-3) Check the device name in the OpenBoot environment.

ok show-devs /pci@83,4000/FJSV,ulsa@2,1

The specified path here "/pci@83,4000/FJSV,ulsa@2,1" is the path that the last element path (/sd@1,0:a in this example) is excluded from the path displayed in step 13c-1).


13c-4) Set boot-device property.

Execute the following command based on the confirmation result in step 13c-3), and start the system.

When the device name "disk" is output to the last element path displayed in show-devs.

ok setenv boot-device /pci@83,4000/FJSV,ulsa@2,1/disk@1,0:a

The specified path here "/pci@83,4000/FJSV,ulsa@2,1/disk@1,0:a" is the one that the part before @ of the last element path (sd in this example) displayed in step 13c-1) is replaced to disk.

When the device name "sd" is output to the last element path displayed in show-devs.

ok setenv boot-device /pci@83,4000/FJSV,ulsa@2,1/sd@1,0:a

The specified path here "/pci@83,4000/FJSV,ulsa@2,1/sd@1,0:a" is the path displayed in step 13c-1).



14) Set boot-device-index property.

Check if there is boot-device-index property in OpenBoot. If there is, set boot-device-index property to "0."

ok printenv boot-device-index

If there is boot-device-index property, "boot-device-index = number" is displayed. In this case, execute the following command. In other cases, do not execute the following command.

ok setenv boot-device-index 0

15) Set local-mac-address? property.

If the value is changed to "false" in the OBP local-mac-address? property in step 4), change it to "true" again.

ok printenv local-mac-address?
local-mac-address? = false
ok setenv local-mac-address? true
local-mac-address? = true

16) Boot the system.

ok boot

17) Check if there are no errors in the configuration and state of the shared and local classes.

# sdxinfo

18) When using the shared class or local class, undo the GDS configuration parameter.

Comment out the line of SDX_DB_FAIL_NUM=0 in the /etc/opt/FJSVsdx/sdx.cf configuration file.

# vi /etc/opt/FJSVsdx/sdx.cf
... # SDX_DB_FAIL_NUM=0

19) If it is the cluster system, delete the cluster resource of the root class.

The target is the only root class. Do not delete the cluster resource of local classes and shared classes.

The following examples show the case where the following classes exist:

Check whether the class resource of the root class exists.


# /etc/opt/FJSVsdx/bin/sdxdcrsc -I
NAME SCOPE RID(RDB) RID(CDB) --------------- -------------------- --------------- --------------- System node1 368 1 class0001 node1 369 2 class0002 node1,node2 371,372(370) 4,5(3) #

If the class resource of the root class is not displayed, go to the next step 20).

If the class resource of the root class is displayed, delete the class resource of the root class.


# /etc/opt/FJSVsdx/bin/sdxdcrsc -R -c System
sdxdcrsc: System removed #

Confirm that the class resource of the root class has been deleted.

Execute the following command and check that the target class name is not displayed.


# /etc/opt/FJSVsdx/bin/sdxdcrsc -I
NAME SCOPE RID(RDB) RID(CDB) --------------- -------------------- --------------- --------------- class0001 node1 369 2 class0002 node1,node2 371,372(370) 4,5(3) #

20) Re-setting the system disk mirroring.

For details, see "7.1.1 System Disk Mirroring Settings in a ZFS Boot Environment (GDS Mirroring)" or "7.2.1 System Disk Mirroring Settings in a ZFS Boot Environment (ZFS Mirroring)."


Note

Initialization of mirror disk

After creating slice to the mirror disk with the procedure for system disk mirroring settings, execute the command below to initialize the slice of mirror disk. For details of the dd command, see the manual of dd command. Confirm the usage and the meaning of options, specify options properly.

Example) Mirror disk is c1t0d0:

# dd if=/dev/zero of=/dev/rdsk/c1t0d0s0 bs=1024k

21) Confirm that added files in step 1) are deleted by restoring backup data.


# cd /etc/inet
# ls host*
hosts