Err, what did I just do?

Well, I royally screwed up yesterday. I was preparing to configure journalling (w/ext3) on some servers at work. Unfortunately, my mind seemed to have switched on autopilot and forgot to notify me.

mediamaster:/# df 0h
df: `0h’: No such file or directory
mediamaster:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda10 1.5G 1.3G 135M 91% /
/dev/sda9 2.0G 1.4G 476M 75% /home
/dev/sda12 297M 39K 281M 1% /tmp
/dev/sda5 377G 172G 186G 49% /export
mediamaster:/# rm -rf * |more
(insert me frantically hitting Control-c)
mediamaster:/# ls
bash: /bin/ls: No such file or directory

By the time I had stopped it, it had deleted /bin, /boot, /etc, and most of /dev. This is a Very Bad Thing™. This server happens to be my master media server (hence the name) at work. Luckily, it’s only used for replicating, and doesn’t actually serve any traffic itself. Still, replicating new images out to the other farms is important work, and not one that can be put on hold for any length of time.

So after a late night at work, restoring, reinstalling, and reconfiguring — with some help from Amit (Sophomore on #linux) the machine is now back in action without having to be fully reinstalled. One very important lesson learned: use sudo, not su.

This entry was posted in Uncategorized and tagged by Adam. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>