There are the following two methods to mirror the system disk by GDS in a ZFS boot environment.
GDS mirroring
Method to configure a ZFS storage pool by one mirror volume of GDS.
GDS mirroring has the following features:
Redundancy of the system disk by GDS mirroring function.
Increasing availability of the system disk by the I/O timeout function of GDS.
It is possible to swap the system disk by the same method as the existing UFS boot environment.
ZFS mirroring
Method to configure ZFS storage pool by two single volumes (multiplicity of the mirror volumes is 1).
ZFS mirroring has the following features:
Redundancy of the system disk by the ZFS mirroring function.
Increasing availability of the system disk by the I/O timeout function of GDS.
GDS: Global Disk Services
Note that the following when mirroring the system disk using GDS in a ZFS boot environment:
The number of disks
Mirroring by a total of two disks, system disk and mirror destination disk are supported.
Specify only one system disk as the installation destination at the time of OS installation.
The disk label type of the system disk
When using Solaris 11.1 or later on SPARC M12, SPARC M10 (XCP2230 or later) or SPARC T series (System Firmware 8.4 or later), OS can be installed in a disk with an EFI label. However, when using GDS, install OS in a disk with a VTOC label.
Before installing OS in a disk with a VTOC label, first execute the format -e command to apply a VTOC (SMI) label to the disk. For details, see the product note of SPARC M12/M10 or the manual of Oracle Solaris.
Partition configuration of the system disk
At least 20 MB of disk space for the private slice of GDS in the system disk is required. Therefore, set the ZFS root pool configuration as shown below at the time of OS installation.
Specify the slice (cXtXdXsY) not the entire system disk (cXtXdX or cXtXdXs2) as the OS installation destination.
*Specify Y for more than 0 and integer number other than 2 for less than 7. Normally it is 0.
The maximum size of the ZFS root pool must be less than (disk size -21) [MB].
Settings and cancelling the system disk mirroring
Settings and cancelling the system disk mirroring cannot be performed by GDS Management View in a ZFS boot environment.
See the following for setting and cancelling the system disk mirroring using commands.
For GDS mirroring: "7.1 System Disk Mirroring in a ZFS Boot Environment (GDS Mirroring)"
For ZFS mirroring: "7.2 System Disk Mirroring in a ZFS Boot Environment (ZFS Mirroring)"
Backing up and restoring the system disk
In the root class in a ZFS boot environment, backing up and restoring the system disk by snapshot using slice detachment and PRIMECLUSTER GDS Snapshot are not allowed.
Backing up and restoring the system disk in a ZFS boot environment must be performed by the ZFS snapshot function (such as zfs snapshot, zfs rollback, zfs send, and zfs receive commands). For details, see "6.2 Backing Up and Restoring a System Disk in a ZFS Boot Environment."
Creation of a boot environment
When the ZFS root pool is configured in GDS volumes, the following table shows whether a boot environment can be created or not.
Method of creating a boot environment | Solaris 11 or earlier | Solaris 11.1 or later |
---|---|---|
Creating Boot Environment (BE) with the beadm(1M) command | N | Y |
Creating a boot environment by Solaris Live Upgrade | N | N |
Y: possible, N: impossible
Operation of the system disk which is mirrored by GDS mirroring
After mirroring the system disk by GDS mirroring, ZFS recognizes a GDS volume as a virtual device which becomes a configuration element of the ZFS root pool. ZFS does not recognize the disk configuration or the slice configuration of GDS.
Therefore, if you change the disk configuration of GDS in the ZFS root pool by GDS operations such as swapping a physical disk or changing a group configuration, it does not affect ZFS.
Hence, after mirroring the system disk, you can manage or operate the system disk by the same method as the existing UFS boot environment.
Swapping the system disk which is mirrored by ZFS mirroring
Before swapping disks, detach a GDS volume on the disk to be swapped from the ZFS root pool and delete the disk from the root class.
After the disk is swapped, register the new disk to the root class and create a volume. Then attach the created volume to the ZFS root pool
[How to swap the system disk which is mirrored by ZFS mirroring]
1. Detach a volume on the disk from the ZFS root pool.
Example:
# zpool detach rpool /dev/sfdsk/System/dsk/Volume2 |
2. Delete the disk from the root class.
Example:
# sdxvolume -F -c System -v Volume2 # sdxvolume -R -c System -v Volume2 # sdxgroup -R -c System -g Group2 # sdxdisk -R -c System -d Root2 |
3. Swap the disk.
4. Make the configuration of the new disk to the same as the system disk by using an OS command such as format(1M).
5. Register the new disk to the root class to create a volume.
Example:
# sdxdisk -M -c System -a type=root -d c1t0d0=Root2:keep # sdxdisk -C -c System -g Group2 -d Root2 -v 0=Volume2:on |
6. Attach the volume on the new disk to the ZFS root pool.
Example:
# zpool attach rpool /dev/sfdsk/System/dsk/Volume1 \ /dev/sfdsk/System/dsk/Volume2 |
After executing the zpool attach command, the resynchronization process of ZFS is performed. This time, the OS message (SUNW-MSG-ID: ZFS-8000-QJ) may be output on the console, but it does not affect the system.
During the resynchronization process, "DEGRADED" may be displayed in the state field. If "ONLINE" is displayed in the state field after completing the resynchronization process, there is no problem.
7. After the resynchronization process is completed by ZFS, install the boot block to the volume on the swapped disk.
For the following environments, do not perform this procedure:
For the environment where Solaris 10 is used and the kernel patch 144500-19 or later is applied
For the environment where Solaris 11 11/11 or later is used
Example:
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \ /dev/sfdsk/System/rdsk/Volume2 |
Note
The swapped disk is not set into the boot-device property of OBP automatically. Because the swapped disk is set into the boot-device property when the system is restarted, restart the system as soon as possible after executing step 7.