Showing posts with label VxVM - Volumes. Show all posts
Showing posts with label VxVM - Volumes. Show all posts
Wednesday, December 12, 2012 at 12:12 PM | 5 comments
Here’s a collection of my VxVM documents. Some were from my own work and some were taken from the web.

These documents were posted mainly for my personal references and for others that may find them useful.


Volume Administration

Veritas Cluster Filesystem

Veritas Disks Administration

Veritas DMP

Fixes, Tips and Tricks

Array Support Libraries

VxVM Manuals

Some Very Helpful Sites

Man Pages



I just encounter a problem with permissions on raw volumes.  The raw volumes were used by a database and permissions on these volumes were set using chown and chmod.  However, when we failover, the permissions were not carried out.

So I used the veritas function to change the ownership and permission of the volumes.

# vxedit -g set user= group= mode=
Posted by JAUGHN Labels: ,
vxresize command syntax :

/etc/vx/bin/vxresize [-bsx] [-F fstype] [-g  diskgroup] [-t tasktag] \
volume new_length [medianame...]


The vxresize command will either grow or shrink both the file system and its underlying volume to match the specified new volume length. The ability to grow or shrink is file system dependent. Some file system types may require that the file system be unmounted for the operation to succeed.

Note: vxresize works with VxFS and UFS file systems only.

In some situations, when resizing large volumes, vxresize may take a long time to complete.

The new_length operand can begin with a plus (+) or minus (-) to indicate that the new length is added to or subtracted from from the current volume length.


Resizing a Filesystem/Volume

Current capacity:

# df -k /dbfiles03
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dg20/dbvol03 3079710 2709166 308950 90% /dbfiles03

Volume information:

# vxprint dbvol03
Disk group: dg20

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v dbvol03 fsgen ENABLED 6291456 - ACTIVE - -
pl dbvol03-01 dbvol03 ENABLED 6298619 - ACTIVE - -
sd dg2007-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2006-03 dbvol03-01 ENABLED 3149307 0 - - -

Plex information:

# vxprint -l dbvol03-01
Disk group: dg20

Plex: dbvol03-01
info: len=6298619 contiglen=6298491
type: layout=STRIPE columns=2 width=128
state: state=ACTIVE kernel=ENABLED io=read-write
assoc: vol=dbvol03 sd=dg2007-03,dg2006-03
flags: busy complete

Increasing the volume to 4GB using vxresize:

# /etc/vx/bin/vxresize dbvol03 4g
/dev/vx/rdsk/dg20/dbvol03:
8388608 sectors in 4096 cylinders of 32 tracks, 64 sectors
4096.0MB in 88 cyl groups (47 c/g, 47.00MB/g, 7872 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 96352, 192672, 288992, 385312, 481632, 577952, 674272, 770592, 866912,
963232, 1059552, 1155872, 1252192, 1348512, 1444832, 1541152, 1637472,
1733792, 1830112, 1926432, 2022752, 2119072, 2215392, 2311712, 2408032,
2504352, 2600672, 2696992, 2793312, 2889632, 2985952, 3080224, 3176544,
3272864, 3369184, 3465504, 3561824, 3658144, 3754464, 3850784, 3947104,
4043424, 4139744, 4236064, 4332384, 4428704, 4525024, 4621344, 4717664,
4813984, 4910304, 5006624, 5102944, 5199264, 5295584, 5391904, 5488224,
5584544, 5680864, 5777184, 5873504, 5969824, 6066144, 6160416, 6256736,
6353056, 6449376, 6545696, 6642016, 6738336, 6834656, 6930976, 7027296,
7123616, 7219936, 7316256, 7412576, 7508896, 7605216, 7701536, 7797856,
7894176, 7990496, 8086816, 8183136, 8279456, 8375776,

New capacity:

# df -k /dbfiles03
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dg20/dbvol03 4106286 2709166 1335526 67% /dbfiles03

New volume information (two new subdisks):

# vxprint dbvol03
Disk group: dg20

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v dbvol03 fsgen ENABLED 8388608 - ACTIVE - -
pl dbvol03-01 dbvol03 ENABLED 8395767 - ACTIVE - -
sd dg2007-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2007-05 dbvol03-01 ENABLED 1048572 3149307 - - -
sd dg2006-03 dbvol03-01 ENABLED 3149307 0 - - -
sd dg2006-05 dbvol03-01 ENABLED 1048572 3149307 - - -

New plex information:

# vxprint -l dbvol03-01
Disk group: dg20

Plex: dbvol03-01
info: len=8395767 contiglen=8395639
type: layout=STRIPE columns=2 width=128
state: state=ACTIVE kernel=ENABLED io=read-write
assoc: vol=dbvol03 sd=dg2007-03,dg2007-05,dg2006-03,dg2006-05
flags: busy complete

More options:

# /etc/vx/bin/vxresize dbvol03 +1g

# /etc/vx/bin/vxresize dbvol03 +1024m

# /etc/vx/bin/vxresize dbvol03 -2g
Posted by JAUGHN Labels: ,
vxassist command syntax :

vxassist <option> <Keyword> volume_name [attributes]

Commonly used options are given below (See man vxassist for complete list of supported options)

    -g for specifying diskgroups
    -b for background operation
    -d file containing defaults for vxassist if not specified /etc/default/vxassist is used


Keywords used are make , mirror , move , growto ,growby ,shrintto ,shirnkby ,snapstart , snapshot ,snapwait

Attributes specify volumes layout disks controllar to include exclude etc


Extending a volume up to certain length

Command syntax :

vxassist growto volume_name length

To extend vol3 up to 8000 sectors, type:

# vxassist growto vol3 8000


Extending by a Given Length

Command Syntax :

vxassist growby volume_name length

To extend volapp by 1000 sectors, type:

# vxassist growby volapp 1000





Shrinking a Volume

Caution - Do not shrink a volume below the size of the file system. If you have a VxFS file system, you can shrink the file system and then shrink the volume. If you do not shrink the file system first, you risk unrecoverable data loss.

Always make sure you have a good backup of the data volume to be shirnked.


Shrinking to a Given Length

Shrink a volume to a specific length as follows:

vxassist shrinkto volume_name length

Make sure you do not shrink the volume below the current size of the file system or database using the volume. This command can be safely used on empty volumes.

To shrink volcat to 1300 sectors, type:

# vxassist shrinkto volcat 1300


Shrinking by a Given Length

Shrink a volume by a specific length as follows:

vxassist shrinkby volume_name length

To extend volapp by 1000 sectors, type:

# vxassist shrinkby volapp2 8000
Posted by JAUGHN Labels: ,
vxassist command syntax :

vxassist <option> <Keyword> volume_name [attributes]

Commonly used options are given below (See man vxassist for complete list of supported options)

    -g for specifying diskgroups
    -b for background operation
    -d file containing defaults for vxassist if not specified /etc/default/vxassist is used


Keywords used are make , mirror , move , growto ,growby ,shrintto ,shirnkby ,snapstart , snapshot ,snapwait

Attributes specify volumes layout disks controllar to include exclude etc


Creating a Concatenated Volume

By default, vxassist creates a concatenated volume using the space available on a disk or on the number of disks in a diskgroup if the volume size specified is more then the one available on a single disk.

Disks can be specified from a diskgroup for a volume group but if not mentioned available disks are selected by the volume manager.

Command syntax :

vxassist make volume_name volume_length

To create a new volume appvol of 100 MB in the default disk group rootdg with available disks:

# vxassist make appvol 100m

To create the volume appvol of 100MB on disk03

# vxassist make appvol 100m disk03


Creating a Striped Volume

A striped volume contains at least one plex that consists of two or more subdisks located on two or more physical disks.

Command Syntax :

vxassist make volume_name length layout=stripe

To create a striped volume appvol2 with the default stripe unit size on the default number of disks

# xassist make appvol2 100m layout=stripe

To create a striped volume appvol2 100MB striped volume on three specific disks.

# vxassist make appvol2 100m layout=stripe disk04 disk05 disk06


Creating a RAID-5 Volume

A RAID-5 volume contains a RAID-5 plex that consists of two or more subdisks located on two or more physical disks. Only one RAID-5 plex can exist per volume. A RAID-5 volume may also contain one or more RAID-5 log plexes, which are used to log information about data and parity being written to the volume.

Command Syntax :

vxassist make volume_name length layout=raid5

To create the RAID-5 volume appvol4 with the default stripe unit size on the default number of disks with RAID-5 log,

# xassist make appvol4 100m layout=raid5.
Posted by JAUGHN Labels: ,
Thursday, January 3, 2008 at 1:24 PM | 1 comments
Removing a volume requires removing all references to the volumes to be removed like unmounting the volume if mounted and removing its reference from filesystem table.

An active volume has to be stopped first to stop all the activities to the volume only then it can be removed.

Stopping a Volume:

vxvol stop volume_name


Removing a Volume

vxedit -rf rm volume_name
Posted by JAUGHN Labels: ,
Visit the Site
MARVEL and SPIDER-MAN: TM & 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. 2007 Sony Pictures Digital Inc. All rights reserved. blogger template by blog forum