This chapter explains how to work with Solaris Volume Manager's hot spares and hot spare pools. For information about related concepts, see Chapter 16, Hot Spare Pools (Overview).
The following task map identifies the procedures that are needed to manage Solaris Volume Manager hot spare pools.
Task |
Description |
For Instructions |
---|---|---|
Create a hot spare pool |
Use the Solaris Volume Manager GUI or the metainit command to create a hot spare pool. | |
Add slices to a hot spare pool |
Use the Solaris Volume Manager GUI or the metahs command to add slices to a hot spare pool. | |
Associate a hot spare pool with a volume |
Use the Solaris Volume Manager GUI or the metaparam command to associate a hot spare pool with a volume. | |
Change which hot spare pool is associated with a volume |
Use the Solaris Volume Manager GUI or the metaparam command to change which hot spare pool is associated with a volume. | |
Check the status of hot spares and hot spare pools |
Use the Solaris Volume Manager GUI, the metastat command, or metahs -i command to check the status of a hot spare or hot spare pool. | |
Replace a hot spare in a hot spare pool |
Use the Solaris Volume Manager GUI or the metahs command to replace a hot spare in a hot spare pool. | |
Delete a hot spare from a hot spare pool |
Use the Solaris Volume Manager GUI or the metahs command to delete a hot spare from a hot spare pool. | |
Enable a hot spare |
Use the Solaris Volume Manager GUI or the metahs command to enable a hot spare in a hot spare pool. |
Do not create volumes or hot spares larger than 1 Tbyte if you expect to run the Solaris software with a 32–bit kernel or if you expect to use a version of the Solaris OS prior to the Solaris 9 4/03 release. See Overview of Multi-Terabyte Support in Solaris Volume Manager for more information about multiterabyte volume support in Solaris Volume Manager.
Solaris Volume Manager does not warn you if you create a hot spare that is not large enough. If the hot spare is not equal to, or larger than, the volume to which it is attached, the hot spare will not work.
Check Prerequisites for Creating Solaris Volume Manager Components.
Become superuser.
To create a hot spare pool, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node. Then, choose Action⇒Create Hot Spare Pool. For more information, see the online help.
Use the following form of the metainit command:
# metainit hot-spare-pool-name ctds-for-slice |
Specifies the name of the hot spare pool.
Specifies the slice being added to the hot spare pool. The option is repeated for each slice being added to the hot spare pool.
See the metainit(1M) man page for more information.
The metahs command can also be used to create hot spare pools.
# metainit hsp001 c2t2d0s2 c3t2d0s2 hsp001: Hotspare pool is setup |
In this example, the hot spare pool hsp001 contains two disks as the hot spares. The system confirms that the hot spare pool has been set up.
To add more hot spares to the hot spare pool, see How to Add Additional Slices to a Hot Spare Pool. After you create the hot spare pool, you need to associate it with a submirror or RAID-5 volume. See How to Associate a Hot Spare Pool With a Volume.
Check Prerequisites for Creating Solaris Volume Manager Components.
Become superuser.
To add a slice to an existing hot spare pool, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node. Choose the hot spare pool you want to change. Choose Action⇒Properties. Then, choose the Hot Spares panel. For more information, see the online help.
Use one of the following forms of the metahs command:
# metahs -a hot-spare-pool-name slice-to-add |
# metahs -a -all hot-spare-pool-name slice-to-add |
Specifies to add the slice to the specified hot spare pool.
Specifies to add the slice to all hot spare pools.
Specifies the slice to add to the hot spare pool.
See the metahs(1M) man page for more information.
You can add a hot spare to one or more hot spare pools. When you add a hot spare to a hot spare pool, the hot spare is added to the end of the list of slices in the hot spare pool.
In this example, the -a option adds the slice /dev/dsk/c3t0d0s2 to hot spare pool hsp001. The system verifies that the slice has been added to the hot spare pool.
# metahs -a hsp001 /dev/dsk/c3t0d0s2 hsp001: Hotspare is added |
In this example, the -a option used with all adds the slice /dev/dsk/c3t0d0s2 to all hot spare pools configured on the system. The system verifies that the slice has been added to all hot spare pools.
# metahs -a -all /dev/dsk/c3t0d0s2 hsp001: Hotspare is added hsp002: Hotspare is added hsp003: Hotspare is added |
Check Prerequisites for Creating Solaris Volume Manager Components.
Become superuser.
To associate a hot spare pool with a RAID-5 volume or submirror, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes and choose a volume. Choose Action⇒Properties. Then, choose the Hot Spare Pool panel. Finally, choose Attach HSP. For more information, see the online help.
Use the following form of the metaparam command:
# metaparam -h hot-spare-pool component |
Specifies to modify the named hot spare pooll.
Specifies the name of the hot spare pool.
Specifies the name of the submirror or RAID-5 volume to which the hot spare pool is being associated.
See the metaparam(1M) man page for more information.
In the following example, the -h option associates a hot spare pool, hsp100, with two submirrors, d10 and d11, of mirror, d0. The metastat command shows that the hot spare pool is associated with the submirrors.
# metaparam -h hsp100 d10 # metaparam -h hsp100 d11 # metastat d0 d0: Mirror Submirror 0: d10 State: Okay Submirror 1: d11 State: Okay ... d10: Submirror of d0 State: Okay Hot spare pool: hsp100 ... d11: Submirror of d0 State: Okay Hot spare pool: hsp100 ... |
In the following example, the -h option associates a hot spare, hsp001, with a RAID-5 volume,d10. The metastat command shows that the hot spare pool is associated with the RAID-5 volume.
# metaparam -h hsp001 d10 # metastat d10 d10: RAID State: Okay Hot spare pool: hsp001 ... |
Check Prerequisites for Creating Solaris Volume Manager Components.
Become superuser.
To change a volume's associated hot spare pool, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node and choose the volume. Choose Action⇒Properties. Then choose the Hot Spare Pool panel. Detach the unwanted hot spare pool and attach the new hot spare pool by following the onscreen instructions. For more information, see the online help.
Use the following form of the metaparam command:
# metaparam -h hot-spare-pool-name RAID5-volume-or-submirror-name |
Specifies to modify the hot spare pool named.
Specifies the name of the new hot spare pool, or the special keyword none to remove hot spare pool associations.
Specifies the name of the submirror or RAID-5 volume to which the hot spare pool is being attached.
See the metaparam(1M) man page for more information.
In the following example, the hot spare pool, hsp001, is initially associated with a RAID-5 volume,d4. The hot spare pool association for the volume is then changed to hsp002. The metastat command shows the hot spare pool association before and after this change.
# metastat d4 d4: RAID State: Okay Hot spare pool: hsp001 ... # metaparam -h hsp002 d4 # metastat d4 d4: RAID State: Okay Hot spare pool: hsp002 ... |
In the following example, the hot spare pool, hsp001, is initially associated with a RAID-5 volume, d4. The hot spare pool association is then changed to none, which indicates that no hot spare pool should be associated with this volume. The metastat command shows the hot spare pool association before and after this change.
# metastat d4 d4: RAID State: Okay Hot spare pool: hsp001 ... # metaparam -h none d4 # metastat d4 d4: RAID State: Okay Hot spare pool: ... |
The following sections show how to perform maintenance tasks on hot spare pools.
To view the status of a hot spare pool and its hot spares, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties to view detailed status information. For more information, see the online help.
Run the following form of the metastat command:
# metastat hot-spare-pool-name |
The following example shows sample output from the metastat command on a hot spare pool.
# metastat hsp001 hsp001: 1 hot spare c1t3d0s2 Available 16800 blocks |
The metahs command can also be used to check the status of a hot spare pool.
For information on the hot spare pool states and the possible actions to take, see Hot Spare Pool States.
Become superuser.
Verify whether the hot spare is currently being used by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties. Then choose the Hot Spares panel. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metastat command to view the status of the hot spare pool:
# metastat hot-spare-pool-name |
For more information, see the metastat(1M) man page.
To replace the hot spare, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties. Then choose the Hot Spares panel. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metahs command:
# metahs -r hot-spare-pool-name current-hot-spare replacement-hot-spare |
Specifies to replace disks in the named hot spare pool.
Specifies the name of the hot spare pool. You can also use the special keyword all to change all hot spare pool associations.
Specifies the name of the current hot spare that will be replaced.
Specifies the name of the slice that will replace the current hot spare in the named hot spare pool.
For more information, see the metahs(1M) man page.
In the following example, the metastat command shows that the hot spare is not in use. The metahs -r command replaces the hot spare, /dev/dsk/c0t2d0s2, with the hot spare, /dev/dsk/c3t1d0s2, in the hot spare pool, hsp003.
# metastat hsp003 hsp003: 1 hot spare c0t2d0s2 Broken 5600 blocks # metahs -r hsp003 c0t2d0s2 c3t1d0s2 hsp003: Hotspare c0t2d0s2 is replaced with c3t1d0s2 |
In the following example, the keyword all replaces the hot spare, /dev/dsk/c1t0d0s2, with the hot spare, /dev/dsk/c3t1d0s2, in all its associated hot spare pools.
# metahs -r all c1t0d0s2 c3t1d0s2 hsp001: Hotspare c1t0d0s2 is replaced with c3t1d0s2 hsp002: Hotspare c1t0d0s2 is replaced with c3t1d0s2 hsp003: Hotspare c1t0d0s2 is replaced with c3t1d0s2 |
Become superuser.
Verify whether the hot spare is currently being used by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties. Then choose the Hot Spares panel. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metastat command to view the status of the hot spare pool:
# metastat hot-spare-pool-name |
See the metastat(1M) man page.
To delete the hot spare, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties. Then choose the Hot Spares panel. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metahs command:
# metahs -d hot-spare-pool-name current-hot-spare |
Specifies to delete a hot spare from the named hot spare pool.
Specifies the name of the hot spare pool. You can also use the special keyword all to delete the hot spare from all hot spare pools.
Specifies the name of the current hot spare that will be deleted.
For more information, see the metahs(1M) man page.
In the following example, the metastat command shows that the hot spare is not in use. The metahs -d command deletes the hot spare, /dev/dsk/c0t2d0s2, in the hot spare pool, hsp003.
# metastat hsp003 hsp003: 1 hot spare c0t2d0s2 Broken 5600 blocks # metahs -d hsp003 c0t2d0s2 |
Become superuser.
To return a hot spare to the “available” state, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Hot Spare Pools node and select a hot spare pool. Choose Action⇒Properties. Then, choose the Hot Spares panel. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metahs command:
# metahs -e hot-spare-slice |
Specifies to enable a hot spare.
Specifies the name of the slice to enable.
For more information, see the metahs(1M) man page.
In the following example, the metahs command places the hot spare, /dev/dsk/c0t0d0s2 in the “Available” state after it has been repaired. It is unnecessary to specify a hot spare pool.
# metahs -e c0t0d0s2 |