SYNOPSIS
sdxswap -I -c class -d disk [-e delay=msec,nowaitsync]
sdxswap -O -c class -d disk
DESCRIPTION
Use sdxswap to make a disk (excluding a shadow disk) registered with GDS exchangeable and to restore the disk after swapping.
You must be superuser to use this command.
This command is primarily used for swapping faulty disks.
PRIMARY OPTIONS
You can use either of the following options.
swapIn
Returns the disk (specified by disk) to a usable state, and restores its original status and configuration. You must execute the command after a crashed disk has been swapped.
The disk indicates the disk name that was made exchangeable with the -O option. The class indicates the class name with which the disk is registered.
The physical disk size of disk must be equal to or larger than the original physical disk size.
When the highest level group of disk is a mirror group, slice configuration or volume contents is copied as needed, and returns from the sdxswap command once the copying is complete (when using -e nowaitsync option, before the copying process).
If a spare disk is substituted in place of disk, then once the redundancy of all related volumes has been restored, the spare disk is disconnected.
Note
When setting the I/O Response Time Assurance Function, an error may happen when there is not enough memory.
In this case, the following messages are displayed to the standard error output.
ERROR: sfdsk driver returned an error, errno=12
Also, a warning message 22018 (WARNING: sfdsk: failed to open disk, no enough address space: ...) is output to the console.
In this case, perform any of the following action before executing this command.
(a) Restart the system.
(b) Wait until the memory is freed up.
(c) Increase the memory.
Refer to the installation guide for the necessary memory.
Plan the memory increase if selecting (a) or (b).
swapOut
Detaches all slices within the disk (specified by disk), and sets the disk to exchangeable status. This command must be executed before swapping a faulty disk.
The class indicates the class name with which the disk is registered.
If disk is already nonusable, the status is rechecked and a warning message is sent to standard error output.
The following details explain unexchangeable and exchangeable conditions when disk is not connected to a group and when the highest level group of disk is a mirror group, a stripe group, a concatenation group or a switch group.
When volumes exist in disk, the disk cannot be made exchangeable.
When volumes exist in the highest level mirror group of disk and detaching slices within the disk can change the volume configurations and statues, the disk cannot be made exchangeable.
For example, if there are volumes in the highest level mirror group of disk, and if only the disk specified by disk is connected to that group, detaching slices within the disk will change the configurations and statues of the volumes. Therefore, the disk cannot be made exchangeable.
When the highest level group of disk is a stripe group, the disk cannot be made exchangeable by detaching slices within the disk.
When disk is a disk connected to the highest level concatenation group or the active disk connected to a lower level switch group, it cannot be made exchangeable no matter whether or not volumes exist.
When disk is the inactive disk connected to a lower level switch group, it can be made exchangeable no matter whether or not volumes exist.
When disk is the inactive disk, the disk can be made exchangeable regardless whether or not there are volumes.
When disk is the active disk, the disk can be made exchangeable by detaching slices within the disk only if the switch group includes no switch volume or connected inactive disk.
When the switch group includes volumes, remove those volumes in order to make the active disk exchangeable. When it includes the connected inactive disk, perform an active disk switch with the sdxattr -G command and then make the former active disk exchangeable.
SUB OPTIONS
Sub options are as follows:
The class indicates the class name to which disk belongs, where disk is the target of the operation.
The disk indicates the disk name that is the target of the operation.
When restoring the disk, data contained in the volume is copied as needed. This option delays the issuing of the input/output request to the disk at the time of copying, by milliseconds specified by msec.
This option allows you to adjust the influence on the application accessing the volume.
The value is set to 0 by default.
Values from 0 to 1000 may be specified for msec.
Returns the command before the copying is complete.
RETURNED VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a non-zero value is returned.