Chapter 16 Hot Spare Pools (Tasks)
This chapter explains how to work with Solaris Volume Manager's hot
spares and hot spare pools. For information about related concepts, see Chapter 15, Hot Spare Pools (Overview).
Hot Spare Pools (Task Map)
The following task map identifies the procedures needed to manage Solaris Volume Manager
hot spare pools.
Creating a Hot Spare Pool
How to Create a Hot Spare Pool
-
Check Prerequisites for Creating Solaris Volume Manager Elements.
-
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
|
where ctds-for-slice is repeated for each
slice in the hot spare pool. See the metainit(1M) man page for more information.
Note –
The metahs command can also be used to create
hot spare pools.
Example—Creating a Hot Spare Pool
# 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.

Caution –
Solaris Volume Manager will 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.
Where to Go From Here
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.
How to Add Additional Slices to a Hot Spare Pool
-
Check Prerequisites for Creating Solaris Volume Manager Elements.
-
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, then choose
the hot spare pool you want to change. Choose Action->Properties, then choose
the Components panel. For more information, see the online help.
-
Use the following form of the metahs command:
metahs -a hot-spare-pool-name slice-to-add
|
Use -a for hot-spare-pool-name
to add the slice to the specified hot spare pool.
Use -all for hot-spare-pool-name
to add the slice to all hot spare pools. See the metahs(1M) man page for more information.
Note –
You can add a hot spare to one or more hot spare pools. When you
add a hot spare to a hot spare pool, it is added to the end of the list of
slices in the hot spare pool.
Example—Adding a Hot Spare Slice to One Hot Spare Pool
# metahs -a hsp001 /dev/dsk/c3t0d0s2
hsp001: Hotspare is added
|
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.
Example—Adding a Hot Spare Slice to All Hot Spare Pools
# metahs -a -all /dev/dsk/c3t0d0s2
hsp001: Hotspare is added
hsp002: Hotspare is added
hsp003: Hotspare is added
|
In this example, the -a and -all options
add 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.
Associating a Hot Spare Pool With Volumes
How to Associate a Hot Spare Pool With a Volume
-
Check Prerequisites for Creating Solaris Volume Manager Elements.
-
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 and Attach HSP. For
more information, see the online help.
-
Use the following form of the metaparam
command:
metaparam -h hot-spare-pool component
|
-
-h
-
Specifies to
modify the hot spare pool named.
-
hot-spare-pool
-
Is the name of the hot spare pool.
-
component
-
Is 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.
Example—Associating a Hot Spare Pool With 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
...
|
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.
Example—Associating a Hot Spare Pool With a RAID 5 Volume
# metaparam -h hsp001 d10
# metastat d10
d10: RAID
State: Okay
Hot spare pool: hsp001
...
|
The -h option associates a hot spare pool named hsp001 with a RAID 5 volume named d10. The metastat command shows that the hot spare pool is associated with
the RAID 5 volume.
How to Change the Associated Hot Spare Pool
-
Check Prerequisites for Creating Solaris Volume Manager Elements.
-
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 detach the new hot spare pool by following the
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
|
-
-h
-
Specifies to
modify the hot spare pool named.
-
hot-spare-pool
-
Is the name of the new hot spare pool, or the special keyword none to remove hot spare pool associations.
-
component
-
Is 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.
Example—Changing the Hot Spare Pool Association
# 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 this example, the hot spare pool hsp001 is initially
associated with a RAID 5 volume named d4. The hot spare
pool association is changed to hsp002. The metastat command shows the hot spare pool association before and
after this change.
Example—Removing the Hot Spare Pool Association
# metastat d4
d4: RAID
State: Okay
Hot spare pool: hsp001
...
# metaparam -h none d4
# metastat d4
d4: RAID
State: Okay
Hot spare pool:
...
|
In this example, the hot spare pool hsp001 is initially
associated with a RAID 5 volume named d4. The hot spare
pool association is changed to none, which indicates
that no hot spare pool should be associated with this device. The metastat command shows the hot spare pool association before and
after this change.
Maintaining Hot Spare Pools
How to Check Status of Hot Spares and 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 get detailed status information.
For more information, see the online help.
-
Run the following form of the metastat
command:
metastat hot-spare-pool-name
|
Note –
The metahs command can also be used to check
the status of hot spare pool.
Example—Viewing Hot Spare Pool Status
Here is sample output from the metastat command on
a hot spare pool.
# metastat hsp001
hsp001: 1 hot spare
c1t3d0s2 Available 16800 blocks
|
Hot Spare Pool States
The following table explains hot spare pool states and possible
actions to take.
Table 16–1 Hot Spare Pool States (Command Line)
|
State
|
Meaning
|
Action
|
|
Available
|
The hot spares are running and ready to accept
data, but are not currently being written to or read from.
|
None.
|
|
In-use
|
This hot spare pool includes slices that have been used
to replace failed components in a redundant volume.
|
Diagnose how the hot spares are being used.
Then, repair the slice in the volume for which the hot spare is being used.
|
|
Broken
|
There is a problem with a hot spare or hot spare pool,
but there is no immediate danger of losing data. This status is also displayed
if all the hot spares are in use or if any hot spares are broken.
|
Diagnose how the hot spares are being
used or why they are broken. You can add more hot spares to the hot spare
pool, if desired.
|
How to Replace a Hot Spare in a Hot Spare Pool
-
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
and follow the instructions. For more information, see the online help.
-
Use the following form of the metastat
command:
metastat hot-spare-pool-name
|
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
and follow the 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
|
-
-r
-
Specifies to
replace disks in the hot spare pool named.
-
hot-spare-pool
-
Is the name of the hot spare pool, or the special keyword all to change all hot spare pool associations.
-
current-hot-spare
-
Is the name of the current hot spare that will be replaced.
-
replacement-hot-spare
-
Is the name of the slice to take the place of the current
hot spare in the named pools.
See the metahs(1M)
man page for more information.
Example—Replacing a Hot Spare in One Hot Spare Pool
# metastat hsp003
hsp003: 1 hot spare
c0t2d0s2 Broken 5600 blocks
# metahs -r hsp003 c0t2d0s2 c3t1d0s2
hsp003: Hotspare c0t2d0s2 is replaced with c3t1d0s2
|
In this example, the metastat command makes sure
that the hot spare is not in use. The metahs -r
command replaces hot spare /dev/dsk/c0t2d0s2 with /dev/dsk/c3t1d0s2 in the hot spare pool hsp003.
Example—Replacing a Hot Spare in All 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
|
In this example, the keyword all replaces
hot spare /dev/dsk/c1t0d0s2 with /dev/dsk/c3t1d0s2 in all its associated hot spare pools.
How to Delete a Hot Spare from a Hot Spare Pool
-
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
and follow the instructions. For more information, see the online help.
-
Use the following form of the metastat
command:
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
and follow the 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
|
-
-d
-
Specifies to
delete a hot spare from the hot spare pool named.
-
hot-spare-pool
-
Is the name of the hot spare pool, or the special keyword all to delete from all hot spare pools.
-
current-hot-spare
-
Is the name of the current hot spare that will be deleted.
See the metahs(1M)
man page for more information.
Example—Deleting a Hot Spare from One Hot Spare Pool
# metastat hsp003
hsp003: 1 hot spare
c0t2d0s2 Broken 5600 blocks
# metahs -d hsp003 c0t2d0s2
|
In this example, the metastat command makes sure
that the hot spare is not in use. The metahs -d
command deletes hot spare /dev/dsk/c0t2d0s2 in the hot
spare pool hsp003.
How to Enable a Hot Spare
-
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 the Hot Spares panel and
follow the instructions. For more information, see the online help.
-
Use the following form of the metahs command:
metahs -e hot-spare-slice
|
-
-e
-
Specifies to
enable a hot spare.
-
hot-spare-slice
-
Is the name of the slice to enable.
For more information, see the metahs(1M) man page.
Example—Enabling a Hot Spare
In this example, the 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.