Jump to content

Running out od disk space....


matfish

Recommended Posts

Hi there, bit of a "systems maintenance" newbie.

 

I have a server, running a big database, with lots of little mico-sites showing the disk space usage below:

 

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              989M  412M  526M  44% /
/dev/md5              4.9G  4.1G  898M  83% /usr
/dev/md7              100G   50G   50G  51% /var
/dev/md6              4.9G  126M  4.8G   3% /home
none                  997M   36K  997M   1% /tmp

 

I don't really know what is used where, but /dev/md5 lately is on the rise - is this where the database is stored? Will it all come to a stop when /dev/md5 is full?

 

Many thanks

Link to comment
Share on other sites

Thanks for the replies.

 

The server is purchased as a dedicated server with a hosting company, therefore I can only access via Plesk and SSH.

 

Its only use is the main website and several smaller micro sites. As I said, the database is huge and collects a lot of customer details, registration forms and statistics using PHP and MySQL 5.

 

Apart from the websites and database, I have no idea what else could be happening on here.. Where would access logs be stored? Since my first post, /usr has used another 8M.

 

I really don't want to come to the point where it displays "Run out of disk space" across the sites and not knowing what to delete?

 

Any help would be appreciated.

 

Many thanks

Link to comment
Share on other sites

Where would access logs be stored?

 

All variable data (eg; databases, websites & logs) should be under /var

 

This will find files larger than 50mg under /usr and print them for you. Might help.

 

find /usr -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Link to comment
Share on other sites

you can also try a similar find command for files modified within the last 30 minutes:

find /usr -type f -mmin -30 -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

 

easy way to solve this is to call your hosting company and complain. this is the kind of stuff you are paying them for.

Link to comment
Share on other sites

Hi Thorpe,

 

This shows:

 

/usr/local/psa/var/lib/webalizer/webalizer.cache: 80M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/clicktracker.MYD: 68M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000001: 93M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000003: 386M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000004: 185M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000005: 182M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000008: 101M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000012: 137M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000014: 529M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000015: 102M
/usr/lib/locale/locale-archive: 51M

 

What are they related too?

 

Many thanks for your help!

Link to comment
Share on other sites

Hi rhodesa,

 

The hosting company will not help me as it was purchased as a dedicated server and should be maintained by myself. They will not even let us purchase more disk space unless we move everything to a completely new server - which I really do not want to do at the moment.

 

Many thanks

Link to comment
Share on other sites

Last files modified:

 

/usr/local/psa/admin/logs/ssl_log: 858K
/usr/local/psa/admin/logs/httpsd_access_log: 1.3M
/usr/local/psa/admin/logs/ssl_cache.pag: 8.0K
/usr/local/psa/admin/sessions/sess_079e5b5c34da2d09e06b7be3c6a65aa1: 1.2K
/usr/local/psa/var/log/maillog: 777K
/usr/local/psa/var/lock/files/336d5ebc5436534e61d16e63ddfca327: 0
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table1].MYI: 212K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table2].MYD: 35M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table3]p.MYD: 1.3M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table4].MYD: 15M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table5].MYD: 68M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table6].MYD: 1.4M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table7].MYD: 1.3M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table8].MYI: 22M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table9].MYI: 2.4M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table10].MYD: 9.7M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table11].MYI: 6.0M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table12].MYI: 347K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table13].MYI:1.4M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table14].MYD:15M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table15].MYI: 697K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table16].MYI: 892K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table17].MYD: 11M
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table18].MYI: 571K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table19].MYD: 46K
/usr/local/mysql-standard-5.0.22-linux-i686/data/[DB-name]/[table20].MYD: 2.4M
/usr/local/mysql-standard-5.0.22-linux-i686/data/mysql-bin.000015: 102M

 

Seems they are the tables in the database?

 

Many thanks

Link to comment
Share on other sites

Hi, Many thanks for everyones help - Seem to be getting somewhere now.

 

I found:

 

-rw-rw----  1 mysql5 mysql5  93M May 20 09:59 mysql-bin.000001
-rw-rw----  1 mysql5 mysql5  18M May 22 08:40 mysql-bin.000002
-rw-rw----  1 mysql5 mysql5 386M Jul  3 09:15 mysql-bin.000003
-rw-rw----  1 mysql5 mysql5 185M Jul 21 11:45 mysql-bin.000004
-rw-rw----  1 mysql5 mysql5 182M Aug  8 08:45 mysql-bin.000005
-rw-rw----  1 mysql5 mysql5 3.6M Aug  8 12:46 mysql-bin.000006
-rw-rw----  1 mysql5 mysql5  117 Aug  8 13:49 mysql-bin.000007
-rw-rw----  1 mysql5 mysql5 101M Aug 18 10:18 mysql-bin.000008
-rw-rw----  1 mysql5 mysql5 974K Aug 18 11:58 mysql-bin.000009
-rw-rw----  1 mysql5 mysql5 4.6M Aug 18 17:17 mysql-bin.000010
-rw-rw----  1 mysql5 mysql5  19M Aug 20 11:30 mysql-bin.000011
-rw-rw----  1 mysql5 mysql5 137M Sep  1 10:20 mysql-bin.000012
-rw-rw----  1 mysql5 mysql5  26M Sep  3 10:08 mysql-bin.000013
-rw-rw----  1 mysql5 mysql5 529M Oct 14 23:44 mysql-bin.000014
-rw-rw----  1 mysql5 mysql5 103M Oct 21 16:22 mysql-bin.000015

 

Which are the logs you refer too. I'm not that advanced to be moving the data folder to a new location. Can these files be deleted or the contents deleted or what do these files actually do and store?

 

Thanks again

Link to comment
Share on other sites

I tailed one of the files which was a big mistake, however found it is storing all the query's made on the databases. Its stored all the inserts, updates etc...

 

Just wondering what would happen if they got deleted?! Would it just start again?

 

Thanks

Link to comment
Share on other sites

I tailed one of the files which was a big mistake

 

Did you even read the link rhodesa sent you? They are log files stored in binary form. You need to use the tools provided to read them.

 

They are simply log files. They store logs of events that are perfomed on your database.

 

If your not interested in looking at them, they are safe to remove.

Link to comment
Share on other sites

Hi thorpe,

 

Yes I read the link, as I mentioned - I'm a newbie I guess and just went back to basics to tail the last 10 lines, It only through a wobbley on the server for a bit then server loads came back down anyhoo.

 

I'm going to just move them all for now onto some reserved space and see what happens. I can always put them back if things go tits up.

 

Hours of googling didnt give me the answers you have helped me with.

 

Thanking you all for your help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.