SUMMARY: Veritas Resize Command Line in blocks

From: Carlos Sevillano <carlos_sevillano_at_ureach.com>
Date: Wed Oct 02 2002 - 14:01:19 EDT
Thanks to all who replied.  

chris@shoeys.com
joe.fletcher@btconnect.com
ken@slis.indiana.edu


Chris and Joe had what I was looking for. 
See the replies below:


"Chris Shoesmith" <chris@shoeys.com>

Carlos,

 To "growto" the Filesystem ONLY use the
volume size. Volumes under VXVM
 require 2 things to be satisfied.
 1. Cylinder bounded subdisks.
 2. Size of the volume is the same as that
at creation time.

 Most people create volumes in terms of megs
or gigs. This means that the
 plexes and/or subdisks end up larger than
the volume.
 In a simple concat volume, you could grow
the volume to the cumulative size
 of it's subdisks to recover the small % of
space.

 I always recommend using blocks when
growing volumes and filesystems.

 I'd also STRONGLY recommend that you
upgrade both VRTSvxvm and vxfs as they
 are old and don't run the best under
Solaris 8.

 I use fstyp to check out the filesystem
size:
 eg.
 root@sydsup02 $ df -k /pub
 Filesystem            kbytes    used  
avail capacity  Mounted on
 /dev/vx/dsk/fservdg/pub
                      157271040 118352210
36504482    77%    /pub
 root@sydsup02 $ fstyp -v
/dev/vx/dsk/fservdg/pub
 vxfs
 magic a501fcf5  version 4  ctime Thu Sep 27
10:27:49 2001
 logstart 0  logend 0
 bsize  1024 size  157271040 dsize 
157271040  ninode 0  nau 0
 defiextsize 0  ilbsize 0  immedlen 96 
ndaddr 10
 aufirst 0  emap 0  imap 0  iextop 0  istart
0
 bstart 0  femap 0  fimap 0  fiextop 0 
fistart 0  fbstart 0
 nindir 2048  aulen 32768  auimlen 0 
auemlen 8
 auilen 0  aupad 0  aublocks 32768  maxtier
15
 inopb 4  inopau 0  ndiripau 0  iaddrlen 8  
bshift 10
 inoshift 2  bmask fffffc00  boffmask 3ff 
checksum f37826d9
 oltext1 34  oltext2 16642  oltsize 1 
checksum2 422c
 free 38918830  ifree 0
 efree  9252 10929 12398 4284 4633 3878 3561
3050 2488 1986 1410 442 351 203
 101
 174 81 43 16 6 3 1 0 0 0 0 0 0 0 0 0 0

 To determine size: (size * bsize / 1024)
 root@sydsup02 $ expr 157271040 \* 1024 /
1024
 157271040

 This trick above is good for determining
failed resizes where mounts come
 back with "filesystem is larger than
device" errors.

 Regards,
 Chris.



Ken Zachmann <ken@slis.indiana.edu>

Hi Carlos,

 I see two easy ways:

 1) Use vxresize instead of vxassist and
fsadm. It lets you resize the
 volume and file system at the same time,
e.g.:

 /etc/vx/bin/vxresize DUMP 8G

 will grow DUMP to 8GB (or shrink it if it
is already bigger than 8GB) AND
 resize the file system in one step.


 or


 2) run vxprint -Ath DUMP and take the plex
size (of the smallest plex) for
 the number of blocks needed for fsadm.

 Did you notice how all of your subdisk
sizes added up to equal your plex
 size? No need to do the math when it's
already done for you.

 hope this helps,

 ken



####################
ORIGINAL POSTING:
####################

Date Tue, 1 Oct 2002 11:05:16am 
>From Carlos Sevillano
<carlos_sevillano@ureach.com>  Add to
address book 
To sunmanagers@sunmanagers.org
Subject Veritas Resize Command Line in
blocks       

 Solaris 8
 VxVM 3.04
 VxFS 3.3.3

 Using command-line to resize a
 file-system...  Is there an "easy" way to
 determine the blocks size of the
 file-system?   Is there a way to tell
 veritas to grow a file-system to the space
 left on the volume?

 Currently what I do is to covert the new
 size I want in MB to blocks ei:

 Grow by 3072m (grow volume first then
 file-system):

 /usr/sbin/vxassist -g rootdg growby DUMP
 3072m 
 /usr/lib/fs/vxfs/fsadm -b 16734208 -r
 /dev/vx/rdsk/rootdg/DUMP /DUMP 

 3072 * 1024 * 2  = 6291456 (3072m in
blocks)

 to figure out the -b value (blocks) value
of
 the fsadm command I take the 6th field of
 the
 vxprint command and add those up:

 # vxprint -Ath | grep DUMP
 v  DUMP         fsgen        ENABLED 
 ACTIVE   10442752 SELECT    -
 pl DUMP-01      DUMP         ENABLED 
 ACTIVE   10443992 CONCAT    -        RW
 sd disk02-03    DUMP-01      disk02  
 8396784  4198392  0         c0t3d0   ENA
 sd disk01-07    DUMP-01      disk01  
 34915920 442928   4198392   c0t2d0   ENA
 sd disk02-07    DUMP-01      disk02  
 20549032 2530344  4641320   c0t3d0   ENA
 sd disk02-08    DUMP-01      disk02  
 31579824 1738728  7171664   c0t3d0   ENA
 sd disk04-13    DUMP-01      disk04  
 1609920  1533600  8910392   c2t0d65  ENA

 bc -l
 4198392 + 442928 + 2530344 + 1738728 +
 1533600 = 10443992 (in blocks)

 Then I add the old size in blocks to the
new
 size to get the -b value for the fsadm
 command:

 10443992 + 6291456 = 16735448 (blocks -b
for
 fsadm).

 /usr/lib/fs/vxfs/fsadm -b 16734208 -r
 /dev/vx/rdsk/rootdg/DUMP /DUMP


 Am I making mistakes?  Do I end-up with
gaps
 of un-used disk-space on my volume?.... is
 there any easy way of doing this without
 using the vmsa or vxva GUIs??

 Carlos

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Oct 2 14:03:34 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:55 EST