LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Resize That Root (https://www.linuxquestions.org/questions/linux-software-2/resize-that-root-259950/)

inescapeableus 11-27-2004 05:33 PM

Resize That Root
 
Alright well here is the snag. I installed Yoper. During the install I must have been partially awake and I made it so my root partition is 2gigs. As we are all aware that just doesn't cut it and it is filling up fast. Is there anyway that I can relocate space from my home to my root? any ideas would be appreciated.

Tinkster 11-27-2004 05:36 PM

What file-system are you using for both?
How big is which?


Cheers,
Tink

mritch 11-27-2004 08:32 PM

do a "du -h --max-depth 1" in your / directory. you'll see that there's a lot in /usr.
so we'll split /usr away to a seperate partition:

1. backup your data! work in runlevel 1!
2. empty some space where /usr will go. ex. move data from your /home away to a temproary storage.
3. unmount the empty/old home and split this partition into two halfs (cfdisk/parted) with enough place to hold usr (it's getting quite big with time).
4. format both new partitions and make a new directory /usr2 (mke2fs/mkreiserfs).
5. edit your fstab to get /home and /usr2 mounted and reboot into single user mode.
6. move your home-data back and copy (cp -a) all your data from your old /usr to the new (usr2).
7. now rename /usr to /usr_old and change the /usr2 line in your fstab to /usr and reboot to see that there isn't anything doing wrong.
8. now you won't need your /usr_old anymore and can remove it.....

..free space.

you can do this easily with another directory, but be sure not to touch /dev if you're not sure what you do. for more that 4 partitions on one disk you need to build extended partitions. write down the partition table of the drive to be sure where what is in future.
post here if there are any other questions.

sl mritch.

inescapeableus 11-27-2004 08:58 PM

Alright guys, thanks for the response. This is my specs as per "df -h"

Filesystem Size Used Avail Use% Mounted on
rootfs 4.6G 2.7G 1.8G 60% /
/dev/root 4.6G 2.7G 1.8G 60% /
/dev/hda2 30G 2.7G 26G 10% /home

you can clearly see my restrictions. I will attempt to follow the instructions. Thanks.

and this

16K ./lost+found
4.4M ./bin
2.9M ./boot
68K ./dev
4.0K ./floppy
2.7G ./home
4.0K ./initrd
16K ./isolinux
61M ./lib
12K ./mnt
4.0K ./opt
903M ./proc
6.3M ./root
6.5M ./sbin
0 ./sys
1.3M ./tmp
2.4G ./usr
101M ./var
39M ./etc
4.0K ./yos
4.0K ./.qt
6.2G .


All times are GMT -5. The time now is 08:28 PM.