PRIMECLUSTER Global Disk Services Configuration and Administration Guide 4.1 (Linux)
|
Contents

|
D.2 sdxdisk - Disk operations
SYNOPSIS
sdxdisk -C -c class -g group -d disk,...
[-a attribute=value[,attribute=value]] [-e delay=msec ]
sdxdisk -D -c class -g group -d disk
sdxdisk -M -c class -a attribute=value[,attribute=value,...]
-d device=disk [:type ] [,device=disk [:type ],...] [-e chkps]
sdxdisk -R -c class -d disk
DESCRIPTION
Use sdxdisk to perform operations on disk objects (excluding shadow disk) specified by disk.
You must be superuser to use this command.
PRIMARY OPTIONS
You can use either of the following options.
- -C
- Connect
- Connects one or more disks (single disks or undefined disks) specified by disk,... to a group specified by group. The class indicates the class name with which disk is registered. To connect disk to a group other than a switch group, specify a disk connected to all the nodes that belong to the scope of class.
If no group with the same name as group exists, a new group is created. One class cannot include switch type groups and groups of other types together.
You cannot connect a spare disk to a group. You cannot connect a single disk to an existing group. Also, multiple single disks cannot be connected to the same group simultaneously.
The disk attribute will be changed to match the attribute of the group (mirror, stripe, concatenation, or switch) it is connected to. Disks and lower level groups connected to a group are mirrored, striped, concatenated or made switchable according to the type attribute.
Details on connecting a disk to a mirror group, a stripe group, a concatenating group and a switch group are explained below.
- - When connecting to a mirror group
- Disks and lower level groups connected to the same mirror group will mirror each other. When only one disk or one lower level group is connected, the volume created within that mirror group will not be mirrored. When configuring a mirroring environment with "n"-way multiplexing, "n" numbers of disks or lower level groups must be connected. A maximum of eight-way multiplex mirroring is supported.
When one or more volumes already exist within the mirror group specified by group, the slice configuration of disk or lower level group that is already connected to group will be automatically copied to the newly connected disk. Also, when there is an activated volume within group, volume data in addition to the slice configuration will be automatically copied upon returning from the sdxdisk command, therefore increasing the mirroring multiplicity.
By connecting a single disk with single volumes to a mirror group, single volumes will be changed to mirror volumes.
The available size of the mirror group (available capacity as volumes) will be the same as the available size of the smallest disk or the lower level group connected to the mirror group.
- When a keep disk is connected, the available size of the group will be the same as the available size of the keep disk. If connecting disk results in decreasing the available size of group, a warning message will be sent to standard error output.
- - When connecting to a stripe group
- Disks specified by disk,... will be connected to group in the order they are listed. Disks and lower level groups connected to the same stripe group will each configure a stripe column, and will be striped in the order they were connected. When only one disk or one lower level group is connected, a volume cannot be created within that stripe group. When striping "n" number of columns, "n" number of disks or lower level groups must be connected. A minimum of two columns and a maximum of 64 columns are supported.
When a stripe group specified by group already exists, stripe columns will be added after the existing stripe columns in group, in the order they are specified by disk,... However, you cannot increase stripe columns by connecting disks to stripe groups with volumes, or to stripe groups connected to a higher level group.
The available size of the stripe group (available capacity as volumes) equals the available size of the smallest disk or the lower level group connected to the stripe group multiplied by the number of stripe columns and rounded down to the common multiple of stripe width times stripe columns and cylinder size. If connecting disk decreases the available size of group, a warning message will be sent to standard error output.
You cannot connect a single disk to a stripe group.
- - When connecting to a concatenation group
- Disks connected to the same concatenation group specified by disk,... will be concatenated in the order they are listed. A maximum of 64 disks can be concatenated.
The available size of the concatenation group (available capacity as volumes) equals the total of the available size of disks connected to the concatenation group.
The available size of the group can be increased by connecting disks to the existing concatenation group. When a concatenation group specified by group already exists, disks will be added in the order they are specified by disk,... after the disk that was last concatenated in group. However, you cannot add a disk to a concatenation group that is connected to the highest level stripe group which already has a volume. Also if the concatenation group specified by group is connected to a stripe group connected to a mirror group, a disk cannot be added.
You cannot connect a single disk to a concatenation group.
- - When connecting to a switch group
- One of two disks connected to a switch group becomes the active disk and the other one becomes the inactive disk. Use the sdxattr -G command to switch the disks from active to inactive and vice versa. A switch group can connect a maximum of two disks. If only one disk is connected, the disk acts as the active disk and an active disk switch cannot be performed.
To create a switch group specified by group, specify the active disk in the -a actdisk option. The other disk not specified by the -a actdisk option becomes the inactive disk. When connecting disk to an existing switch group specified by group, the disk becomes the inactive disk.
Unlike mirror groups, even if a switch group specified by group already includes volumes, synchronization copying to the newly connected disk is not performed. To perform a disk switch for continuous services in the event of an error in the active disk, previously create copies of data from the active disk to the inactive disk with the disk unit's copy function and so on.
The available size of a switch group (capacity available for volumes) conforms to the available size of the smallest disk connected to the switch group. If the available size of group decreases as a result of disk connection, a warning message is sent to standard error output.
In classes that include disks other than undefined disks or groups other than switch groups, switch groups cannot be created.
class must be a shared class of which scope includes 2 nodes. The physical scope of the active disk and the inactive disk must also meet either the following conditions.
- The active disk and the inactive disk are connected to both the nodes included in the scope of class and are not connected to nodes not included in that scope.
- The active disk is connected to only one of the nodes included in the scope of class and the inactive disk is connected to the other node included in that scope.
- -D
- Disconnect
- Disconnects a disk (including a spare disk) specified by disk from a group specified by group.
- The class indicates the class name with which the disk is registered, and the group indicates the group name to which disk is connected.
The disconnected disk will return to its original type attributes (single disk or undefined disk).
If only disk is connected to group, group will automatically be removed upon disconnecting disk. However, when disk is the only object connected to group and group is connected to a higher level group, disconnection will result in an error. In such case, disconnect group from the higher level group using the sdxgroup -D command, and then disconnect disk.
You cannot disconnect disk if the disconnection will result in a change in the status of any of the existing volumes within group.
Conditions on when you cannot disconnect a disk from a mirror group, a stripe group, a concatenation group or a switch group are explained below.
- - When disconnecting from a mirror group
- For example, you cannot disconnect disk from a mirror group if one or more volumes exist within the mirror group specified by group, and disk is the only object connected to group.
- - When disconnecting from a stripe group
- You cannot disconnect a disk from a stripe group with one or more existing volumes, or from a stripe group connected to a higher level group.
- - When disconnecting from a concatenation group
- The only disk you can disconnect from a concatenation group is the disk that was concatenated last.
Disks containing volume data cannot be disconnected from a concatenation group.
You cannot disconnect a disk from a concatenation group that is connected to the highest level stripe group with one or more existing volumes. Also, if the concatenation group specified by group is connected to a stripe group connected to a mirror group, the disk cannot be disconnected.
- - When disconnecting from a switch group
- Inactive disks can be disconnected regardless whether or not volumes exist.
The active disk can be disconnected only if the switch group includes no volume or inactive disk.
If the switch group includes volumes, before disconnecting the active disk, remove those volumes. If the switch group includes the inactive disk, switch the active disk to it with the sdxattr -G command and then disconnect the former active disk.
- -M
- Make
- Registers one or more physical disks, specified by device, with class. The class gives the name of the destination class. Once physical disks have been registered, they can then be managed using GDS. A disk managed by GDS is called an SDX disk. Users will use the disk name specified by disk to perform operations on the disk.
If no class with the name specified by class already exists, then one is automatically created.

Since the sdxdisk command initializes the registered physical disks, when registering a physical disk containing data, you must first create data backup.
- -R
- Remove
- Removes a disk specified by disk from a class specified by class. The class indicates the class name with which the disk is registered.
Once the disk is removed, it can no longer be managed using GDS.
When the last disk is removed from a class, that class definition is automatically removed.
A disk cannot be removed when a volume exists within disk, or when disk is connected to a group.
If removal of disk will result in class closure, the disk cannot be removed. The class will be closed when it includes:
- less than 3 disks in ENABLE status and no disk normally accessible
- three to 5 disks in ENABLE status and less than 2 disks normally accessible
- six or more disks in ENABLE status and less than 3 disks normally accessible
SUB OPTIONS
SUB OPTIONS are as follows:
- -a attribute=value[,attribute=value] (when using -C)
- When using the -C option and defining a new group name with the -g option, a new group is automatically created. Using this option sets the attribute of the created group to value. The attribute indicates the attribute name, and value indicates the attribute value. Always separate attribute and value with an equal (=) sign. When indicating multiple attributes, specifiers should be combined using commas(,) as the delimiter.
If no group is created, indicating a different attribute value from the existing group will result in an error. To change the attribute value of an existing group, use the sdxattr -G command.
You can indicate the following combination to attribute and value.
- If multiple attributes are indicated and an error results because of any part of them, the entire process is canceled.
- type=mirror, type=stripe, type=concat or type=switch(default is mirror)
- Sets type attribute of group. When class is not a shared class of which scope includes 2 nodes, specifying "switch" will also result in an error.
- mirror
- Sets type attribute to "mirror".
- stripe
- Sets type attribute to "stripe".
- concat
- Sets type attribute to "concatenation".
- switch
- Sets type attribute to "switch".
- width=blks (default is 32)
- Sets the stripe width of group. The blks indicates the stripe width in blocks (base 10). One block is 512 bytes. For blks, you can indicate an integer (one and larger) that is two raised to the power, which is equal to or smaller than the available size of the smallest disk specified by disk,.... If group is not a stripe group, this option will result in an error.
- actdisk=disk
- Sets the active disk of group. Specify a disk name of the active disk into disk. When group is an existing group, not specifying the -a type=switch option, or specifying a disk other than that specified by-d option into disk, will result in an error.
- -a attribute=value[,attribute=value,...] (when using -M)
- When using the -M option and defining a new class name with the -c option, a class is automatically created. Using this option sets the created class attribute to value.
The attribute indicates the attribute name, and the value indicates the attribute value.
- Always separate attribute and value with an equal (=) sign. Specifiers should be combined using commas(,) as the delimiter. If no class is created, this option is ignored.
- To change the attributes of an existing class, use the sdxattr -C command.
You can use the following attribute and value pairs in any combination.
- If multiple attributes are specified and an error results because of any part of them, the entire process is canceled.
- type=shared
- Sets the attributes of class type.
- shared
- Sets the type attribute to "shared."
- By combining this with the scope attribute, the objects in the class can be shared among multiple nodes including the current node.
A shared type class can include physical disks connected to all the nodes that belong to the scope. When the scope includes 2 nodes, disks connected to only one node in the scope can be registered as undefined disks.
- scope=node [ :node:... ]
- Sets the node set which share the class whose type attribute is specified to be "shared".
In node, indicates a node identifier that is defined by PRIMECLUSTER.
- hs=on or hs=off (default is on)
- It sets the operation of the hot spare.
- on
- Enables the hot spare.
- off
- Disables the hot spare. If the operation mode is set to off, spare disk automatic connection is restrained.
- hsmode=exbox or hsmode=bybox (default is exbox)
- Sets the spare disk selection mode for automatic connection by hot spare.
- exbox
- Sets the spare disk selection mode to the external mode.
If an I/O error occurs in a disk of a disk array unit, this method selects a spare disk that belongs to a different disk case from that of the failed disk. If an I/O error occurs in a disk irrelevant to a disk array unit (such as an internal disk), it selects a spare disk that is connected to a different controller from that of the failed disk. When no applicable unconnected spare disk is found there, a spare disk that belongs to the same disk case or is connected to the same controller as that of the disk with the I/O error is selected.
- bybox
- Sets the spare disk selection mode to the internal mode.
If an I/O error occurs in a disk of a disk array unit, this method selects a spare disk that belongs to the same disk case as that of the failed disk. If an I/O error occurs in a disk irrelevant to a disk array unit (such as an internal disk), it selects a spare disk that is connected to the same controller as that of the failed disk. When no applicable unconnected spare disk is found there, spare disk automatic connection is restrained.
- -c class
- The class indicates the class name to which the disk is registered or is to be registered, where the disk is the target of the operation.
- -d device=disk [:type] [,device=disk [ :type ],...] ( when using -M )
- The device indicates the name of the physical disk, the disk, the name of the disk, and type, the type attribute of the disk.
- The device must always be followed by an equal sign (=), and if a type is given, it is delimited from disk by a colon (:).
- To register multiple devices, combine multiple definitions with a comma (,) as the delimiter.
The physical disk name can be specified with one of the following formats:
sdX ( for normal hard disks )
emcpowerX ( for emcpower disks )
- X indicates the device identifier.
- The type can be indicated as one of the following. If no type is indicated, the default value of undef (undefined disk) is used. If device is not connected to part of nodes included in the scope of class, or if a switch group exists in class, specifying a type other than "undef" will also result in an error.
- single
- Single disk. Single volumes can be created on it.
- spare
- Spare disk.
- undef
- Undefined disk.
- When "spare" is specified for type, and the available size of device is smaller than the available size of the smallest mirror group in class, a warning message notifying that the hot spare function may not be available will be sent to standard error output.
When "single" is specified for type, device will be registered as a single disk.
For a "single" disk, you can create single volumes on it using the sdxvolume command without connecting the disk to any group.
- -d disk (when using -D, -R)
- The disk indicates the disk name that is the target of the operation.
- -d disk,... (when using -C)
- The disk indicates the disk name that is the target of the operation. To indicate multiple disks, separate each disk name with a comma (,) as the delimiter.
- -e chkps (when using -M)
- Registers device with class even if the private slice exists in the device, as far as disk identification information (class and disk names) stored in the private slice matches identification information of a disk already registered with the class. For example, if device contains a copy of the private slice of a disk that is already registered with class, to register the device to the class, turn on this option.
- -e delay=msec (when using -C)
- When a disk is connected to a mirror group, data contained in the volume will be 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, allowing adjustment for 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.
- If group is not a mirror group, this option is ignored.
- -g group (when using -C,-D)
- The group indicates the group name to which the disk is connected, or is to be connected, where disk is the target of the operation.
RETURNED VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a non-zero value is returned.
All Rights Reserved, Copyright(C) FUJITSU LIMITED 2005