LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   How to reduce the size of root / (https://www.linuxquestions.org/questions/suse-opensuse-60/how-to-reduce-the-size-of-root-370752/)

alexf 10-07-2005 05:01 PM

How to reduce the size of root /
 
Hi,
I'm a newbie to the Linux world. I'm running SUse 9.1 personal edition using reiserfs. I installed Suse on a virtual PC. I don't remember any part during the installation prompting me to create different mount points and logical volumes. I ended up having / at the size of 15G. I want to reduce the size of root so that I could create other logical volumes. How do I reduce the size of root?

Thanks,
Alex

jailbait 10-07-2005 06:46 PM

"I ended up having / at the size of 15G. I want to reduce the size of root so that I could create other logical volumes. How do I reduce the size of root?"

First you need to find out how much of the 15G partition is actually being used. You can then determine how much space you can transfer from the / partition to new logical partitions. To find out how much of the partition is used issue the command:

du -s -h

Then check what file system type / is. You can do this with the mount command:

mount

Most likely / is either an ext2 or ext3 file system. If so you can shrink the file system using the resize2fs command. See:

man resizefs

Then you can use fdisk or parted to reduce the size of the / partition. Then use fdisk or parted to create some new partitions in the spare you removed from the / partition. See:

man fdisk

---------------------------------
Steve Stites

alexf 10-07-2005 07:39 PM

The problem is that it's the / (root) mount point. I would have to unmount it before resizing it but because it's root I can't unmount it.
Alex

jailbait 10-07-2005 07:49 PM

"The problem is that it's the / (root) mount point. I would have to unmount it before resizing it but because it's root I can't unmount it."

Any work that needs to be done on umounted partition can be done by booting a rescue CD.

I made a mistake in my first reply. Since you are using a reiserfs you would need to use resize_reiserfs to resize your file system.

-----------------------------
Steve Stites

alexf 10-10-2005 01:33 PM

THanks Jailbait,
I found a rescue image to boot from and reduced the size of root.

Alex

1kyle 10-10-2005 04:53 PM

I'd also make a different partition for /home --so you can store all your temporary data there -- you can also use the same /home partition even if you switch distros. Depending on what you've installed you might also consider a separate partition for /usr. However only /home can be re-used without re-formatting if you install a different distro (other than purely data type partitions such as /datavol1 or whatever if you share these with other computers).

Cheers

-K


All times are GMT -5. The time now is 12:47 AM.