Use the chdrive command to change the
drive properties.
Syntax
chdrive { -use [ { unused | candidate | spare | failed } ] [ -allowdegraded ] | -task { format | certify | recover } } drive_id
Parameters
- -useunused | candidate | spare | failed
- Describes the role of the drive:
- unused indicates the drive is not in use and will not be used as a spare
- candidate indicates the drive is available for use in an array
- spare indicates the drive can be used as a hot spare if required
- failed indicates the drive has failed.
Note: To create member drives, add the drives to (new) arrays using the
mkarray command.
If a drive fails for a distributed array, the array remains
associated with the failed drive while it is in the failed
state.
- -allowdegraded
- (Optional) Permits permission for a change of drive use to continue, even if a hotspare drive is
not available for the array that the drive is a member of. You cannot specify
-allowdegraded and -task together.
Important: Using -allowdegraded is not recommended.
- -taskformat | certify |
recover
- Causes the drive to perform a task:
- format indicates a drive will be formatted for
use in an array; only permitted when drive is a candidate or has failed
validation.
- certify indicates the drive will be analyzed
to verify the integrity of the data it contains; permitted for any
drive that is a member.
- recover recovers an offline flash drive without losing data; permitted when the
drive is offline because a build is required, or when the drive has failed validation.
- drive_id
- The identity of the drive.
Description
Use this command to change
the drive role, or to start long running drive tasks.
You can use
lsdriveprogress to display progress (percentage) and estimated completion time of
ongoing drive tasks.
When a drive
associated with a distributed array is changed from member to
failed, if the distributed array does not have available rebuild space then it is
degraded. If -allowdegraded is not specified the command fails because of
insufficient rebuild areas . If the -allowdegraded parameter is specified the
command succeeds and the array no longer uses the drive for I/O operations. If a drive is changed
from failed to another configuration the distributed array is forgets about the
drive and creates a missing member that belongs in the member table. Use the
charraymember command to replace the missing member.
An invocation example
chdrive -use spare 1
The resulting output:
No feedback
An invocation example to certify drive 23
chdrive -task certify 23
The resulting output:
No feedback