Monday, January 7, 2008 at 9:05 AM |
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: ,

3 comments:

Raja said...

i have a question on #vxresize command.

my senario is i have a two mount points (/dsk01 /dsk02) which are made from the same DISKGROUP.

the diskgroup(oradg) contains total of 4luns (lun1, lun2, lun3, lun4 )

mount point /dsk01 is made up of lun1 and lun2

mount point /dsk02 is made up of lun3 and lun4

both are concatenaded only

now i am adding two luns(lun5 and lun6 100gb each) to the DiskGroup (oradg)

My question here is

i need to increase the filesystem size for both the mount points /dsk01 and /dsk02 100gb for each

now i need to increase the file system size for /dsk01 mountpoint to add 100gb that should take 100gb form only lun5 from diskgroug oradg

for /dsko2 increase 100gb from lun6

Can some one specify how to increase the file system in such a way.

January 29, 2012 at 7:35 AM
Phani said...

you should mention the device name with vxresize command.

syntax is:

vxresize -g vol name +size device=

Example:
i have added a lun having component id is c2t2d50. I have set as device name for this disk. Before that, you need to bring the disk into control of veritas and initialize it.

#devfsadm -C
#vxdctl enable
#vxdisksetup -i c2t2d50
#vxdg -g adddisk disk06=c2t2d50s2
where disk06 is device name
now use vxresize command to grow your file system using the LUN c2t2d50
#vxresize -g vol name +size disk06

February 1, 2012 at 10:08 PM
Unknown said...

Thanks for sharing this important information. You may also refer http://www.s4techno.com/blog/2016/06/17/extend-vxvm-filesystem/

July 16, 2016 at 3:00 AM
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