On Thu, 27 Jan 2000,  1stFlight ! wrote about,  Need to grow my / partition:
> When I built my linux box I accidentally made my / partition too small
> ...is there any way to shrink one of my other partitions then grow my
> rroot?  Thanks
> 

There are many ways to do things, i would not take a chance myself to do
what you ask, however i would use the partitions on hand.

What do i mean by that.?

Say i have a complete system on a 1GB partition all mounted under "/" and
that partition is now 99% full and i cant miss a single byte of data.
I do have other partitions, lets make a lyout for all intensive perpouses.

/dev/hda1 = / 1GB
/dev/hda2 = swap 80Mb.
/dev/hda3 = dos partition 1GB
/dev/hda4 = extended
/dev/hda5 = spare 500Mb
/dev/hda6 = spare 500Mb

i would 'mv' all data from hda5 to hda6 so hda5 is left with just the
directory lost+found.
Look at my / partition and see which directory is used the most, possables
are /usr/local /home /usr/src 
I will take /home as the directory i am going to play with, now we dont
want to delete any files or drectorys, i would do the following.

mount /dev/hda5 as /mnt
cd /home
cp -Rp * /mnt
    copy Recursivly with permissions to /mnt
now /mnt has all the home directorys on it and most likely the ftp and http
directory if we are talking Redhat.

Before using the next command MAKE SURE you are in the correct dir, 
thats /home, use the pwd command to make sure.
rm -rf *
rm -rf .* (make sure ALL files are gone.
    delete the contens of /home
You are doing this as root so there should be no problem.
edit /etc/fstab
add the following.
umount /dev/hda5
/dev/hda5   /home    ext2    defaults    1 1
mount /home

You now have more space on /dev/hda1
There should be no permissions problems as you copied all with permissions
intact and the partition is mounted as default.

At bootup the /home partition will be mounted automaticly.

I hope you understand the principle here, and i hope the person with the
20Gb dribe Liz i think it was reads this mail as well as she will need to
do something along these lines.

Ray gave a simalar example only yesterday i think it was.

> 
> Darryl
-- 
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/

Reply via email to