1834798 Members
2484 Online
110070 Solutions
New Discussion

fsadm option -b

 
Gord Moore
Frequent Advisor

fsadm option -b

I want to extend a filesystem using Online-JFS
in HP-UX 11.0 . I came across another system
managers notes that say:

Extend the filesystem inside the LV. You do not have to calculate the size here - by default it will extend it to fill the LV you extended in step 1:

fsadm -b /var

I have looked at the man pages for fsadm_vxfs and it always seems to say the the -b parameter needs the size in MB. Does the -b option without a number actually work this way? Am I missing something in the man pages, or is this just an undocumented feature?

Thanks

Gord Moore
9 REPLIES 9
Uday_S_Ankolekar
Honored Contributor

Re: fsadm option -b

The first step is to enlarge the logical volume:

lvextend ???L [n] /dev/[vg]/[lvol]

n = total size of the logical volume [MB]

Then try ..
fsadm -F vxfs -b [lv_size_MB]M /mountdirectory

You need to add M directly to the lv_size_MB

Gooldluck,
-USA..
Good Luck..
Wilfred Chau_1
Respected Contributor

Re: fsadm option -b

fsadm -b (in kilo byte) /mount_point
James A. Donovan
Honored Contributor

Re: fsadm option -b

...an example...

# lvextend -L 1024 /dev/vg00/lvol5

...extends the logical volume to 1024 MB in size...

# fsadm -F vxfs -b $((1024*1024)) /home

...$((...)) is an easy way to do math on the command line, and $((1024*1024)) gives you the size in KB for your filesystem....
Remember, wherever you go, there you are...
Darrell Allen
Honored Contributor

Re: fsadm option -b

Hi Gord,

Apparantly the other guy's notes were wrong. You must specify the newsize when using the -b option to fsadm.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Sridhar Bhaskarla
Honored Contributor

Re: fsadm option -b

In Gord,

Interesting. How will the system know about your desired size?. You need to follow the following commands to increase var to 1 GB.

#lvextend -L 1000 /dev/vg00/lvol?
#fsadm -b 1024000 /var

1000 is the new size in MB for lvextend
1024000 is the number of blocks (1024*1024)
for fsadm

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Rita C Workman
Honored Contributor

Re: fsadm option -b

...How I learnt it that thar HP class that:

fsadm had to have the -b..and that the value must be either:
-b /filesystem
or
-b m /filesystem

to put in MByte you must enter a small 'm' directly (no space) after the numerical MByte entry...

Yup,
Regards,
Rita

Gord Moore
Frequent Advisor

Re: fsadm option -b

Hi, it's me again.

Just to answer a few questions people have raised:

I don't want to specify the size to extend to because I want to use the whole thing. Since I extended the LV using lowercase l which is the number of PE's, I don't want to do the conversion from PE's to Megabytes because I am never sure if it is using 1000 or 1024. Some of the answers given here have the same problem. I really don't care about the actual size in MB (actually I am working in Gigabytes) I want to use the whole thing.

If I have to use a number in Megabytes, does the fsadm command use uppercase M like Uday says, or lowercase m like Rita says?

Ain't computers fun!!

Darrell Allen
Honored Contributor

Re: fsadm option -b

Hi again,

You can use either uppercase M or lowercase m when specifying the -b size with fsadm. The -L arg of lvcreate and lvextend also accept uppercase M or lowercase m for size in MB.

As info, when specifying size in extents, you are using the number of Logical Extents (LE), not Physical Extents (PE). The number of PEs in a logical volume will be either 1, 2, or 3 times the number of LEs depending on whether the LV is mirrored or not.

For the purposes of determining the size of a LV or a filesystem, the size of an LE is the same as the size of a PE. Thus one determines the size of a LV by multiplying the number of LEs times the PE size.

For these commands, it's simple to convert between LEs and MBs. vgdisplay vg## will show the PE size which is in MB. The default is 4MB. Simply multiply the number of LEs by the PE size to get the size in MB.

Since lvcreate (or lvextend) and fsadm both accept the size in MB, I find that much easier to deal with.

And last, with these commands, 1GB = 1000MB.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
cute
Advisor

Re: fsadm option -b

what if im trying to reduce my onlineJFS FS?
and i accidentally executed lvreduce before i run fsadm....
fsadm gives error cannot shrink... inodes are in use
are my data in the reduced lvol corrupted?
@#$#&#@!!##%*

HELP!
can i restore it?