addRAID

Creates a software RAID device form one or more free spaces. Currently, only RAID type 0 is supported. However, other RAID types will be supported in the future. Note that all segments in a software RAID device must be exactly the same size.

Request

<addRAID>
   <stripeSize/>
   <raidType/>
   <raidSegments>
      <segment>
         <deviceID/>
         <freeSpaceID/>
         <startingSector/>
         <numSectors/>
      </segment>
   </raidSegments>
</addRAID>

Reply

<addRAID>
   <result value=" ">
      <description/>
   </result>
   <partialResult value=" ">
      <description/>
      <partitionsRequested/>
      <partitionsCreated/>
      <partitionsAdded/>
      <partitionsStranded/>
      <maxPartitions/>
   </partialResult>
</addRAID>

Elements

stripeSize

Specifies the strip size for the RAID device.

raidType

Specifies the type of RAID. For example, 0 for a RAID 0 device.

raidSegments

Specifies the list of RAID segments to add to the RAID device.

segment

Repeats for each RAID segment to add.

deviceID

Specifies the device ID on which the segment is created.

freeSpaceID

Specifies the ID of the free space partition of the device from which to consume space.

startingSector

Specifies the starting sector offset within the free space partition of the segment to include.

numSectors

Specifies the number of sectors to include.

result

Specifies an error value or 0 (for no error).

description

Specifies a text description of the result.

partialResult

(Optional) Specifies what happened and why not all of the segments were added. It is possible that the RAID device was created but not all of the requested segments were successfully added. In this case, result is zOK and this element specifies more details about what occurred.

partitionRequested

Specifies the number of partitions that were originally supposed to be added to the RAID device.

partitionsCreated

Specifies the number of partitions that were successfully created with the intent to add them to the RAID device.

partitionsAdded

Specifies the number of partitions that were successfully added to the RAID device.

partitionsStranded

Specifies the number of partitions that were created but could not be successfully added to the RAID device. These partitions were, for some reason, not able to be deleted either.

maxPartitions

(Optional) Specifies that one or more partitions were not added to the RAID device because the maximum number of RAID segments was exceeded on the device.

Attributes

value

Specifies the first reason why the operation partially failed.

Example

The following example creates a RAID 0 device with two segments: one on device 2 and one on device 3:

<nssRequest>
   <raid>
      <addRAID>
         <stripeSize>65536</stripeSize>
         <raidType>0</raidType>
         <raidSegments>
            <segment>
               <deviceID>2</deviceID>
               <freeSpaceID>7</freeSpaceID>
               <startingSector>208845</startingSector>
               <numSectors>102400</numSectors>
            </segment>
            <segment>
               <deviceID>3</deviceID>
               <freeSpaceID>14</freeSpaceID>
               <startingSector>197321</startingSector>
               <numSectors>102400</numSectors>
            </segment>
         </raidSegments>
      </addRAID>
   </raid>
</nssRequest>

A nssReply packet to the add RAID command follows:

<nssReply>
   <raid>
      <addRAID>
         <result value="0">
            <description/>success</description>
         </result>
      </addRAID>
   </raid>

   <result value="0">
      <description/>zOK</description>
   </result>
</nssReply>