Fedora Linux Support Community & Resources Center
  #1  
Old 12th October 2005, 01:43 PM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 119
Core 4 partition resizing catch 22

I made the mistake of using the default partitioning in installing FC4 - the default is to
use most of the available space for the home partition (which seems a fairly unfortunate default for the default logical volume system). Anyway, I now need a different partitioning scheme, reducing the size of the home partition and using the released space for another purpose. I've found relatively detailed instructions on how to do that on linuxquestions.org, using e2fsck and resize2fs from a rescue CD.
However there seems to be a catch-22 in FC4. I need to boot from another filesystem in order to be able to unmount and resize the home filesystem, so that I can reduce the logical volume size. As far as I can see, that means a rescue CD of some kind. I've tried a couple. The FC4 rescue CD actually mounts and relies on the home filesystem (in particular, that's where it gets /bin and /sbin from); so that doesn't work. I've tried looking for other rescue CDs. The latest Debian version, from about May this year, uses too-old versions of e2fsck and resize2fs; they report that the filesystem has unrecognised features, and refuse to touch it. Since the Debian CD is actually relatively recent, I doubt I'm going to find a rescue CD for any system that has sufficiently up-to-date ext3 handling software.
Does anyone have any decent suggestions on how to get around this, so that I can shrink my ext3 filesystem, and then the logical volume? For example, is there any reasonable way to update the e2fsck and resize2fs utilities (in resize2fs' case, that means also rebuilding some system libraries) on the Debian rescue disk iso image (I can't seem to find a way to open it in write mode)
Thanks and Best Wishes
Bob McKay
Reply With Quote
  #2  
Old 12th October 2005, 03:29 PM
homey Offline
Registered User
 
Join Date: Feb 2005
Posts: 415
Quote:
The FC4 rescue CD actually mounts and relies on the home filesystem (in particular, that's where it gets /bin and /sbin from); so that doesn't work.
Sorry, but that is incorrect. The FC4 rescue CD and FC4 CD#1 are able to run on their own. If you accidently told it to mount /mnt/sysimge, you can unmount it...
For example:
Check to see what is mounted with the command: mount
Un-mount it with the command: umount /mnt/sysimage

The command: which e3fsck shows it as /usr/sbin/e2fsck
and on my FC4 box, it's at /sbin/e2fsck

The command: which resize2fs shows it as /usr/sbin/resize2fs where that also is at /sbin/resize2fs on my FC4 box.

I got Knoppix 4.0.2 around 9/25/05 , can't remember if it has the updated e2fsck but it may have.
Reply With Quote
  #3  
Old 12th October 2005, 04:33 PM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 119
Quote:
Originally Posted by homey
Sorry, but that is incorrect. The FC4 rescue CD and FC4 CD#1 are able to run on their own. If you accidently told it to mount /mnt/sysimge, you can unmount it...
For example:

I got Knoppix 4.0.2 around 9/25/05 , can't remember if it has the updated e2fsck but it may have.
Sorry, I should have said that more carefully. The rescude CD can run on its own, but it is very minimal and many of the important system commands aren't available unless you mount a filesystem containing them. My point is that the commands I need aren't on the CD, and the only place I can easily get them for this purpose is precisely the filesystem I needed to unmount.

I'll give downloading Knoppix a try, thanks.
Reply With Quote
  #4  
Old 14th October 2005, 04:09 AM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 119
Thanks to all who helped me solve this problem. I have now found a solution that worked for me. Since I know other people are being caught by fedora's disastrous default logical volume setup, I'm providing here the recipe I used. If you decide to do something similar, please understand I am _not_ a linux expert. You should evaluate for yourself whether it might work for you, and make sure that you fully understand the risks. Especially, make sure you have
backed up your system fully first. I would not have attempted this before I discovered dar (http://dar.linux.free.fr/), and was certain I had the system fully backed up.

A. I ran Knoppix
1. Downloaded Knoppix and burned to CD (http://www.knoppix.net/)
2. Booted Knoppix on the computer

B. Got LVM Running on Knoppix (from http://www.knoppix.net/wiki/LVM2)
1. configured internet connection under Knoppix
2. modprobe dm-mod
3. apt-get update
4. apt-get install lvm-common lvm2
5. lndir /lib/lvm-200/ /usr/sbin/

C. Resized the volume (based on http://www.linuxquestions.org/questi...ght=resize+lvm)
The volume I was resizing was /dev/VolGroup00/LogVol00
I was resizing to 58G
It's _crucial_ that the parameters in resize2fs and in lvreduce match
Otherwise you will probably destroy your filesystem
1. vgscan
2. vgchange -a y?3. e2fsck /dev/VolGroup00/LogVol00?4. resize2fs -p /dev/VolGroup00/LogVol00 58G?5. lvreduce -L58G /dev/VolGroup00/LogVol00

I strongly recommend including the -p parameter in resize2fs. My resize took a couple of hours, and (because I omitted this), I had no way of confirming that it was actually proceeding rather than just hung. Fortunately, I resisted the temptation to reboot...
Reply With Quote
Reply

Tags
catch, core, partition, resizing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing partition bardaos Using Fedora 3 15th May 2006 07:50 PM
Resizing Partition? fvs Installation, Upgrades and Live Media 2 11th May 2006 01:44 PM
resizing a lvm partition roskoo Installation, Upgrades and Live Media 1 26th November 2005 08:54 AM
Resizing FC2 Partition? Red Army EOL (End Of Life) Versions 6 2nd October 2004 11:02 AM


Current GMT-time: 07:06 (Monday, 21-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat