Operating System - HP-UX
1834674 Members
2329 Online
110069 Solutions
New Discussion

Re: Reducing lvol in a MC/SG cluster

 
SOLVED
Go to solution

Reducing lvol in a MC/SG cluster

What are the steps to safely reduce the size of a logical volume in an MC/SG cluster?
10 REPLIES 10
Sanjiv Sharma_1
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

Hi Ali,

Please check this:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=109782

hth.
Everything is possible
Mark Grant
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

You don't need to do anything particular because it is MS/SG unless you are removeing a disk. I'll assume you have onlineJFS so you can do this online.

Just make sure you have reduced the fileystem with "fsadm -b M /mountpoint" and then do a "lvreduce -L M /dev/vgXX/lvolX"

You don't need to re-export the map file to the other nodes.

If you are going to remove a disk from the volume group, you need to "vgexport -m mapfile -p -s vgXX" and then copy the mapfile to all the other nodes and do "vgimport -m mapfile -s vgXX"
Never preceed any demonstration with anything more predictive than "watch this"

Re: Reducing lvol in a MC/SG cluster

I did the following:
umount /util
fsadm -F vxfs -b 500 /util

I get the following message:
/util is not the root inode of a vxfs file sytem.
Why am I getting this.
There are only 1 logical volume in the vg.(/dev/vgutil/lvutil). This is being tested on a non SG system prior to doing the actual lvreduce in the cluster.
Current size is 1023.
Karthik S S
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

Unless otherwise you are not going to rename the LVOLs/VGs you need not worry about anything. I would advise to halt the package then manually activate the VG and do the necessary changes.

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

Try,

fsadm -F vxfs -b 500 /dev/vgutil/lvutil

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

I am sorry about that ...

If you planning to reduce the lvol then,

mount the filesystem
reduce the filesystem
reduce the lvol
remount filesystem

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Mark Grant
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

fsadm works on mounted filesystems. If you don't have onlinejfs you will need to do more work than this. If you don't have OnlineJFS installed, I would backup, destroy the filesystem, reduce the logical volume and then restore.

If you do have OnlineJFS, then you need to have the filesystem mounted.
Never preceed any demonstration with anything more predictive than "watch this"
G. Vrijhoeven
Honored Contributor

Re: Reducing lvol in a MC/SG cluster

Hi,

Fsadm is online so the filesystem must be mounted like others have mentioned. I like to add that it is good practice to make a full backup before reducing the filesystem. Most of the times it works fine, but not always!

HTH,

Gideon

Re: Reducing lvol in a MC/SG cluster

I Did the following on the test system:
fsadm -F vxfs -b 2000000 /util
umount /util
lvreduce -L 2000 /dev/vgutil/lvutil
fsck -F vxfs -o full /dev/vgutil/rlvutil

and mount -
All is OK - files are still accessable.

Thanks to all for your assistance. Now for the production system, tonight after backups!
If there are anything additional, will be much appreciated - thanks.


Mark Grant
Honored Contributor
Solution

Re: Reducing lvol in a MC/SG cluster

The only thing I would mention is that the -b option of "fsadm" is number of blocks. Your filesystem is unlikely to have 1024k size blocks. I would suggest you use the undocumented M for your fsadm to be sure your logical volume and filesystem are the same size.

fsadm -F vxfs -b 20480M /mountpoint

This wil give you a real 20GB filesystem size.
Never preceed any demonstration with anything more predictive than "watch this"