This page contains useful tips on managing disk space on your system.
du -d 15 -h | grep -P '^[0-9\.]+G'
This command will help you find folders that have used up to much storage.
You can see that the yournet domain has consumed 1.6G of disk space while the whole var folder is using 21G.
You should also know that log files don't just exist in /var/log
They also exist in the users log folder.
tail -f error.log
Use this command to watch errors for a specific site.
You can turn verbose logging off. Please see our page on managing the web server for more information.
Note that if you delete a large log file you will then have to restart the web server so that the deleted file is released and the space can be recovered to the file system.
Monitoring the disk system
watch -n1 df -h
This command is useful to have open in a window if you know you're having a problem. It lets you watch disk capacity.
watch -n1 df -ih
This version will watch inodes. This is also useful to know about if you're running drivish as it creates hard links in the file system. It is possible to run out of hard link capacity before you run out of disk space.
Expanding the Disk System
If you've followed our installation recommendations and set up a DTC-XEN system on LVM then this section explains how to expand your disk system.
To see how much space is still free on the LVM for your VMs: ...
To add more capacity you need to add a new disk to your system, format it, then add it to the Logical Volume Group that your VM's exist on.
Expanding your VMs Disk Capacity.
Assuming you have enough free space in the LVG (Logical Volume Group), this is a simple two step process which can be done on your live system.
Frist, allocate the Volume more space...
root@myDom0:/# lvextend -L+40G /dev/vg01/xen04
File descriptor 7 (pipe:) leaked on lvextend invocation. Parent PID 23196: bash
Extending logical volume xen04 to 120.00 GiB
Logical volume xen04 successfully resized
Second, log into your VM and expand the disk...
root@:myvps>_ /var/lib/dtc/etc/ssl# resize2fs /dev/xvda
resize2fs 1.42.5 (29-Jul-2012)
Filesystem at /dev/xvda is mounted on /; on-line resizing required
old_desc_blocks = 5, new_desc_blocks = 8
Performing an on-line resize of /dev/xvda to 31457280 (4k) blocks.
The filesystem on /dev/xvda is now 31457280 blocks long.
Editing this page means accepting its license.