1835360 Members
3727 Online
110078 Solutions
New Discussion

lvreduce

 
Prashantj
Valued Contributor

lvreduce

Hi,

i am unable to use the lvreduce command. If i use this command, after that i was not able to mount the file system again.
Good judgment comes from experience and experience comes from bad judgment.
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: lvreduce

If you reduced your LV without first reducing the filesystem in the LV (via 'fsadm') then you just messed everything up.

The easiest way I have found to reduce a LV is:
1) back up the data
2) remove the large LV
3) recreate the LV with the smaller size you want
4) create the filesystem on the "new" LV
5) restore the data.
Siju Vadakkan
Trusted Contributor

Re: lvreduce

provide the following details :

1. lvdisplay lvname
and the commands u issued
Prashantj
Valued Contributor

Re: lvreduce

Hi,

below mention file system haveing 200 mb
spacem but i want to reduce it 100 mb.
/dev/vg00/lvol21 204800 1157 190923 1% /ram

If possiable kindly provide the staps.
Thanks .. Prashantj
Good judgment comes from experience and experience comes from bad judgment.
Patrick Wallek
Honored Contributor

Re: lvreduce

See my response above.
Siju Vadakkan
Trusted Contributor

Re: lvreduce

Here are the steps:

1. reduce the filesystem first

#fsadm -F vxfs -b 100m /ram

2. Reduve the logical volume

#lvreduce -L 100 /dev/vg00/lvol21
Anshumali
Esteemed Contributor

Re: lvreduce

**Only if you have OnlineJFS. :)
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
AVV
Super Advisor

Re: lvreduce


Hi,

If not online jfs not installed , better way to you can follow is ,but back up the data first and follow the below steps.

1. unmount the fs
2. lvremove
3. recreate lv (lvcreate -L size -n lvolname vgxx)
4.newfs -F fstype /dev/vgxx/r
5.mount it again.

Thanks -ajeshvv
Prashantj
Valued Contributor

Re: lvreduce

i am happy with the answer.
Prashant Jadhav
Good judgment comes from experience and experience comes from bad judgment.