0

Running Ubuntu 18.04 on a Google Cloud Compute VM.

I run several processes, and they usually do well, until they don't. When one goes rogue, it can fill the disk in a matter of minutes.

The problem this causes, when the disk is entirely full, is that I can't SSH into the VM after that.

The process I must go through to clear the disk space involves shutting down the VM, creating a new VM, detaching the disk from the first VM, attaching it to the second VM and mounting it, clear the extra data, shut down second VM, detach disk, delete VM 2, attach disk to VM 1, boot VM1.

How can I reserve a gigabyte on the drive, that will either be made free upon system hard reset or hard shutdown, or some other trick to keep these disks from filling up.

Note, I don't think their always free tier allows me more than just the one boot disk. I need to stay within the Always Free constraint.

2

Different solution, prevent your processes from filling up the disk. At least two solutions:

  • Filesystem quotas as supported by the OS set to the user/group of the rogue processes.
  • Pre-allocate a "loopback" filesystem (a file mounted as a file system) set to the maximum size that your process can normally use, and make your processes use it: either mount it where the rogue process create their runaway output or change the config or the rogue processes to write where you set up such a filesystem

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.