cancel
Showing results for 
Search instead for 
Did you mean: 

vxresize syntax not clear

Heinz_Mueller
Level 3

Hi,

to resize (expand ) a vxfs filesystem, based on volume home, I would do something like

this:

1.This is my mirrored layout:

v home - ENABLED ACTIVE 58720256 ROUND - fsgen

pl HOME_0 home ENABLED ACTIVE 58720256 CONCAT - RW

sd HOME_00 HOME_0 DECALOG00 0 58720256 0 EMC0_0 ENA

pl home_0 home ENABLED ACTIVE 58720256 CONCAT - RW

sd home_00 home_0 decalog00 0 58720256 0 EMC1_0 ENA

2. These are my disks

#vxdg free

GROUP DISK DEVICE TAG OFFSET LENGTH FLAGS

decalog DECALOG00 EMC0_0 EMC0_0 58721312 47273696 -

decalog decalog00 EMC1_0 EMC1_0 58720256 47274752 -

3. make two new subdisks:

vxmake -g decalog sd HOME_01 disk=DECALOG00 offset=58721312 len=42000000

vxmake -g decalog sd home_01 disk=decalog00 offset=58720256 len=42000000

4. associate the subdisk with the existing plexes

vxsd assoc HOME_0 HOME_01

vxsd assoc home_0 home_01

5. grow Volume and Filesystem

vxresize -F vxfs -g decalog home <new length>

The syntax of the resize command is not clear to me. The new size of the volume should be

58720256 + 42000000 = 100720256 ( blocks )

So is this the correct command:

vxresize -F vxfs -g decalog home 100720256 ( growto?? )

or this one

vxresize -F vxfs -g decalog home + 42000000 (growby?? )

or a different other syntax???

Veritas 5.0 / Solaris 10

THX!

Heinz

1 ACCEPTED SOLUTION

Accepted Solutions

g_lee
Level 6
Heinz,

Both are valid - note that the second command shouldn't have a space between the plus-sign and the number though, ie:

vxresize -F vxfs -g decalog home 100720256 OR
vxresize -F vxfs -g decalog home +42000000    ##  <--- note there is no space

If you want to make sure it only expands the volume (ie: you don't make a typo and resize the volume to the growby increment by accident), use the -x option:
vxresize -x -F vxfs -g decalog home +42000000

(-x requires the operation is an increase, fails otherwise)

If you wanted to be less specific about blocks you could also specify as k, m, g eg: vxresize -x -F vxfs -g <dg> <vol> +10g would grow the volume by 10g

Also note it wasn't necessary to associate the subdisks beforehand - vxresize would do that for you. If that was done to specify which disks you wanted to grow onto, that could have been achieved by specifying the medianames, ie:

vxresize -x -F vxfs -g decalog home +42000000 DECALOG00 decalog00

Refer to the man page if wish to verifycheck further details:
http://sfdoccentral.symantec.com/sf/5.0MP3/solaris/manpages/vxvm/man1m/vxresize.html

Hope that helps.

View solution in original post

6 REPLIES 6

g_lee
Level 6
Heinz,

Both are valid - note that the second command shouldn't have a space between the plus-sign and the number though, ie:

vxresize -F vxfs -g decalog home 100720256 OR
vxresize -F vxfs -g decalog home +42000000    ##  <--- note there is no space

If you want to make sure it only expands the volume (ie: you don't make a typo and resize the volume to the growby increment by accident), use the -x option:
vxresize -x -F vxfs -g decalog home +42000000

(-x requires the operation is an increase, fails otherwise)

If you wanted to be less specific about blocks you could also specify as k, m, g eg: vxresize -x -F vxfs -g <dg> <vol> +10g would grow the volume by 10g

Also note it wasn't necessary to associate the subdisks beforehand - vxresize would do that for you. If that was done to specify which disks you wanted to grow onto, that could have been achieved by specifying the medianames, ie:

vxresize -x -F vxfs -g decalog home +42000000 DECALOG00 decalog00

Refer to the man page if wish to verifycheck further details:
http://sfdoccentral.symantec.com/sf/5.0MP3/solaris/manpages/vxvm/man1m/vxresize.html

Hope that helps.

Heinz_Mueller
Level 3

g_lee,

thank you. That helps me a lot!

"Also note it wasn't necessary to associate the subdisks beforehand .."
Because I want to give the subdisks a special naming I've created them at first.

I've found a second way ( 2 steps :(

1. growing the volume
vxassist -g decalog growto home 100720256

2. growing the filesystem
fsadm -F vxfs -b 100720256 <mount point >

Can you agree with the second way?

Heinz
 

g_lee
Level 6
doing a vxassist and then an fsadm can also be used to grow the filesystem, but the vxresize already does this (with some of it's own checking) so you're just creating more work for yourself! :) if you really really want to grow it in two steps then the commands are valid, however vxresize is generally the recommended/preferred method since it's less to type/less chance to make typos :)

NB: if you ever want to shrink filesystem would strongly recommend sticking with vxresize rather than trying to do it in stages yourself to avoid risk of volume / filesystem size mismatches

Re: wanting the subdisks to have specific names - that makes more sense now. This can also be achieved after the fact by doing:
# vxedit -g <dg> rename <oldname> <newname>
(in case you forget to create the subdisks beforehand in future)

Glad it seemed to help you :)

Heinz_Mueller
Level 3
g_lee,

thanks again!

Heinz

Marianne
Level 6
Partner    VIP    Accredited Certified
Heinz, why did you you mark your own post as solution and not g_lee's post?????????

Heinz_Mueller
Level 3
Sorry, that was a mistake! Heinz