Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-14-2012, 07:31 AM   #1
LQ Newbie
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
Linux lvm reducing problem

To everyone

I am facing poblem to reduce the LINUX LVM size.

I have /dev/vg1/lv3 mounted under (/lvm).the size is 1GB and i want to reduce it 512MB.i am running like this:-

1- lvreduce -L -512M /dev/vg1/lv3
2- umount /lvm
3- resize2fs -f -p /dev/vg1/lv3 (i am also getting error on this command)

i am uploading the error through attachment.

Now my LVM Size is 512MB when i am seeing it through (lvdisplay)
But the problem is when i run (df -h) the size
is still (512MB)

help me my dears..
Attached Thumbnails
Click image for larger version

Name:	untitled.JPG
Views:	9
Size:	57.7 KB
ID:	10115  
Old 07-14-2012, 07:42 AM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Very bad.
Step number 3 must be done first.

There is an LVM howto at I suspect you will need to restore from a backup, but you might be lucky - set the lv back to its original size and see if a fsck works. If so, do the resize2fs, then the lvreduce.
And hope.
Old 07-14-2012, 11:15 AM   #3
Registered: Aug 2004
Location: UK
Distribution: Gentoo, OpenBSD, Debian, FreeBSD, RHEL, CentOS
Posts: 65

Rep: Reputation: 24
When shrinking a ext2/3 file system it is better to unmount it first. It is not explicitly stated in the resize2fs(8) man page but implied not to support on-line shrinking; only on-line extension.

+1 on syg00's comment.
  • Backup filesystem! There's no guarantee that data won't be lost - it is a high risk especially when shrinking.
  • Unmount filesystem
  • Shrink filesystem (resize2fs specifying the new size)
  • Shrink volume to a size equal or above the filesystem (lvreduce)

Another option that may recover the situation is by running the following (use -f if you need to) and after do a filesystem check:

resize2fs -p /dev/vg1/lv3 512M
By shrinking the volume first, part of the underlying filesystem has been destroyed. The only option might be to rebuild the filesystem, if syg00's idea of extending the volume again doesn't work.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
reducing ext3 lvm's. majeztik Red Hat 7 01-04-2010 08:52 AM
Reducing size in LVM SBN Linux - General 8 07-28-2009 06:30 AM
Data lost while reducing the lvm kkishore Linux - Server 1 09-17-2007 06:03 AM
Reducing the Linux LVM(8e) partition itself (not PV, VG or LV). ajitkth Linux - General 1 03-08-2005 03:45 AM
Reducing size of PV (partition) in LVM clacour Linux - General 2 10-24-2003 08:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration