Interesting problem
Kevin Brown
kevin_brown@qwest.net
Mon, 19 Feb 2001 20:00:02 -0700
I have an interesting problem for you guys. Was doing some stuff on one of the
linux boxes I maintain when somehow the /var partition was wiped out. I have a
mysql server running on it for logging of information. I was moving the tables
to another directory and was going to recreate the tables in the original
directory, so...
/dev/sdc7 mounted at /usr/local/mysql (6.4GB partition)
/dev/md2 mounted at /var (5.0GB partition)
/var/lib/mysql linked to /usr/local/mysql via 'ln -s /usr/local/mysql
/var/lib/mysql'
/dev/sdc6 mounted at /var/lib/mysql/bkup (this is where I was moving the tables
from a mysql db to)
I was in the db directory (/var/lib/mysql/dbname) and did 'umount ../bkup' to
unmount /dev/sdc6 from that directory. It was unmounted, but it also took all
of var with it leaving just the symbolic link from /var/lib/mysql to
/usr/local/mysql behind. Tried to remount the /var partition to no success, so
I rebooted. I had to manually fsck /dev/md2 (the /var partition) and then
rebooted again after it fixed a lot of inodes. Ended up having to restore the
whole partition from the last full backup (thankfully was last done on Friday).
Anyone have any clue what I did to trash the /var partition?