Is there an easy way to decrease the disk volume on a Ubuntu server?
I run a virtual environment and need to decrease my disk volume since I'm running out of space in my non virtual environment.
I think you will have to use resize2fs.
You will have to:
Here is a more extensive step by step instructions.
You will need to first resize the filesystem, then the partition table, and then tell the virtual hypervisor to resize its own disk. As somebody else stated, booting it in a liveCD and then using gparted is VERY easy to do. In fact its the only way to do it if you have the filesystem mounted, which will always be the case for your root filesystem.
If you just want to resize /home or some other thing you can unmount..
parted will show you the start/stop with parted -l
If I wanted to resize /dev/sda4:
Then I'd just have to tell the virtual disk provider to shrink its disk to the appropriate size.
Note that this is fairly dangerous, so backup any important data.
If you meant you want to resize your filesystem which is probably ext* have a look at this guide http://www.howtoforge.com/linux_resizing_ext3_partitions
If you meant you want to reduce your disk usage by removing temporary and cache data have a look at this: http://www.webupd8.org/2009/04/clean-unnecessary-temporarily-files-in.html
Beside resizing your partition using a LiveCD and
But this only affects non root user!
You can also create quotas for specific users using the