Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

according to Percona:

Unmount the filesystem or make it read-only if...
You have filesystem corruption OR
You have dropped tables in innodb_file_per_table format

If I have innodb_file_per_table enabled, and accidently dropped a table, while the datadir is mounted as within the / partition , can data still be recovered? Obviously you can't work with an unmounted root filesystem.

Our VPS host has a defaulted filesystem table which we cannot customize. I was wondering in case of any future scenario.

edit: would mounting the / filesystem through NFS onto another system as read-only be a workaround?

TIA.

share|improve this question
    
> would mounting the / filesystem through NFS onto another system as > read-only be a workaround? I'd say that'd be the most sound, and least frustrating way to recover. However; some more insight into what kind of recovery is being performed might equate to better answers. –  thinice Nov 18 '12 at 4:31

2 Answers 2

Is making the root filesystem read-only during recovery acceptable to you? If so, try:

mount / -o remount,ro

You would have to arrange to have a second FS for Percona to recover to, and I suppose your VPS host may not allow that.

share|improve this answer

You can leave root partition in RW mode but have to understand that any written byte may overwrite your MySQL data. For OS it's free space so it can reuse it.

In your case I would stop all processes that may write to the disk (including cron jobs) and stream disk image to some other server. Then all recovery work can be done on that other server.

dd if=/dev/sda of=/dev/stdout | nc a.b.c.d 9999

On the destination server(a.b.c.d) start this:

nc -l 9999 > disk.img 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.