Operating System - HP-UX
1838105 Members
3588 Online
110124 Solutions
New Discussion

Online Filesystem Extend/Reduce using LVM using sam

 
SOLVED
Go to solution
Heiko_7
Advisor

Online Filesystem Extend/Reduce using LVM using sam

L,s.

is it possible to reduce a filesystem using sam.

I can't find the option to change a filesystem, just to create

can someone sent me in de right direction?

kind regards

Heiko
5 REPLIES 5
Fabio Ettore
Honored Contributor
Solution

Re: Online Filesystem Extend/Reduce using LVM using sam

Hello Heiko,

it's not possible to extend/reduce filesystem size by SAM, it just is possible to extend (note: no reduce) the logical volumes.
What about using CLI to extend/reduce filesystems?

I think SAM is a great tool to change kernel parameters and few other operations but I don't like it when changing LVM or networking values.

Definitely I would suggest you to use the classic command line.

Since you are asking about online extension/reduction I suppose you have OnlineJFS installed on your system already:

a)If extending:
1- extend logical volume by lvextend:
lvextend -L
2- extend filesystem by fsadm:
fsadm -F vxfs -b M

b)If reducing
1- reduce filesystem:
fsadm -F vxfs -b M
2- reduce logical volume by lvreduce:
lvreduce -L

However take care when reducing on size values.

Without OnlineJFS installed you can only extend the filesystem (umount/lvextend/extendfs/mount), if you want to reduce you have to recreate it.


Good luck...

Best regards,
Fabio
WISH? IMPROVEMENT!
Leonid Mishkind
Frequent Advisor

Re: Online Filesystem Extend/Reduce using LVM using sam

You can reduce LV online, but it is VERY not recomended since there is no assurance the data on the lv will be saved.
There is no option in sam to reduce lv but you can use the lvreduce command
Bill Hassell
Honored Contributor

Re: Online Filesystem Extend/Reduce using LVM using sam

It's very important to understand that a filesystem and not the same as a logical volume. You cannot reduce a filesystem without the special (extra cost) product called Online JFS. To see if you have the product:

swlist -l product | grep JFS

Without this product, the filesystem must be reduced like this:

- backup the filesystem
- if important, backup the filesystem one more time
- umount /filesystem
- use lvreduce on the filesystem's lvol
- newfs the rlvol
- mount the empty filesystem
- restore the files

But even with Online JFS, the fsadm command can corrupt the filesystem unless the very latest version of Online JFS is used and the filesystem VxFS version is 4 or more. Always use the above steps unless you are up to date with Online JFS, VxFS filesystem versions and patches. You can see your filesystem version with the fstyp -v command:

fstyp -v /dev/vg00/rlvol4

NOTE: lvreduce by itself will DESTROY any filesystem on the lvol. The lvreduce command literally removes disk space but is not aware of any files or directories and will NOT warn of the consequences.


Bill Hassell, sysadmin
Roland Piette
Regular Advisor

Re: Online Filesystem Extend/Reduce using LVM using sam

Hello Heiko,

I suggestion : reorgonise your filesystem before reducing it.

See the option -d and -e of the fsadm_vxfs command. It's works pretty good.

man fsadm_vxfs

Roland
Heiko_7
Advisor

Re: Online Filesystem Extend/Reduce using LVM using sam

thnx to all.

it was no big deal afterwards, but i'm glad with al the responses now i could perform the action during operating hours.

Which also made de customers happy

thnx again