We have a virtual hosted Linux server, and in the last few months every now and then the HDD shrinks from 400GB down to the exact byte count that is in use. All existing data can be downloaded and displayed without a problem, but we can't upload or edit any files because of the "full" hard drive.

Here is a screenshot, where "size" should be 400GB: Screenshot of Linux disk free command output

This has happened twice before, and again today. The last times, when I reported the issue to the host, they said "that isn't possible, you must be doing it wrong", but soon after the call, the problem vanished without us doing anything, so I suppose that they have some kind of problem they're not willing to admit. Even after the fact, they acted like nothing was wrong and wrote me a mail in which they explained that I can use "df -h" to view available disk space (well duh, how do you think I noticed this particular issue?). Questions about if and what they had done were ignored.

It has happened around the 25th to 28th of the month, so I suspect that they might have a cronjob running every 30 days or so which wreaks havoc with some VM configs. I just want to understand the problem, but the host support hasn't been very helpful in that regard. I have tried Googling the issue, but any combination of search terms I can come up with just gives me tutorials on how to change HDD size in a virtual machine.

a) What could be the cause of shrinking HDD size in a Ubuntu 12.04.3 LTS server? Could there be anything in our virtual machine or is it more likely to be an issue with the vm host?

b) Can I do anything about it without needing to contact the host's support?

c) Is there anyway I can prevent this from happening at all?

  • 2
    What does dmesg/syslog say? Live FS shrinking on linux is not even possible, normally, as far as I know. So I wonder what's hapening here. Is the file system mounted read only, due to a fault, perhaps?
    – Halfgaar
    Oct 25 '13 at 10:25
  • No output at all. Is that normal? Also, if the file system was mounted read only, it should still show the correct size though, shouldn't it? Another thing worth mentioning: the last two times it happened, I noticed it early, and I could watch it slowly shrinking - whenever I checked with df, a few bytes were gone, and the process took maybe two hours to go from the full 400GB to about 200GB. I don't know if that detail helps in any way, but it's strange enough to mention.
    – Christian
    Oct 25 '13 at 10:38
  • Do you know which hypervisor the host is using? Oct 25 '13 at 10:40
  • Unfortunately not, and a cursory search on their page and Google didn't yield any results. Is there some way I can find this out?
    – Christian
    Oct 25 '13 at 10:50
  • Thanks for the edits, I guess I have a bad habit of making novels out of questions :)
    – Christian
    Oct 28 '13 at 9:09

My guess is that they use OpenVZ or something similar where your root file system is just a directory on the host machine and not a container, making it absolutely dynamic. The problem is likely that they overcommit the disk space and when the host file system runs full, so does your root file system.

You can't do anything about this except changing the hoster.

  • I was suspecting something roughly along those lines. Thanks for the answer, although it isn't really good news. I'll keep pushing my boss to make the move to a proper dedicated server, or at the very least to a more professional hoster.
    – Christian
    Oct 25 '13 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.