VERITAS Volume Manager


Basic Concepts


To bring a disk under Volume manager control means that Volume Manager creates virtual objects and establishes logical connections between those object and the underlying physical objects, or disk.

Volume manager removes all of the partition table entries from the VTOC, and then rewrites the VTOC and creates two partitions on the physical disk. One partition contains the private region and the other contains the public region.


Private region: It stores information about disk headers, configuration copies, and kernel logs that Volume Manager uses to manage virtual objects. The default size of the private region is 2048. Tag 15 always used for this region.


Public region: It consists the remainder of the free space on the disk, that Volume Manager can use to assign a volume and is where application store the data. Tag 14 always used for this region .


How VxVM Presents the Disks in a Disk Array as Volumes to the Operating System


Volume Manager virtual object


VM Disks

When you place a physical disk under VxVM control, a VM disk is assigned to the

physical disk. A VM disk is under VxVM control and is usually in a disk group. Each VM disk corresponds to at least one physical disk or disk partition. A VM disk typically includes a public region (allocated storage) and a private region where VxVM internal configuration information is stored. Each VM disk has a unique disk media name (a virtual disk name).


Disk Groups

A disk group is a collection of VM disks that share a common configuration. A disk group configuration is a set of records with detailed information about related VxVM objects, their attributes, and their connections. Disk groups allow you to group disks into logical collections. The default disk group is rootdg (or root diskgroup),


Subdisks

A subdisk is a set of contiguous disk blocks. A block is a unit of space on the disk. VxVM allocates disk space using subdisks. A VM disk can be divided into one or more subdisks.The default name for a VM disk is disk ## (such as disk01) and the default name for a subdisk is disk##-##.


Subdisk Example


Plexes

VxVM uses subdisks to build virtual objects called plexes. A plex consists of one or more

subdisks located on one or more physical disks. For example, see the plex vol01-01.


Example of a Plex


Volumes

A volume is a virtual disk device that appears to applications, databases, and file systems

like a physical disk device, but does not have the physical limitations of a physical disk

device. A volume consists of one or more plexes, each holding a copy of the selected data

in the volume.

Note VxVM uses the default naming conventions of vol ## for volumes and

vol ##-## for plexes in a volume.


Example of a Volume




Example: Connections between VERITAS Volume Manager virtual objects and how they relate to physical disks.

Volume Layouts

Volume Layout is the way plexes are configured to remap the volume address space through which I/O is redirected at run-time. Volume layout are based on the concept of disk spanning, which is the ability to logical combine physical disks in order to store data across multiple disks.

Supported volume layouts include:


VXVM Daemons or process



VxVm Setup

When you install and setup VxVM installation program, it create the root disk group rootdg. The rootdg disk group is required so that VxVM configuration daemon (vxconfigd) can start up in enabled mode.

When you place a disk under Volume manager control, you can either preserve the data that exists on the physical disk (encapsulation) or eliminate all of the data on the physical disk (initialization).


Disk Configuration stages in VXVM

  1. Initialize the disk

  2. Assign a disk to disk group

  3. Create volume &assign disk space to volumes


Step by Step Disk configuration in VXVM

    1. Initialize the disk

$ vxdisksetup –i c0t0d0

    1. Create the diskgroup

$ vxdg init mydg mydg01=c0t0d0

    1. Add disks to diskgroup

$ vxdg –g mydg adddisk mydg02=c0t1d0

    1. Create volume & assign disk spaace

$ vxassist –g mydg make myvol 300M mydg01 mydg02

    1. create a filesystem for newly created Volume

$ mkfs –F vxfs /dev/vx/rdsk/mydg/myvol

    1. Create the mount point and attach this volume to that

$ mkdir /data

$ mount –F vxfs /dev/vx/dsk/mydg/myvol /data


Day to Day Operation Commands


Adding and Managing Disks in VxVM


# vxdisksetup –i c1t0d0

# vxdg –g newdg addisk newdg02=c2t0d0

# vxdisk list

# vxdisk list datadg01

# vxdisk –s list

# prtvtoc /dev/rdsk/c1t0d0s2

# vxevac –g datadg datadg02 datadg03

# vxdg –g newdg rmdisk newdg02

# vxdiskunsetup c1t0d0


# vxedit –g datadg rename datadg01 datadg03

#vxdg rmdisk disk04

#vxdg -g mktdg adddisk mktdg02=c0t3d0


Managing Disks Groups in VxVM

# vxdg init newdg newdg01=c1t1d0

# vxdisk list

# umount /filesystem1

# vxdg deport diskgroup

# vxdg deport newdg


# vxdg –n newrdg deport newdg

# vxdg –h serv1 deport newdg

# vxdg import diskgroup

# vxdg –n newerdg import newdg

# vxdg –t –n newerdg import newdg

# vxdg –f import newdg


Eg:-To rename the disk group datadg to mktdg


# vxdg –n mktdg deport datadg

# vxdg import mktdg

# vxvol –g mktdg startall


Or


# vxdg deport datadg

# vxdg –n mktdg import datadg

# vxvol –g mktdg startall



# vxdisk –s list

# vxdg list

# vxdisk –o alldgs list

# vxdg free ( for all disk group)

# vxdg –g diskgroup free (for a specific disk group)

# vxdg list newdg

Or

# vxprint –l


# vxdg [-T versions] upgrade diskgroup

# vxdg -T 40 upgrade datadg

# vxdg upgrade datadg

# vxdg –T 50 init newdg newdg01=c0t3d0s2


Managing Volumes

# vxassist [-g diskgroup] make volume_name length [attributes]

# vxassist –g datadg make datavol 10m layout=nostrip

# vxassist –g datadg make datavol 10g datadg02 datdg03

# vxassist [-g diskgroup] make volume_name length layout=stripe

ncol=n stripeunit=size [disk …]


Example: To create a 20-megabyte striped volume called payvol in

acctdg that has 3 columns ,uses the default stripe unit size and

any available disks excepts for acctdg04

# vxassist –g acctdg make payvol 20m layout=stripe ncol=3 !acctdg04


Example: To create a 20-megabyte striped volume called expvol in

acctdg that has 3 columns , has a stripe unit size of 64k and

any available disks are acctdg01 acctdg02 acctdg03

# vxassist –g acctdg make payvol 20m layout=stripe ncol=3 stripeunit

=64 acctdg01 acctdg02 acctdg03


# vxassist –g acctdg make expvol 20m layout=raid5

stripeunit=32k acctdg01 acctdg02 acctdg03 acctdg04

# vxassist –g datadg make datavol 5m layout=stripe, mirror

# vxassist –g datadg make datavol 5m layout=mirror nmirror=3

# vxassist –g datadg -b make datavol 5m layout=mirror nmirror=3

# vxassists –g diskgroup maxsize attributes

# vxassists –g datadg maxsize layout=raid5

# vxassists –g datadg maxgrow datavol

# vxprint –g diskgroup [option]

# vxassist –g datadg remove volume datavol

# vxassist –g diskgroup mirror volume_name

# vxmirror –g diskgroup –a

#vxassist [-g diskgroup] remove mirror volume [!] dm_name


For example, for the volume datavol, to remove the plex (mirror) that contains a subdisk from the disk datadg02

# vxassist –g datadg remove mirror datavol ! datadg02


# vxplex –g datadg dis datavol-02

# vxedit –g datadg –rf rm datavol-02


1) # mkfs –F vxfs /dev/vx/rdsk/datadg/datavol

2) # mkdir /data

3) # mount –F vxfs / dev/vx/rdsk/datadg/datavol/data


#vxassist –g diskgroup {growto|growby|shrinkto|shrinkby} volume_name size






******** Enjoy Linux : ) *********