LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-17-2005, 10:35 AM   #1
dubya
Member
 
Registered: Mar 2004
Location: Kitchener, Ontario, Canada
Posts: 386

Rep: Reputation: 30
Reduce LV -> Partition table corrupt


Hi,

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.

Thanks.
 
Old 06-17-2005, 01:30 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
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.
 
Old 06-17-2005, 01:38 PM   #3
dubya
Member
 
Registered: Mar 2004
Location: Kitchener, Ontario, Canada
Posts: 386

Original Poster
Rep: Reputation: 30
First, Thank you very much for you post.

Quote:
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.
 
Old 06-17-2005, 01:50 PM   #4
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Thatís the first thing I would try, as long as you didnít do anything with the ďfreeĒ space generated by reducing the LV.
 
Old 06-17-2005, 09:28 PM   #5
dubya
Member
 
Registered: Mar 2004
Location: Kitchener, Ontario, Canada
Posts: 386

Original Poster
Rep: Reputation: 30
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).

How would I go about recreating this link?

Thanks for all the help.
 
Old 06-17-2005, 11:35 PM   #6
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Try making the kernel aware of the VG and its contents by reactivating it with:

vgchange -a y
 
  


Reply


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
superblock or partition table corrupt? Kristian2 Linux - Newbie 1 05-11-2004 10:34 AM
corrupt partition table Verso Linux - Hardware 5 12-16-2003 11:23 AM
partition table invalid or corrupt colindoig Linux - Software 3 10-01-2003 10:14 PM
Corrupt Partition Table BigBadPenguin Linux - Hardware 3 09-02-2003 12:02 PM
Corrupt partition table mback Linux - Software 3 04-27-2002 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:24 AM.

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