sdraid command
Use this command to configure and control the optional SD Media RAID Adapter for System x.
The SD Media Adapter consist of dual secure digital (SD) card slots that can support up to two removable SD cards. The SD Media Adapter also features a RAID controller capable of supporting RAID level 1.
- Use of the -driveLun 0 option where immOnly drives exist might result in undesirable consequences and should not be used. If immOnly drives exist use the -driveName option in place of the -driveLun option.
- The IMM CLI displays a logical unit number value of 0 for all immOnly drives.
- The -driveLun option can safely be used for logical unit number values that are greater than or equal to 1.
- The -driveLun option can safely be used for all displayed numerical logical unit number values.
- The IMM displays a value of NA for the logical unit number of immOnly drives.
- immOnly drives should be targeted by the -driveName option.
The following table shows the arguments for the options.
Option | Description | Values |
---|---|---|
-version | This option is used to display the firmware version installed in the adapter. | |
-reset | This option is used to reset the adapter. | |
-getMode | This option is used to check the current mode of operation of the adapter firmware. This option also displays the state of the related RAID services. | |
-setMode | This option is used to configure the mode of operation of the adapter firmware. This option also displays the state of the related RAID services. | Operational, Configuration |
-initializeConfig | This option is used to clear the existing configuration of the SD card and re-initialize the SD card's configuration to the default value. | |
-migrateConfig | This option is used to specify the source SD card that maintains the metadata information (global configuration). This option is also used to set the RAID configuration information. | 1, 2 |
-SDCard | This option is used to display the properties of an installed SD card. | 1, 2 |
-getFreeSpaceInfo | This option is used to display the free space information in the SD cards. | |
-driveLun | This option is used to display the summary information of a drive configured on the adapter. | 0 - 15 |
-driveName | This option is used to display the summary information of a drive configured on the adapter. | Null-terminated name string (maximum of 15 characters). |
-driveList | This option is used to display the summary information of all drives configured on the adapter. | |
-create | This option is used to create a new drive. | |
-delete | This option is used to delete an existing drive. This option can be used with parameters -driveLun or -driveName. | |
-modify | This option is used to modify the properties of an existing drive. | |
-getOwner | This option is used to get information about the current ownership of a specific drive. This option can be used with parameters -driveLun and -driveName. | |
-setOwner | This option is used to set the current ownership of the drive to the IMM2 or the server. This option can be used with parameters -driveLun or -driveName. | |
-help | This option is used to display command usage and option information. |
sdraid [<em className="ph i">options</em>]
options:
-version
-reset
-getMode
-setMode <em className="ph i">mode of operation</em>
-initializeConfig
-migrateConfig <em className="ph i">PrimaryCard number</em>
-SDCard <em className="ph i">card number</em>
-getFreeSpaceInfo
-driveLun <em className="ph i">drive number</em>
-driveName <em className="ph i">drive name</em>
-driveList
-create
-delete
-modify
-getOwner
-setOwner
-help
The following sections provide example usage of each option.
Option -version
This option displays the firmware version (level) installed in the adapter.
system> sdraid -version
Firmware Version = 1.3.2.166
ok
system>
Option -reset
Use this option to reset the adapter.
system> sdraid -reset
Note that this operation will disconnect all of the disks assigned to the
system/OS and halt any file operations currently in progress via the IMM.
Make sure that the system is not currently booted from this device and that
all partition provisioning operations have been completed before continuing.
To perform the reset, issue command: "sdraid -reset -now".
ok
system>
system> sdraid -reset -now
Reset complete
ok
system>
Option -getMode
This option is used to check the current mode of operation of the adapter firmware.
system> sdraid -getMode
SD Media have mismatched RAID Configuration. To preserve data integrity
IMM will remain in Configuration mode until this is manually resolved.
ok
system>
system> sdraid -getMode
The adapter mode is Configuration.
ok
system>
system> sdraid -getMode
The adapter mode is Operational.
ok
system>
Option -setMode
This option is used to configure the mode of operation of the adapter firmware.
system> sdraid -setMode Configuration
Note that this operation will disconnect all of the disks assigned to the
system/OS and halt any file operations currently in progress via the IMM.
Make sure that the system is not currently booted from this device and that
all partition provisioning operations have been completed before continuing.
To perform the mode change, issue command: "sdraid -setMode Configuration -now".
ok
system>
system> sdraid -setMode Configuration -now
The controller mode is Configuration.
ok
system>
system> sdraid -setMode Operational -now
The controller mode is Operational.
ok
system>
Option -initializeConfig
system> sdraid -initializeConfig
Note that this operation will destroy all existing disks on this adapter
on both SD Media cards.
To perform the initialization, issue command: "sdraid -initializeConfig -now"
ok
system>
system> sdraid initializeConfig -now
Global RAID configuration has been set.
ok
system>
Option -migrateConfig
Mandatory parameter | Explanation | Values |
---|---|---|
-primaryCard | The primary card is the source SD card that maintains the metadata. | 1, 2 |
system> sdraid -migrateConfig -primaryCard 1
Any existing data on card (SDCard2) will be lost during this operation.
After this operation, any RAID data on SDCard1 will be synchronized to SDCard2
automatically.
To perform the operation, issue command: "sdraid -migrateConfig -primaryCard
1|2 -now".
ok
system>
system> sdraid -migrateConfig -primaryCard 1 -now
Global RAID configuration has been set.
ok
system>
system> sdraid -migrateConfig -primaryCard 1 -now
Unable to set RAID configuration. (SetRaidConf[4A] Cannot configure when
RAID operation is started).
ok
system>
Option -SDCard
Mandatory parameter | Explanation | Values |
---|---|---|
-SDCard | The SD card number. | 1, 2 |
Output | Explanation | Values |
---|---|---|
Status | The state of the SD card. | Status values are as follows:
|
FRU number | The value as read from the SD card. | Alphanumeric value |
Serial number | The value as read from the SD card. | Alphanumeric value |
Manufacturer | The SD card manufacturer name. | SD card manufacturer names are as follows:
|
Is primary | Indicate if this SD card is the primary host for the RAID drives. | true, false |
Capacity | The size of the SD card in Megabytes (MB). | Numeric value |
Largest available space | The size of the maximum drive in MB that can be created on the SD card. | Numeric value |
Drive count | The number of drives that are configured on the SD card. | 1 - 8 |
Drive n name | The volume name for drive n. | Null-terminated name string up to 15 characters for the name of the drive. |
system> sdraid -SDCard 1
SDCard
Status = Healthy
FRU Number = 00SE32G
Serial Number = bd5ff15
Manufacturer = SanDisk
Is Primary = true
Capacity = 30436 Mbytes
Largest Available Space = 30436 Mbytes
DriveCount = 2
Drive 1 Name = MDRIVE_1
Drive 2 Name = MDRIVE_2
ok
system>
Option -getFreeSpaceinfo
Output | Explanation | Values |
---|---|---|
Free block region n | The index number of the free region from the list of free block regions for the two SD cards. | where n is a numeric value |
SDCard | The SD card that the region is located on. | 1, 2 |
Start address | The start address for the free block region. | Numeric value |
Region size | This is the free block region size. | Region size values are as follows:
|
system> sdraid -getFreeSpaceInfo
Free Block Region [1]
SDCard = 1
Start Address = 4259840
Region Size = 28356 MBytes
Free Block Region [2]
SDCard = 2
Start Address = 0
Region Size = 1060 MBytes
Free Block Region [3]
SDCard = 2
Start Address = 6430720
Region Size = 27296 MBytes
system>
Option -driveLun
Mandatory parameter | Explanation | Values |
---|---|---|
-driveLun | The logical unit number of the drive. | 0 - 15 |
Output | Explanation | Values |
---|---|---|
Drive name | The name of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
Target | The target where the drive is located. | SDCard1, SDCard2, mirror |
LUN | The logical unit number of the drive. | 0 - 15 |
Size n | The size of the drive in MB. | where n is the number of MB |
Status | The status of the drive. | Ok, Fail, Degraded, Optimal |
Owner | The current owner of the drive. | imm, immOnly, system, systemOnly |
Read only | Flag to indicate if the drive is write-protected. | true, false |
Removable | Flag to indicate if the drive can be a removable USB drive for the server. | true, false |
system> sdraid -driveLun 1
Drive Name = PAIR_B_02
Target = mirror
LUN = 1
Size = 1040 MBytes
Mode = RAID
Status = Optimal
Owner = system
System Options
Read Only = false
Removable = true
ok
system>
Option -driveName
Mandatory parameter | Explanation | Values |
---|---|---|
-driveName | The volume name for the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
system> sdraid -driveName PAIR_B_02
Drive Name = PAIR_B_02
Target = mirror
LUN = 1
Size = 1040 MBytes
Mode = RAID
Status = Optimal
Owner = system
System Options
Read Only = false
Removable = true
ok
system>
Option -driveList
Output | Explanation | Values |
---|---|---|
Index | The index number of the drive on the SD card. | 1 - 8 |
LUN | The logical unit number of the drive. | 0 - 15 |
Drive name | The name of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
Type | The type of drive. | RAID, non-RAID |
Size n | The size of the drive in MB. | where n is the number of MB |
Owner | The current owner of the drive. | imm, immOnly, system, systemOnly |
Access | Flag to indicate if the drive is write-protected. | RW, RO |
Removable | Flag to indicate if the drive can be a removable USB drive for the server. | yes, no |
system> sdraid -driveList
SDCard 1
Index LUN Name Type Size(MB) Owner Access Removable
1 2 DRIVE_03 RAID 2048 system RW no
2 1 DRIVE_02 non-RAID 1024 system RW no
SDCard 2
Index LUN Name Type Size(MB) Owner Access Removable
1 2 DRIVE_03 RAID 2048 system RW no
2 0 DRIVE_01 non-RAID 1024 imm RW no
ok
system>
Option -create
Mandatory parameter | Explanation | Values |
---|---|---|
-driveName | The name of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
-sizeMB n | The size of the drive in MB. | where n is the number of MB |
-target | The card location for the drive. This is used to specify if the drive is to be created as mirrored on both SD cards or as a non-raid drive on one of the specified SD cards. | SDCard1, SDCard2, mirror |
-removable | The drive is mapped to a fixed LUN. | 0, 1 |
-owner | The owner of the drive. | imm, immOnly, system, systemOnly |
-systemReadOnly | Flag to indicate if the drive is read-only when it is owned by the system. | 0, 1 |
Optional parameter | Explanation | Values |
---|---|---|
-LUN | The LUN number assigned to the drive that is being created, LUN 0 is the bootable drive as seen by the server. | 0 |
system> <strong className="ph b">sdraid -create -driveName DRIVE_01 -sizeMB 1024 -target SDCard2
-removable 0 -owner imm -systemReadOnly 0 -LUN 0</strong>
successfully created a drive.
Successfully set drive owner to imm
ok
system>
system><strong className="ph b"> sdraid -create -driveName DRIVE_02 -sizeMB 1024 -target SDCard1
-removable 0 -owner system -systemReadOnly 0</strong>
successfully created a drive.
Successfully set drive owner to system
ok
system>
Option -delete
Mandatory parameter | Explanation | Values |
---|---|---|
-driveName | The volume name for the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
-driveLun | The logical unit number for the drive. | 0 - 15 |
system> sdraid -delete driveName DRIVE_03
successfully deleted drive DRIVE_03
ok
system>
system> sdraid -delete -driveLun 2
successfully deleted drive DRIVE_03
ok
system>
system> sdraid -delete -driveLun 2
The controller is presently not in Configuration mode.
This command option can only be used in Configuration mode.
ok
system>
Option -modify
Mandatory parameter | Explanation | Values |
---|---|---|
-driveName or -driveLun | The volume name or the logical unit number of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
Optional parameter | Explanation | Values |
---|---|---|
-systemReadOnly | Flag to indicate if the drive is read-only when it is owned by the system. | 0, 1 |
-removable | The drive is mapped to a fixed logical unit number. | 0, 1 |
-owner | The owner of the drive. | imm, immOnly, system, systemOnly |
system> sdraid -modify -driveLun 0 -removable 1
successfully configured drive DRIVE_03
ok
system>
system> sdraid -modify -driveLun 0 -owner imm
successfully configured drive DRIVE_03
Successfully set drive owner to imm
ok
system>
system> sdraid -modify -driveLun 0 -owner system
The controller is presently not in Configuration mode.
This command option can only be used in Configuration mode.
ok
system>
Option -getOwner
Mandatory parameter | Explanation | Values |
---|---|---|
-driveLun | The logical unit number of the drive. | 0 - 15 |
-driveName | The volume name of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
system> sdraid -getOwner -driveLun 1
Current owner of drive DRIVE_02 is system
ok
system>
system> sdraid -getOwner -driveName DRIVE_01
Current owner of drive DRIVE_01 is imm
ok
system>
Option -setOwner
Mandatory parameter | Explanation | Values |
---|---|---|
-driveLun | The logical unit number of the drive. | 0 - 15 |
-driveName | The volume name of the drive. | Null-terminated name string up to 15 characters for the name of the drive. |
system> sdraid -setOwner imm -driveLun 2
Successfully set drive owner to imm
ok
system>
system> sdraid -setOwner system -driveName DRIVE_01
Successfully set drive owner to system
ok
system>
Option -help
This option is used to display the command usage and options.
system> sdraid h
system> sdraid -help
Using the sdraid command without an option
- Firmware version
- Global RAID configuration settings
- RAID device information
system> sdraid
SD Media Adapter for System x
Hardware Revision = 3.0
Firmware Version = 1.3.2.166
Serial Number =
FRU Number = 00AN748
Mode = Operational
SDCard1
Status = Healthy
Capacity = 30436 MBytes
FRU Number = 00SE32G
SDCard2
Status = Healthy
Capacity = 30436 MBytes
FRU Number = 00SE32G
system>