Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 24, 2011 1:03 pm 
Offline
Senior Newbie

Joined: Fri Jan 14, 2011 10:26 am
Posts: 10
My slice is often low on disk space so I have been tracking it very carefully. I am confused about what I am seeing and wonder if I am misinterpreting or misunderstanding...

I do a du command every week or so or when disk space is low. Here is the whole history: https://spreadsheets.google.com/spreads ... oIAI#gid=1

The command I do is:
$ su
$ cd /
$ du | sort -n -k1,7 -r | head -n50

As you can see in the spreadsheet, it looks like I am doing well, the total space in use in root and other directories is maintained and actually shrinking sometimes.

And yet, when I do a df, I see the percentage free dropping. It used to float around 85-90 and now it seems to always be pushing over 90 going higher.

For example, right now df says:

/dev/xvda 16255928 15085160 510168 97% /

The two sets of data don't align. The amount of used space that df says doesn't match at all what du says.

Can someone help me interpret what might be going on, or where my disconnect is (which can be entirely my ignorance?)

Thanks a lot!


Top
   
 Post subject:
PostPosted: Fri Jun 24, 2011 1:10 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
Is it possible that you have programs running that have files which you have unlinked open still?

Files are not truly removed as long as anything still uses them, even if they are not shown in the filesystem tree.


Top
   
 Post subject:
PostPosted: Fri Jun 24, 2011 1:16 pm 
Offline
Senior Newbie

Joined: Fri Jan 14, 2011 10:26 am
Posts: 10
hawk7000 wrote:
Is it possible that you have programs running that have files which you have unlinked open still?

Files are not truly removed as long as anything still uses them, even if they are not shown in the filesystem tree.


Good thought. It's a running server, with a fairly big mysql database and other processes.... That might explain it, I guess.

Follow up question then would be, is there any way, short of rebooting, to cause mysql to release blocks that it's holding on for for one reason or other?

Thanks!


Top
   
 Post subject:
PostPosted: Fri Jun 24, 2011 1:21 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
I wouldn't expect mysql to run into that sort of thing unless you have eg removed a log file that it's still writing to or something along those lines.


As for making mysql release space you may want to "optimize" tables (http://dev.mysql.com/doc/refman/5.6/en/ ... table.html) if you have removed large chunks of data.


(Edit: The latter is unrelated to your disk usage mismatch)


Top
   
 Post subject:
PostPosted: Fri Jun 24, 2011 2:39 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Few points, run lsof | grep deleted to see deleted files still in use. If using innodb and mysql deleting rows doesn't remove space (makes sense huh? :P) only dropping a table does.

I set up http://dev.mysql.com/doc/refman/5.0/en/ ... paces.html then if you drop a table it's space is removed. To reclaim space taken up run optimize on the table however on large tables this will take a while since innodb optimize = recreate the table.

Also you can expand your disk with the free space you were given last week! :)

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group