Re: SOS! Root filled, want to recover MySQL data! Laurenz Albe wrote:
> Davide Bianchi <davideyeahsure@onlyforfun.net> wrote:
>>> logged into my server an hour ago just to find that the root
>>> partition is 100% filled:
>>>
>>> Because of that (I think), the data directory associated with my
>>> MySQL installation got shot (read: disappeared!).
>>
>> My experience is that directories don't disappear "automagically",
>> someone zapped it or the disk is b0rken.
>>
>>> What would be the best way to recover the mysql data?
>>
>> Restore from a backup. You *do* have backups, right?
>>
>> Davide
>
> Davide? Sounds more like Peter....
For newbies, Laurenz is referring to Peter Breuer. I haven't seen him here
lately.
> Questions to the original poster:
>
> - Is the MySQL data directory in the root partition or on another
> filesystem?
>
> - Did you run a file system check before you looked in lost+found?
> Only a filesystem check puts data there.
>
> Things for you to do:
>
> - Boot the system from a rescue CD and check the root file system.
>
> - Verify that the MySQL data reside on the root partition (check with
> /etc/fstab).
>
> - If all looks good, mount the root partition read-write and delete
> some files.
And look for what overflowed. /var/log is a fun place to have overflow if
you have immense log files that never get rotated, which is easy to do
accidentally. /usr/local is another if you're dropping in big locally
compiled software bundles, as is /tmp when downloading things like ISO
images with some web browsers. I find it very difficult to predict what
partition will next need a few gig of space, so really despise making lots
and lots of partitions for /, /usr, /tmp, /var, /daata, /opt, etc., etc.,
etc.
> - If things do not look good, do not mount the partition read-write.
> If necessary, contract a professional who can help you salvage the
> data.
>
> Things to do next time to avoid the problem:
>
> - Do backups.
>
> - Do not keep application data on the root partition.
And keep simple, *LARGE* spaces in your partitions available.
And monitor your systems for overflowing disks with some way to report it: I
rather like Nagios for that, myself. |