Shrinking LVM from rescue mode

Place to discuss Fedora and/or Red Hat

Shrinking LVM from rescue mode

Postby X11 » Tue May 02, 2006 12:14 pm

Hey,

I want to shrink my install and the volume from the commandline on the rescue, only I have two problems

1) I dont know the command to shrink the lvm volume, I thought it would be lvshrink, but lvshrink doesnt seem to be on the disk, just 'lvm'.

2) My volume doesnt show up under /dev/mapper which makes it, a lot more difficult.

Some help would be great.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby Void Main » Tue May 02, 2006 2:14 pm

I wrote a TIP on how to do this a while back:

http://voidmain.is-a-geek.net/redhat/fe ... olume.html

The "lvm" command is all you need as all of the other commands (pvscan, lvscan, lvchange, vgextend etc, etc) are just symbolic links to the lvm command. Just insert "lvm" in front of the commands in my tip and it should work. For instance instead of "pvscan" you would use "lvm pvscan", etc.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby X11 » Mon May 15, 2006 4:07 am

Odd when I try to do the "vgreduce VolGroup00 /dev/hda2" bit it just says "Physical volume "/dev/hda2" still in use". :(

Other than that the resize is fine, it boots etc and yeah.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby X11 » Mon May 15, 2006 4:40 am

nevermind thats stupid

I want to shrink the volume group, so I have space for another physical primary partition, i cant work that out.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby Void Main » Mon May 15, 2006 8:27 am

Did you perform all the steps in my tip? There are things you have to do before the step you are referring to (resize2fs, lvreduce) and you didn't indicated if any of that was successful. That is, you have to shrink the things inside of the volume group before you can shrink the volume group. Look over my tip again starting near the bottom where the instructions are in a red box reversing what I had done in the first part of the tip:

http://voidmain.is-a-geek.net/redhat/fe ... olume.html

Obvioulsy your numbers won't match the ones in my tip. Copy and paste all your commands into a message here and include a copy of your partition table and outputs from your vgdisplay, lvdisplay, pvdisplay, and fdisk -l.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 0 guests

cron