This section describes maintenance tasks for disksets, including reserving and releasing disksets, and adding hosts and disks to a diskset.
To perform maintenance on a diskset, a host must be the owner of the diskset or have reserved the diskset. (A host takes implicit ownership of the diskset by putting the first drives into the set.)
To work with a diskset, root must be a member of Group 14, or the ./rhosts file must contain an entry for the other hostname (on each host).
Disksets can be reserved safely or forcibly. When one host in a diskset reserves the diskset, the other host in the diskset cannot access data on drives in the diskset.
Safely - Reserves the diskset for your host only if no other host has reserved the diskset.
Forcibly - Reserves the diskset whether or not another host currently has the set reserved. Use this method when a host in the diskset is down or not communicating. If the other host had the diskset reserved at this point, it would panic due to reservation loss.
If you are fairly certain that the hosts in the diskset are communicating, it is normally a good idea to perform a safe reservation.
Make sure you have met the prerequisites ("Prerequisites for Maintaining DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Working With Disksets"). Use the metaset(1M) to reserve a diskset safely or forcibly. For more information, refer to the metaset(1M) man page.
If another host has ownership of the diskset, it will panic due to a SCSI reservation conflict.
red# metaset ... Set name = relo-red, Set number = 2 Host Owner red blue ... red# metaset -s relo-red -t red# metaset ... Set name = relo-red, Set number = 2 Host Owner red Yes blue ... |
In this example, host red communicates with host blue and ensures that host blue has released any reservation of the diskset before host red attempts to reserve the set.
In this example, if host blue owned the set relo-red, the "Owner" column in the above output would still have been blank. The metaset(1M) command only shows whether the issuing host owns the diskset, and not the other host.
# metaset -s relo-red -t -f |
In this example, host red does not communicate with host blue. Instead, the drives in the diskset are reserved without warning. If host blue had the diskset reserved, it would now panic due to reservation loss.
Releasing a diskset is useful when performing maintenance on the drives in the set. When a diskset is released, it cannot be accessed by the host. If both hosts in a diskset release the set, neither host in the diskset can access metadevices or hot spare pools defined in the set.
Make sure you have met the prerequisites ("Prerequisites for Maintaining DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Working With Disksets").
Release the diskset by using the metaset(1M) command
# metaset -s diskset -r |
In this command,
-s diskset |
Specifies the name of a diskset on which metaset will work. |
-r |
Releases ownership of a diskset. The reservation of all the disks within the set is removed. The metadevices set up within the set are no longer accessible. |
Verify that the diskset has been released on this host by using the metaset(1M) command without any options.
# metaset |
red# metaset -s relo-red -r red# metaset -s relo-red Set name = relo-red, Set number = 1 Host Owner red blue Drive Dbase c1t0d1 Yes c1t2d0 No c1t3d0 No c1t4d1 No c2t2d0 Yes c3t0d1 Yes c3t2d0 No c3t3d0 No c3t4d1 No |
This example releases the diskset relo-red. Note that there is no owner of the diskset. Viewing status from host red could be misleading. A host can only determine if it does or does not own a diskset. For example, if host blue were to reserve the diskset, it would not appear so from host red; only host blue would be able to determine the reservation in this case.
You can add drives to a diskset after it has been defined.
Make sure you have met the prerequisites ("Prerequisites for Maintaining DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Working With Disksets").
Add a drive to an existing diskset by using the metaset(1M) command.
# metaset -s diskset -a drivename ... |
In this command,
-s diskset |
Specifies the name of a diskset on which metaset will work. |
-a |
Adds drives to the named diskset. |
drivename... |
Specifies the drives to add to the diskset. Drive names are in the form cxtxdx; no "sx" slice identifiers are at the end of the name. The drivename must have the same major and minor names on all hosts in the diskset. |
When drives are added to a diskset, DiskSuite re-balances the metadevice state database replicas across the remaining drives. Refer to "Creating Disksets" for more information.
You will lose data if you add drives that contain data.
Verify that the host has been added to the diskset by using the metaset(1M) command without any options.
# metaset |
red# metaset -s relo-red -a c2t5d0 red# metaset Set name = relo-red, Set number = 1 Host Owner red Yes blue Drive Dbase c1t2d0 Yes c1t3d0 Yes c2t2d0 Yes c2t3d0 Yes c2t4d0 Yes c2t5d0 No |
This example adds drive c2t5d0 to diskset relo-red.
If you add or delete drives to a diskset while DiskSuite Tool is running, a dialog box appears stating that the configuration has changed. Either reload the configuration by selecting Rescan Configuration from the File menu, or exit DiskSuite Tool then restart it.
DiskSuite supports a maximum of two hosts per diskset. You can add another host to an existing diskset that only has one host.
Make sure you have met the prerequisites ("Prerequisites for Maintaining DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Working With Disksets").
Add the host:
# metaset -s diskset -a -h host ... |
In this command,
-s diskset |
Specifies the name of a diskset on which metaset will work. |
-a |
Adds hosts to the named diskset. |
-h host... |
Specifies one or more hostnames to be added to the diskset. Adding the first host creates the set. The hostname is the same name found in /etc/nodename. |
Verify that the host has been added to the diskset by using the metaset(1M) command without any options.
# metaset |
red# metaset -s relo-red -a -h blue red# metaset -s relo-red Set name = relo-red, Set number = 1 Host Owner red Yes blue Drive Dbase c1t0d1 Yes c1t2d0 No c1t3d0 No c1t4d1 No c2t2d0 Yes c3t0d1 Yes c3t2d0 No c3t3d0 No c3t4d1 No |