View Single Post

   
  #6 (permalink)  
Old 01-18-2008, 06:21 PM
The Natural Philosopher
 
Posts: n/a
Default Re: SOS! Root filled, want to recover MySQL data!

Matt Giwer wrote:
> im2kul2@gmail.com wrote:
>> I'd be GREATLY APRECIATED if someone could bail me out of this one! I
>> logged into my server an hour ago just to find that the root partition
>> is 100% filled:
>>
>> /dev/mapper/VolGroup00-LogVol00
>> 34285296 32544556 0 100% /
>>
>> Because of that (I think), the data directory associated with my MySQL
>> installation got shot (read: disappeared!).
>>
>> What would be the best way to recover the mysql data? The MySQL daemon
>> isn't running, and I can't find anything under lost+found, either!
>> Please help for I *really* need to get [some or most of] the data back!

>
> Log in as root and ls to see what is filling it with du. I've had it
> happen on a small drive and a cron task always failing (mrtg?) and it
> kept sending me email about it failing. From that I learned to check
> root mail at least once a year.
>

Indeed.

After many years of unattended Unix machines we learned to make root (/)
small, because it never changes, /var separate and very large, as if
anything goes mad thats where trash ends up, and install a /home for
user data.

When using an SQL app, that either goes in /home. or in its own /mysql
partition.

Yes, things need adapting for this file layout, but it paid dividends.

And if using a transaction file, that goes on a different DISK to the
main sql data.

That way, with nightly backups of both, you can always restore
accurately if a disk goes down.


Reply With Quote