FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently tried to reduce the size of one of my logical volumes using the command:
Code:
lvreduce /dev/VolGroup00/LogVol02 --size <can't remember what size I reduced to>
and now when I try to boot, I get many errors and then get dropped to a shell. I get messages saying that the I have a bad super block on LogVol00 and that the partition table is corrupt.
I'm really not sure what to do since I don't have too much experience with logical volumes. I can boot and login with the rescue CD or login as root after I get these errors, so all is not lost, but I do have a lot of data on these volumes that I absolutely need to recover so you can understand that any help would be much appreciated.
Did you resize the underlying filesystem before you reduced the LV? If “No”, that’s probably the problem.
Refer to the LVM HowTo ( http://tldp.org/HOWTO/LVM-HOWTO/reducelv.html ) section about reducing the size of a logical volume. Briefly, you need to reduce the size of the filesystem before you reduce the size of the logical volume.
In general, it’s better to enlarge logical volumes than it is to reduce them, especially if you are using an ext3 file system. It is fairly easy to enlarge an ext3 filesystem, but fairly difficult to reduce one.
Typically, you want to leave some (or a lot of) empty space in the volume group so that you can allow the logical volumes to grow as needed. You just enlarge a logical volume and then enlarge the filesystem used in the LV. If you completely fill a volume group with logical volumes in the beginning, then you are not making optimal use of the LVMs.
Originally posted by WhatsHisName ...you need to reduce the size of the filesystem before you reduce the size of the logical volume.
An important lesson I will not forget. However, now that I've messed things up by reducing the size of the LV first instead of the actual filesystem, how do get back to the way things were before? If I just resize the LV back to it's original, will it be like nothing happened or is there some other process I need to go through?
Again, thanks a lot for your help; it's important I fix this.
Okay, I think I fixed that, but amongst the fsck's and other things I ran in the process, something else got messed up.
Now when I boot I get a message saying /dev/VolGroup00/LogVol00 doesn't exist (which I can't find when I look in the dev directory), but lvscan shows all three logical volumes (root, swap, home).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.