addPartition

Creates a new partition on a device.

Request

<addPartition>
   <deviceID/>
   <partitionType/>
   <startingSector/>
   <numSectors/>
   <freeSpaceID/>
   <hotFixSize/>
   <mirrorID/>
   <label/>
   <ignoreShareState/>
</addPartition>

Reply

All elements in partitionInfo are exact duplicates of the elements in listPartitions. The only difference is that addPartition returns the partitionInfo for the partition that was just created.

<addPartition>
   <partitionInfo>
      <deviceName/>
      <partitionName/>
      <deviceID/>
      <partitionType/>
      <partitionID/>
      <label/>                    
      <startingSector/>
      <numSectors/>
      <logicalPartitionID/>
      <logicalPartitionCapacity/>
      <mirrorID/>
      <hotFixID/>
      <hotFixSize/>
      <hotFixAvailSize/>
      <poolName/>
      <volumes>
         <volumeInfo>
            <volumeName/>
            <volStartingSector/>
            <volNumSectors/>
         </volumeInfo>
      </volumes>
      <raidID/>
      <result value=" ">
         <description/>
      </result>
   </partitionInfo>
</addPartition>

Elements

deviceID

(Required) Specifies the ID of the device on which the new partition should be created. On reply, specifies the device on which the partitions resides, as assigned by Media Manager at boot time.

partitionType

(Required) Specifies the type of partition (see Partition Types).

startingSector

(Required) Specifies the starting sector where the partition begins on the device. If freeSpaceID is specified, startingSector is ignored. Otherwise, Media Manager uses startingSector to locate the free space on the device that contains the sector. Once the free space is loacted, the new partition is created at the beginning of the free space.

numSectors

(Required) Specifies the size (in sectors) of the new partition.

freeSpaceID

(Required) Specifies the partition ID, as returned by listPartitions, of the free space in which the partition is created. If freeSpaceID is nonzero, startingSector is ignored.

hotFixSize

(Required) Specifies the number of sectors to use as the HotFix area for the new partition. If 0, no HotFix is created. If nonzero, the specified number of sectors on the new partition is reserved for HotFix overhead.

On reply, specifies the size (in sectors) of the HotFix area that is reserved to track bad block redirection. If the partition does not have a HotFix object, the size is 0. This element is filled only if partitionType is NSS or traditional NetWare.

mirrorID

(Optional) Specifies the ID of the mirror group to add the partition to. If not included, a mirror object is not created for the partition and the partition can never participate in a mirror group. If NULL is passed, a new mirror group is created for the partition and the new partition is the only member of the group.

On reply, specifies the ID of the mirror group. If the partition does not belong to a mirror group, the ID is 0. This element is filled in the reply only if partitionType is NSS or traditional NetWare.

label

(Optional) Specifies that no check is done to see if the device is marked shareable for clustering. Usually, the server checks to validate that the clustering software is loaded and operational before it allows partitions to be created on a device that is marked shareable.

On reply, specifies an optional label that was assigned to the partition when it was created. If there is no label, an empty element exists in the reply.

ignoreShareState

Specifies that no check is done to see if the device is shared.

deviceName

Specifies the name of the device on which the partition resides, as assigned by Media Manager and the disk driver.

partitionName

Specifies the name of the partition, as assigned by Media Manager and the disk driver.

partitionID

Specifies the physical partition ID, as assigned by Media Manager. The ID represents the partition itself but does not represent any HotFix or mirror objects on the partition.

logicalPartitionID

Specifies the logical partition ID that is used when creating NSS pools or traditional volumes on the partition. If the partition does not have HotFix and mirroring, the ID is the same as the physical partitionID. Otherwise, the ID is the same as the mirrorID. This element is used only if partitionType is NSS or traditional NetWare.

logicalPartitionCapacity

Specifies the actual capacity (in sectors) of the logical partition. If the partition contains HotFix and mirroring objects, the capacity is smaller than the size of the physical partition due to the overhead associated with HotFix. This element is used only if partitionType is NSS or traditional NetWare.

hotFixID

Specifies the ID of the HotFix object. If the partition does not have a HotFix object, the ID is 0. This element is used only is partitionType is NSS or traditional NetWare.

hotFixAvailableSize

Specifies the useable size (in sectors) of the HotFix area that is reserved to track bad block redirection. HotFix has some overhead, so this size is smaller than the size in hotFixSize. If the partition does not have a HotFix object, the size is 0. This element is used only if partitionType is NSS or traditional NetWare.

poolName

Specifies the pool name for an NSS partition that has a pool that uses the partition. This element is used only if partitionType is NSS and if the partition is currently owned by an NSS pool.

volumes

Specifies the traditional volume segments residing on a partition. This element is used only if partitionType is traditional NetWare.

volumeInfo

Specifies information for each volume segment on the partition.

volumeName

Specifies the name of the traditional NetWare volume that owns this segment of the partition.

volStartingSector

Specifies the starting sector number of the piece of the partition that is owned by the volume.

volNumSectors

Specifies the number of sectors that are owned by the volume at the starting sector offset.

raidID

Specifies the media manager device ID of the RAID device that consumes the virtual device partition. This element is used only if partitionType is virtual device.

result

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

description

Specifies a text description of the result.

Example

A nssRequest packet to add an NSS partition is as follows:

<nssRequest>
   <partition>
      <addPartition>
         <deviceID>2</deviceID>
         <partitionType>105</partitionType>
         <startingSector>63</startingSector>
         <numSectors>204800</numSectors>
         <freeSpaceID>12</freeSpaceID>
         <hotFixSize>200</hotFixSize>
         <mirrorID></mirrorID>
      </addPartition>
   </partition>
</nssRequest>

A nssReply packet to the add partition command follows:

<nssReply>
   <partition>
      <addPartition>
         <partitionInfo>
            <deviceName>
               [V312-A0-D2:0] HP 2.13 GB #A2 rev:0180
            </deviceName>
            <partitionName>
               [V312-A0-D2:0-P0] NSS Partition
            </partitionName>
            <deviceID>2</deviceID>
            <partitionType>105</partitionType>
            <partitionID>14</partitionID>
            <label></label>
            <startingSector>63</startingSector>
            <numSectors>204800</numSectors>
            <logicalPartitionID>17</logicalPartitionID>
            <logicalPartitionCapacity>
               204600
            </logicalPartitionCapacity>
            <mirrorID>17</mirrorID>
            <hotFixID>16</hotFixID>
            <hotFixSize>200</hotFixSize>
            <hotFixAvailSize>8</hotFixAvailSize>
         </partitionInfo>
         <result value="0">
            <description/>success</description>
         </result>
      </addPartition>
   </partition>

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