Operating System - HP-UX
1829378 Members
4912 Online
109991 Solutions
New Discussion

How to reduce the LVM size

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

How to reduce the LVM size

Dear All,

what are the commands to reduce a LVM size.

I dont have on-line jfs.
4 REPLIES 4
Slawomir Gora
Honored Contributor
Solution

Re: How to reduce the LVM size

Hi,

If you don't have OnlineJFS the only way is
1. backup FS
2. use lvreduce command to lvol reduce size
3. create filesystem
4. restore files from backup
Victor Fridyev
Honored Contributor

Re: How to reduce the LVM size

Hi,

You can find a short discussion here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1101565226073+28353475&threadId=31100
I personally strong recommend to reduce the file system size by backing it up, recreation of its logical volume and restoring.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Ranjith_5
Honored Contributor

Re: How to reduce the LVM size

Hi Jack,

Reducing a LV without OnlineJFS is not possible. You have to backup the data, remove and recreate the LV, create a new FS and restore the data from the backup into that FS.

steps are below.
1. Take full backup of File system
2. umount FS
3. lvreduce logical volume ( eg:-# lvreduce -L /dev/vg01/lvdata )
4. newfs
5. mount the FS and restore data

Regards,
Syam
Hoang Chi Cong_1
Honored Contributor

Re: How to reduce the LVM size

Hi Jack.
Yes, If you do not have Online JFS, you can not reduce the LVM size.
This sample I will reduce /home.
1. Backup all user data
2. Umount the filesystem : umount /home
3. Reduce the size : lvreduce -L 100 /dev/vg01/lvhome
Note: the new total size will be 100MB.
4. Re-create the filesystem newfs -F vxfs /dev/vg01/rlvhome Note: to create an hfs filesystem change vxfs by hfs in the previous command.
5. Mount the Logical Volume: mount /dev/vg01/lvhome /home
6. Restore the user data

Can buy this licence but you have to pay money. It is not cheap :)
You also can download and try this :
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=BASEVXFS


Hope this helps

Jimkery

Looking for a special chance.......