LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-11-2011, 09:13 AM   #1
halp
LQ Newbie
 
Registered: May 2011
Posts: 4

Rep: Reputation: 0
Shrunk a LVM2 PV, now can't do ANYTHING to lv_root


I did all the fsck, resize2fs, lvresize, pvresive, parted, etc. stuff and was very careful about what I was doing, but clearly wasn't careful enough. I did backup lv_root to another drive with fsarchiver before I buggered things up, but I can't restore it because, well... I don't know! At this point I'd really just like to wipe the drive I messed up except for /boot and start over but I don't know how to do that when the system seems to think the drive is mounted when it ISN'T.

Here's some info:

- device is /dev/sdb with sdb1 as /boot and sdb2 a lvm2 volume group containing lv_root and lv_swap -- it was a default Fedora 11 installation that used up the whole drive

- i did nothing to /boot and it seems to be fine, grub loads, choosing Fedora 11 shows the logo but quickly becomes a black screen, choosing Fedora 15 Live USB that I originally added from Fedora 11 works just fine (currently trying to fix things from Fedora 15)

- i deleted and recreated lv_swap and it still shows up in /dev/vg_box

- i shrunk lv_root and the filesystem is within the right size of the lv, which is within the right size of the pv, which is within the right size of the partition, which i made sure i used the right sectors, but lv_root does not show up in /dev/vg_box

- lvscan says both lv_swap and lv_root are active but lvdisplay says lv_root is "NOT available"

- system thinks /dev/sdb2 is mounted even though it ISN'T and can't seem to do ANYTHING to it because of this

lvchange -ay /dev/vg_box gives:

Code:
device-mapper: resume ioctl failed: Invalid argument
  Unable to resume vg_box-lv_root (253:2)
lvchange -an /dev/vg_box gives:

Code:
LV vg_box/lv_swap in use: not deactivating
umount /dev/vg_box/lv_swap gives:

Code:
umount: /dev/vg_box/lv_swap: not mounted
...I should have been writing stuff down as I was going. I can't think of what other errors I came across that might have helped more.

Also I'm extremely tired right now so I apologize if I'm not explaining things well enough.
 
Old 05-11-2011, 09:09 PM   #2
halp
LQ Newbie
 
Registered: May 2011
Posts: 4

Original Poster
Rep: Reputation: 0
I could have sworn I tried dd already but apparently not because after trying a 'dd if=/dev/zero of=/dev/sdb2' it did the trick. I waited a full ~5 hours for it to zero ~120GB, but I just realized I probably only really needed to specify the first little bit didn't I?

Anyway, after the dd and a reboot, the VG/PV/LV were all gone and I was able to delete the partition. I'm back to square one, but at least that nightmare is over. Now I just need to recreate everything but smaller from the get-go, and restore my backup. Things should go more smoothly now.
 
Old 05-12-2011, 12:06 AM   #3
halp
LQ Newbie
 
Registered: May 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Okay, the original problem was solved, but now I have another slight problem.

There were no errors reported during the filesystem restore with fsarchiver and everything seems to be intact. I have no problem accessing the files from Fedora 15 Live.

Fedora 11 boots again but once it gets to the login screen there are no users displayed and the mouse and keyboard don't work. I'm wondering if it's just that /boot needs to be updated because the LVs might be slightly different? Could it be UUID-related or something? I'll start stumbling about and see if I can figure out where I should go from here, but feel free to nudge me in the right direction...
 
Old 05-12-2011, 05:30 AM   #4
halp
LQ Newbie
 
Registered: May 2011
Posts: 4

Original Poster
Rep: Reputation: 0
I was set on trying to see if reinstalling grub would help even though I couldn't seem to get it to work, until I downloaded/burned a Fedora 11 disc and did it from system rescue -- THEN it worked. Everything is working again, and on the reduced partition. SELinux seemed to be reset but that's not a big deal.


THE
END
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unexpectedly shrunk window MikeQ Linux - Networking 2 03-15-2012 06:31 PM
LXer: Honey, I shrunk the desktop LXer Syndicated Linux News 0 02-11-2008 04:00 PM
My / partition shrunk Bengan Mandriva 9 12-31-2005 03:57 PM
certain webpages got shrunk in my browser vadoo Linux - General 2 06-30-2005 03:58 AM
certain webpages got shrunk in my browser, vadoo Linux - Newbie 2 06-30-2005 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration