Symantec logo

Associating subdisks with plexes

Associating a subdisk with a plex places the amount of disk space defined by the subdisk at a specific offset within the plex. The entire area that the subdisk fills must not be occupied by any portion of another subdisk. There are several ways that subdisks can be associated with plexes, depending on the overall state of the configuration.

If you have already created all the subdisks needed for a particular plex, to associate subdisks at plex creation, use the following command:

# vxmake [-g diskgroup] plex plex sd=subdisk,...

For example, to create the plex home-1 and associate subdisks mydg02-01, mydg02-00, and mydg02-02 with plex home-1, all in the disk group, mydg, use the following command:

# vxmake -g mydg plex home-1 sd=mydg02-01,mydg02-00,mydg02-02

Subdisks are associated in order starting at offset 0. If you use this type of command, you do not have to specify the multiple commands needed to create the plex and then associate each of the subdisks with that plex. In this example, the subdisks are associated to the plex in the order they are listed (after sd=). The disk space defined as mydg02-01 is first, mydg02-00 is second, and mydg02-02 is third. This method of associating subdisks is convenient during initial configuration.

Subdisks can also be associated with a plex that already exists. To associate one or more subdisks with an existing plex, use the following command:

# vxsd [-g diskgroup] assoc plex subdisk1 [subdisk2 subdisk3 ...]

For example, to associate subdisks named mydg02-01, mydg02-00, and mydg02-02 with a plex named home-1, use the following command:

# vxsd -g mydg assoc home-1 mydg02-01 mydg02-00 mydg02-01

If the plex is not empty, the new subdisks are added after any subdisks that are already associated with the plex, unless the -l option is specified with the command. The -l option associates subdisks at a specific offset within the plex.

The -l option is required if you previously created a sparse plex (that is, a plex with portions of its address space that do not map to subdisks) for a particular volume, and subsequently want to make the plex complete. To complete the plex, create a subdisk of a size that fits the hole in the sparse plex exactly. Then, associate the subdisk with the plex by specifying the offset of the beginning of the hole in the plex, using the following command:

# vxsd [-g diskgroup] -l offset assoc sparse_plex exact_size_subdisk


  Note   The subdisk must be exactly the right size. VxVM does not allow the space defined for two subdisks to overlap within a plex.


For striped or RAID-5 plexes, use the following command to specify a column number and column offset for the subdisk to be added:

# vxsd [-g diskgroup] -l column_#/offset assoc plex subdisk ...

If only one number is specified with the -l option for striped plexes, the number is interpreted as a column number and the subdisk is associated at the end of the column.

Alternatively, to add M subdisks at the end of each of the N columns in a striped or RAID-5 volume, you can use the following form of the vxsd command:

# vxsd [-g diskgroup] assoc plex subdisk1:0 ... subdiskM:N-1

The following example shows how to append three subdisk to the ends of the three columns in a striped plex, vol-01, in the disk group, mydg:

# vxsd -g mydg assoc vol01-01 mydg10-01:0 mydg11-01:1 \

  mydg12-01:2

If a subdisk is filling a "hole" in the plex (that is, some portion of the volume logical address space is mapped by the subdisk), the subdisk is considered stale. If the volume is enabled, the association operation regenerates data that belongs on the subdisk. Otherwise, it is marked as stale and is recovered when the volume is started.