[CentOS] disk space trouble on ec2 instance

Mon Mar 2 00:17:16 UTC 2015
Tim Dunphy <bluethundr at gmail.com>

Hey guys,

 Thanks for this response. I just wanted to get back to you to let you know
how I was able to resolve this. And yeah I think it's more informative to
use df -m or df -k, so I'll try to stick to that from now on. Especially
when posting to the lists.

But I took a look around on the disk and saw that the /var/ww and
/usr/local directories were the biggest. So I just solved this problem that
you can only seem to do this easily on AWS. I grabbed the smallest EBS
volumes that I could use (1GB for www and 2GB for /usr/local) respectively
to use for those directories. 1GB being the smallest EBS volume you can get.

So like I said earlier, I had around 195MB of data in /var/www and about
1.5GB of date in /usr/local. So I just mounted them on /mnt/www and
/mnt/local and rsynced hte contents of those directories there. Blew away
the contents of the original directories with rm -rf (scary but I was very
careful while doing this). Then re-mounted them on those original paths.
And voila!

[root at ops:~] #df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/sda1                10080      8431      1546  85% /
none                       312         0       312   0% /dev/shm
/dev/sdi                151190    122853     20658  86% /backup/tapes
/dev/sdh                 10080       385      9183   5%
/backup/tapes/bacula-restores
/dev/sdf                 10080      2064      7504  22% /var/lib/mysql
fuse                 268435456         0 268435456   0% /backup/mysql
fuse                 268435456         0 268435456   0% /backup/svn
/dev/sdj                  1008       223       735  24% /var/www
/dev/sdk                  2016      1335       579  70% /usr/local

Problem solved.

So right now my root EBS volume is down to about 85% used instead of 100%
used.

Maybe a little unconventional, but at least it got the job done.

Thanks again, guys!
Tim



On Sat, Feb 28, 2015 at 2:46 AM, John R Pierce <pierce at hogranch.com> wrote:

> On 2/27/2015 10:46 PM, Tim Dunphy wrote:
>
>> I'm at a loss to explain how I can delete 190MB worth of data, reboot the
>> instance and still be at 100% usage.
>>
>
> 190MB is less than one percent of 9.9GB aka 9900MB
>
> BTW, for cases like this, I'd suggest using df -k or -m rather than -h to
> get more precise and consistent values.
>
>
> also note, Unix (and Linux) file systems usually have a reserved
> freespace, only root can write that last bit.   most modern file systems
> suffer from severe fragmentation if you completely fill them.   ext*fs, you
> adjust this with `tune2fs -m 1 /dev/sdXX`. XFS treats these reserved blocks
> as inviolable, so they don't show up as freespace, they can be changed with
> xfs_io but should be modified at your own risk.
>
>
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B