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 |
"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 |
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 |
"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 |
THanks Jailbait,
I found a rescue image to boot from and reduced the size of root. Alex |
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 04:18 AM. |