I have an Ubuntu server 12.04 with a corrupted ext4 file system on my /tmp partition :
$ dmesg | tail [25300713.878456] end_request: I/O error, dev vda, sector 2019854 [25300713.882430] Aborting journal on device dm-0-8. [25300713.969861] end_request: I/O error, dev vda, sector 1965862 [25300713.972127] Buffer I/O error on device dm-0, logical block 196608 [25300713.973351] lost page write due to I/O error on dm-0 [25300713.973450] JBD2: I/O error detected when updating journal superblock for dm-0-8. [25300746.138426] EXT4-fs error (device dm-0): ext4_journal_start_sb:327: Detected aborted journal [25300746.139792] EXT4-fs (dm-0): Remounting filesystem read-only [25387373.536038] EXT4-fs (dm-0): error count: 2 [25387373.536043] EXT4-fs (dm-0): initial error at 1407997573: ext4_journal_start_sb:327 [25387373.536047] EXT4-fs (dm-0): last error at 1407997573: ext4_journal_start_sb:327 [25473881.056039] EXT4-fs (dm-0): error count: 2 [...]
I'm on a VPS, and I have no idea how to fix this. Before I do something that may break everything, I want to backup the server, espacially the MySQL database.
Now, I tried to do this :
ssh username@ip "mysqldump -u user -ppwd db" > ~/Bureau/db.sql
But it complains it can't do some queries because of the read only /tmp.
My second thought was to rename /tmp (or umount it), and create a /tmp link on one of the working partitions. It didn't work, complaining /tmp is busy.
I would like to avoid restarting MySQL if possible, since I don't know if it will restart properly.