Operating System - HP-UX
1753578 Members
6114 Online
108796 Solutions
New Discussion юеВ

How to increase size of logical volume in shared volume group

 
SOLVED
Go to solution
Emma_8
Frequent Advisor

How to increase size of logical volume in shared volume group

Hi

I have a duplex Service Guard system (2xN4000's). I wish to increase the space allocated to one of the logical volumes which is part of a shared volume group on a shared disk monitored by SG. Normally on a simplex system I can do this via SAM but under Disks & Files Sytems/Logical Volumes SAM does not show the LVs in this VG as mounted. I assume because SG is looking after this shared disk. So, I am looking for a way in which to increase the size allocated to one of these LVs.

Thanks a mil
Emma

13 REPLIES 13
Marco Santerre
Honored Contributor

Re: How to increase size of logical volume in shared volume group

Hmm I don't know about SAM, but what I can tell you is that you can extend the LV and the FS (as long as you have Online JFS) online, and you don't even have to think about the secondary node as it will know that the FS is bigger now.

so the commands to do this would be :
lvextend -L newsizeinMb /dev/VG/LVname [/dev/dsk/diskname] that las tpart only if you want to put it on a very specific disk

and

fsadm -F vxfs -b newsizeinKb /mountpoint
Cooperation is doing with a smile what you have to do anyhow.
Emma_8
Frequent Advisor

Re: How to increase size of logical volume in shared volume group

Hi Marco

Thanks for your response.
Unfortunately we do not use online jfs thus making the task more difficult.

I was thinking perhaps I could halt the SG package, activate the particular VG and then extend the lv as required ?

Thanks
Emma
Sridhar Bhaskarla
Honored Contributor

Re: How to increase size of logical volume in shared volume group

Hi Emma,

If this volume group is not activated in shared mode (-S), then you can do it very easily with the following commands.

You will need to unmount this logical volume if it is a filesystem on the node where is it mounted. Say filesystem is /filesystem and the logical volume as /dev/vg01/lvol1

Unmount the filesystem

#umount /filesystem

(you may have to stop the processes that are accessing this filesystem.)

#lvextend -L new_size_in_mb /dev/vg01/lvol1
#extendfs /dev/vg01/rlvol1
#mount /dev/vg01/lvol1 /filesystem

You don't need to do it on the failover node.

If you have onlineJFS installed (swlist -l product |grep -i online)then you don't need to unmount and extendfs.

#lvextend -L new_size_in_mb /dev/vg01/lvol1
#fsadm -b new_size_in_mbM /filesystem
#bdf /filesystem


However if this volume group is activated in Shared mode (vgdisplay vg01|grep "VG Status" and look for shared), then you will need to unshare, activate, extend the logical volume and then share it again. Let us know and we will write down the procedure.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mark Grant
Honored Contributor

Re: How to increase size of logical volume in shared volume group

If you don't have onlineJFS, you will have to unmount the filesystem first. Having done that, you can extend the logical volume as explained above.

Never preceed any demonstration with anything more predictive than "watch this"
Jeff Schussele
Honored Contributor

Re: How to increase size of logical volume in shared volume group

Hi Emma,

Yes, w/o OnLine JFS you'll have to down the pkg,
reactivate the VG & not mount the LV to lvextend & extendfs that LV/FS. Then just mount it to check it & then umount the FS, deactivate the VG & bring the package back up.

Life with OnLine JFS is much easier.

I DO hope you have Mirror-UX as MC/SG is a little pointless w/o that redundancy. OnLine JFS may be a "luxury", but Mirror-UX is a necessity for a MC/SG environment.

Rgds,
KJeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Emma_8
Frequent Advisor

Re: How to increase size of logical volume in shared volume group

Hi Sri, Mark & Jeff

Thanks for getting back to me, much appreciated. I agree, life with JFS would be so much easier, however I shall have to live without it for now.

When I run the command:
>vgdisplay vg04|grep "VG Status"
..then the result returned is
>VG Status available, exclusive

I'm not entirely sure what this means so hopefully you can explain.

So depending on the above it seems to me as follows:

1. Halt the SG package
2. vgchange -a vg04 (activate the volume group)
3. umount /filesystem (is this necessary?)
4. lvextend -L new_size_in_mb /dev/vg04/lvol1
5. extendfs /dev/vg04/rlvol1
6. mount /dev/vg04/lvol1 /filesystem (for verification)
7. umount /filesystem
8. Deactivate the volume group
9. Start up the SG package

Would really appreciate your comments on the above.

Cheers
Emms
Sridhar Bhaskarla
Honored Contributor

Re: How to increase size of logical volume in shared volume group

Hi Emma,

You don't need to halt the package as long as you can unmount the filesystem. However, if you have application processes accessing the filesystem and if you cannot selectively bring those processes down, then you may have to halt the package.

However, if there is a way to bring up/down the application without involving the package, then you can do it as well. This way you don't have to bother about activating the VG, then deactivating etc.,

Bottomline is unmounting the filesystem.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MANOJ SRIVASTAVA
Honored Contributor

Re: How to increase size of logical volume in shared volume group

Emma

If you extend a lvol you do not have to distribute the info over all nodes. Since the vginfo does not change.
If you add/delete a lvol or extend a volume group with a disk you need to distribute. The steps you provide must work fine as long as you devicefiles/instance numbers are the same on all servers. ( c) If not you have to adjust the device files before you import. Do a lvextend and extenfs to execute the same.

Manoj Srivastava
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to increase size of logical volume in shared volume group

Hi Emma,

//>VG Status available, exclusive//

This means the VG is activated exclusively through serviceguard. If you saw "shared" then the procedure would be slightly different.

As I said, you don't need to halt the package as long as you can unmount the filesystem. But if you decide to halt the package, you will need to change the following steps.

1. Good
2. vgchange -a e vg04 (-a y won't work unless you take vg04 out of the cluster)
3. umount /filesystem - this is not necessary as the filesystem is already unmounted through SG.
4. Good. Here new_size is the combined new size. For ex, if you are adding 500MB to a 500MB filesystem, then the new size is 1000MB.
5. Good
6. Good but add 'bdf /filesystem'
7. Good
8. Good. Use "vgchange -a n vg04".
9. Good.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try