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.
|
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. | ||||
|
feedback
|
|
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. | |||
feedback
|
|
I think you will have to use resize2fs. You will have to: Here is a more extensive step by step instructions. | |||
|
feedback
|
|
I want to extend my /boot partition. df -h (output)Filesystem Size Used Avail Use% Mounted on /dev/sda6 581G 251G 301G 46% / udev 2.9G 4.0K 2.9G 1% /dev tmpfs 1.2G 676K 1.2G 1% /run none 5.0M 8.0K 5.0M 1% /run/lock none 2.9G 140K 2.9G 1% /run/shm /dev/sda1 92M 72M 15M 83% /boot I want to expand my /boot partition to 500MB. Welcome any kind of help/direction. Thanks & regards, spidy | |||
|
feedback
|
|
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 | |||
|
feedback
|
|
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 | |||||
feedback
|
VBoxManage modifyhd yourdisk.vdi –compactcommand which looks like it might work for your purpose. See this tutorial, michaelcole.com/node/13, linux guest, windows host, but the syntax for theVboxmanagecommand is essentially the same I think. Basically, 1. backup data, 2. zerofill guest OS, and 3. runvboxmanage...and you should be set. Assuming this is what you were asking... – adempewolff 2 days ago