Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program that writes files to disk. I want to test the programs behaviour when the filesystem written to is full.

What is the best option for creating a small filesystem to test this without having to order disk setup which on the SAN... I guess Ram disk requires reboots which is not great.

share|improve this question
up vote 3 down vote accepted

Use a loop device sounds good. You can dd to a file, and then make an fs on the file, and loop mount it for testing. You can even simulate partitions. http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux

share|improve this answer

You should use /dev/full as it is made available just for that.
/dev/full is virtual device that is always full.

$ echo "Hello world" > /dev/full
bash: echo: write error: No space left on device

See http://en.wikipedia.org/wiki//dev/full

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .