1832952 Members
2608 Online
110048 Solutions
New Discussion

Re: fsadm -b

 
SOLVED
Go to solution
OFC_EDM
Respected Contributor

fsadm -b

I'm adding a SAN disk to a server to extend /dev/vg09 (/u03/oradata).

I've done the following so far:
pvcreate /dev/rdsk/c9t1d0
vgextend /dev/vg09 /dev/dsk/c9t1d0

vgdisplay -v /dev/vg09 to verify disk added

The total PE (Physical extents) is 12156 and the Allocated PE is 10557.

Note: We have online JFS.

Now I want to extend the logical volume:
lvextend -l 12156 /dev/vg09/lvol1

Then I need to extend the File System.
Is this the correct command?
fsadm -F vxfs -b /u03/oradata

AND HOW do I calculate the sectors?
The Devil is in the detail.
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor

Re: fsadm -b

Hi Kevin:

If you do:

# fstyp -v /dev/vgNN/lvolX

...and look at the value of 'f_frsize' you will have the VxFS block (sector) size. This will be a power of two starting at 1024 (the usual value).

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: fsadm -b

Its actually easier to just specify the size value in MB.

fsadm -F vxfs -b m /filesystem

Say you want to extend a filesystem to 512MB.

fsadm -F vxfs -b 512m /filesystem
Devender Khatana
Honored Contributor

Re: fsadm -b

Hi,


What is the PE_Size? The multiplication of PE_Size and no. of PE's will give you the new file system size in MB.

No. of sectors will be got by dividing this size by sector size.

Also you can define the size in MB as well in the command line itself.


HTH,
Devender
Impossible itself mentions "I m possible"
OFC_EDM
Respected Contributor

Re: fsadm -b

James,

I did the fstyp and found that the block size is 8192. To calculate the number of sectors for the entire disk do I just mulitply that by the total number of PE's?
The Devil is in the detail.
Marvin Strong
Honored Contributor

Re: fsadm -b

I also to the size in mb

example

if I wanted to add 4gb to a 4gb lv I would do

lvextend -L $(( 4096+4096)) /dev/vg/lv
fsadm -F vxfs -b $(( (4096 + 4096) * 1024)) /fs

what you can do is lvdisplay your logical volume.

and take the MB size and put it in fsadm
LV Size (Mbytes) 300

fsadm -F vxfs -b 300m /fs
or
fsadm -F vxfs -b $((300 * 1024)) /fs
OFC_EDM
Respected Contributor

Re: fsadm -b

Is this correct?

PE size 32
* # of PE's 1599
-----
= 51168
* 1024
-----
= 52,396,032
==========

So my command would be
fsadm -F vxfs -b 52396032 /u03/oradata
or
fsadm -F vxfs -b 51158M /u03/oradata

The disk I'm adding is 50 GB.
The Devil is in the detail.
Patrick Wallek
Honored Contributor

Re: fsadm -b

It's not the amount you are adding, but the NEW size of the filesystem. It appears that you extended vg09/lvol1 to 12156 LE's.

So "12156 (number of LE) * 32 (PE size)" = 388992 MB. Is that correct?

So to extend the filesystem:

fsadm -b 388992m /u03/oradata

Devender Khatana
Honored Contributor

Re: fsadm -b

Hi,

No this is not correct.

You need to give the final size not the size by which you are extending.

So here the command should be

#fsadm -F vxfs -b 388992m /u03/oradata

(Where your LVOL size is currently 388992 MB).

HTH,
Devender
Impossible itself mentions "I m possible"
OFC_EDM
Respected Contributor

Re: fsadm -b

Thanks for catching that.

So yes it is:
PE size 32
# PE's 12156
--------
388992
* 1024
--------
398,327,808

So now the command would be either:
fsadm -F vxfs -b 398327808 /u03/oradata
or
fsadm -F vxfs -b 38892M /u03/oradata

Thanks
The Devil is in the detail.
Patrick Wallek
Honored Contributor

Re: fsadm -b

You are mostly correct. You use a lower case 'm' not a capital M.

Devender Khatana
Honored Contributor

Re: fsadm -b

Use

#fsadm -F vxfs -b 388992m /u03/oradata

HTH,
Devender
Impossible itself mentions "I m possible"
baiju_3
Esteemed Contributor
Solution

Re: fsadm -b

After doing lvextend , run

lvdisplay /dev/vgxx/lvolx and see the lvsize

LV Size (Mbytes) XX

Now use fsadm


fsadm -b XXM /mount_point

Thats all ,
thx,
bl
Good things Just Got better (Plz,not stolen from advertisement -:) )
OFC_EDM
Respected Contributor

Re: fsadm -b

lalb you rule!
No math woohoo!

Worked like a charm.

Thanks everyone for the input.
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: fsadm -b

Resolved

By the way I used an "M" and not an "m" in the fsadm command.

It worked.

The Devil is in the detail.