Where did all my disk space go?

can-of-wormsI hit a snag this week on my dev box.

The snag being, I was using 100% of the space on my VM.

How? How could this be? I had a single Symfony site, a database, and neither were that big.

But development had been going on a while, and I had noticed on ssh’ing in, that Ubuntu was telling me that my disk space was slowly but surely diminishing.

Silly me for only setting up an 8gb VM.

But still, a little strange.

Anyway, I did the usual – php app/console cache:clear – which got me some space back, but not much.

I added a new disk in VMWare and followed the GParted Live CD instructions, but then it turns out that won’t work for VMWare. You have to extend the LVM (or something!) and frankly, I didn’t have time nor the inclination to do any of that.

Still, the cache:clear had got me a little bit of breathing room. Enough to allow me to work through yesterday.

Then today, I was dropping and recreating the schema, and lo-and-behold, the disk ran out of space again.

Frustrating.

me@my-ubuntu:/var/www/html/mySite$ df
Filesystem                   1K-blocks    Used Available Use% Mounted on
/dev/mapper/ubuntu--tlf-root   6946528 6593648        12 100% /
udev                            505076       4    505072   1% /dev
tmpfs                           205056     292    204764   1% /run
none                              5120       0      5120   0% /run/lock
none                            512636       0    512636   0% /run/shm
/dev/sda1                       233191  139705     81045  64% /boot

🙁

Then I figured, well, why not manually kill the entire cache directory and see where that gets me:

me@my-ubuntu:/var/www/html/mySite/app/cache$ sudo rm -rf *
me@my-ubuntu:/var/www/html/mySite/app/cache$ df
Filesystem                   1K-blocks    Used Available Use% Mounted on
/dev/mapper/ubuntu--tlf-root   6946528 5081080   1512580  78% /
udev                            505076       4    505072   1% /dev
tmpfs                           205056     292    204764   1% /run
none                              5120       0      5120   0% /run/lock
none                            512636       0    512636   0% /run/shm
/dev/sda1                       233191  139705     81045  64% /boot

Let’s just say the machine made some seriously grunty sounds, but it did the job.

Still, I think next time I will go for a 16gb drive just to be sure.

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.