[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: resizing root partition

On Fri, Apr 04, 2003 at 11:13:20AM -0500, Matthew Weier O'Phinney wrote:
> When I originally created my disk partitions, I figured 3GB would be
> plenty for my root partition, and gave the rest of my 30GB disk over to
> my /home partition. However, my root now shows 90% usage, and I'd like
> to expand it -- or move my /usr area off onto another partition. Is this
> possible, and if so, can somebody point me to a howto?

The easiest way is probably to put /usr somewhere else. A possible way

make a new partition and filesystem for /usr
make a directory /mnt/newusr
mount the new partition at /mnt/newusr
cd /
find usr|cpio -pmd /mnt/newusr
umount /mnt/newusr
init 1 (go to single-user)
cd /
mv usr usr.old
mkdir usr
mount the new partition at /usr
change /etc/fstab 
(optional) reboot and check that everything works (after changing
  partition tables, it is always a good idea to reboot to see if the
  system comes up correctly. If you reboot 3 months later and it doesn't
  work, you won't remember why)
rm -rf /usr.old

To resize your root partition (I tried it, and it seems to work, but I'm
still not sure if I just was lucky)

make sure there is room to expand (use parted to move other partitions
out of the way)
go single-user
mount / -o ro,remount (important!)
umount everything else
use parted to expand the root partition (it will complain that it is in
use. Ignore the complaint)
when it is done, hard reset the computer (I'm not sure a clean shutdown 
  wouldn't write to the disk with old assumptions, and with everything
  readonly, you should be safe)
hope for the best...
if /boot is on the same partition, have a boot floppy ready, just in


> -- 
> Matthew Weier O'Phinney
> matthew@weierophinney.net
> http://matthew.weierophinney.net
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: