UsMan's WoRkSpAce

Thursday, November 23, 2006

Veritas Volume Manager how-to

Volume virtual device consists of plexes which in turn consists of one or multiple sub-disks. Sub-disks are carved from VM disks, which are physical disks under the control of VxVM. VM disk contains public and private regions.

In non-layered volume, sub-disks are mapped to VM disks. In layered volume sub-disks are mapped to underlying volumes. Columns consist of one or more sub-disks. VxVM manipulates stripes in terms of columns and stripe width.


VM disk initialization destroys data on disk. Disk encapsulation allows VM control without destroying data. It is used for importing non-VM disks. vxdiskadm command asks for hot-relocation use (hotuse), cds (cross-platform data sharing), disk name etc during disk initialization. Encapsulation of disk would require a reboot of system. VM will place entries in /etc/vfstab file. vxdiskadd command can be used in place of vxdiskadm. Volumes in encapsulated root disk are not re-sizable. Encapsulation requires free space on disk to accommodate private regions. Normally root disks that are to be mirrored are encapsulated.

rootvol in bookdg disk group must be used for booting.

vxrecover command is used for volume recovery operations. To start recovery in the background after starting volumes, use vxrecover -g [diskgroup] -sb

Cross-platform data sharing disk groups can be ported between different OS, like Solaris, HP-UX, Linux, AIX etc.

There is a concept of disk group version number. Version number can be upgraded by vxdg upgrade command. Newer versions support new features.

vxdctl command is the interface to vxconfigd daemon which writes changes to configuration database on disk. Configuration database is stored in the private region of various devices in each disk group for redundancy. To find the disks with configuration database, use, vxdg list sunonedg |egrep "config disk.*clean online". vxprint -ht command is used to print the contents of configuration database. In VxVM 4.x and later, vxconfigbackupd daemon backs up configuration database and disk headers, whenever there is a change. It keep backup copies in /etc/vx/cbr/bk directory. vxconfigrestore command can be used to restore the backup. It allows the administrator to verify the restored config before commiting it.

Disk private region (disk header) contains diskid to identify disk, disk group id to identify the disk group, a set of flags to indicate status and intended use of disk and a hostid. It can be printed by passing veritas device name to vxdisk, e.g vxdisk list c1t1d0

vxrelocd daemon detects failures and relocates sub-disks. By default, it is configured to send a mail to root user in case of device and veritas object failure. A forwarder can be defined for root to forward mails to another account. vxreattach command reattach disk drives that have once again become accessible. Deport and import of disk group can enable a disabled disk group.

Useful commands:

To determine mapping between physical disk device paths and VM disks labels,
vxdisk path

To monitor currently running vxvm tasks,
vxtask list

To scan and configure new disk devices
vxdiskconfig

vxdisk can also be used for scanning disks, 'vxdisk scandisks'


To change naming scheme from enclosure-based to operating system based and vice versa,

vxddladm set namingscheme=[ebn|osn]

0 Comments:

Post a Comment

<< Home