Creating a volume on specific disks

Veritas Volume Manager (VxVM) automatically selects the disks on which each volume resides, unless you specify otherwise. If you want to select a particular type of disks for a certain volume, you can provide the storage specifications to vxassist for storage allocation.

For more infornation, see the Storage Specifications section of the vxassist(1M) manual page.

See Customizing disk classes for allocation.

See Specifying allocation constraints for vxassist operations with the use clause and the require clause.

If you want a volume to be created on specific disks, you must designate those disks to VxVM. More than one disk can be specified.

To create a volume on a specific disk or disks, use the following command:

# vxassist [-b] [-g diskgroup] make volume length \
  [layout=layout] diskname ...

Specify the -b option if you want to make the volume immediately available for use.

For example, to create the volume volspec with length 5 gigabytes on disks mydg03 and mydg04, use the following command:

# vxassist -b -g mydg make volspec 5g mydg03 mydg04

The vxassist command allows you to specify storage attributes. These give you control over the devices, including disks and controllers, which vxassist uses to configure a volume.

For example, you can specifically exclude the disk mydg05.

Note:

The ! character is a special character in some shells. The following examples show how to escape it in a bash shell.

# vxassist -b -g mydg make volspec 5g \!mydg05

The following example excludes all disks that are on controller c2:

# vxassist -b -g mydg make volspec 5g \!ctlr:c2

If you want a volume to be created using only disks from a specific disk group, use the -g option to vxassist, for example:

# vxassist -g bigone -b make volmega 20g bigone10 bigone11

or alternatively, use the diskgroup attribute:

# vxassist -b make volmega 20g diskgroup=bigone bigone10 \
   bigone11

Any storage attributes that you specify for use must belong to the disk group. Otherwise, vxassist will not use them to create a volume.

You can also use storage attributes to control how vxassist uses available storage, for example, when calculating the maximum size of a volume, when growing a volume or when removing mirrors or logs from a volume. The following example excludes disks mydg07 and mydg08 when calculating the maximum size of a RAID-5 volume that vxassist can create using the disks in the disk group mydg:

# vxassist -b -g mydg maxsize layout=raid5 nlog=2 \!mydg07 \!mydg08

It is also possible to control how volumes are laid out on the specified storage.

vxassist also lets you select disks based on disk tags. The following command only includes disks that have a tier1 disktag.

# vxassist -g mydg make vol3 1g disktag:tier1

See the vxassist(1M) manual page.

More Information

Specifying ordered allocation of storage to volumes