Reasons not to work as root

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
28,129
Reaction score
7,647
Location
Table View
I feel like a complete tool now :o

Just managed to "delete" our one Centos box, at least to a point where it's not functioning.

It's never a good thing when you see this on a production box:

Code:
rm: cannot remove `/dev/shm': Device or resource busy
rm: cannot remove `/dev/pts/0': Operation not permitted
rm: cannot remove `/dev/pts/ptmx': Operation not permitted

Thank god for vm's, had a 2 hour old backup to restore from and back up in 15 minutes. :D
 
You dun goofed son!

Be grateful for automated (I'm assuming?) backups!
 
Lol! Well the client I work for have this cluster setup and started testing failover.





Slave died, didn't switch back to primary, SAN drive still attached. No builds, no source control...very relaxed day actually :p
 
Or you have two root terminals open, one to production, one to test

and you mistakenly hose the production box instead of the test box... :D

Never happened to me yet.

But I like the idea of VM's - can rollback to a good backup should you manage to bork a working VM badly... :D
 
Or you have two root terminals open, one to production, one to test

and you mistakenly hose the production box instead of the test box... :D

Never happened to me yet.

But I like the idea of VM's - can rollback to a good backup should you manage to bork a working VM badly... :D

Yep. My fault though, it was a bad script which I should have been writing on the dev box but no I'm smarter than that :D

Lesson learned.
 
I feel like a complete tool now :o

Just managed to "delete" our one Centos box, at least to a point where it's not functioning.

It's never a good thing when you see this on a production box:

Code:
rm: cannot remove `/dev/shm': Device or resource busy
rm: cannot remove `/dev/pts/0': Operation not permitted
rm: cannot remove `/dev/pts/ptmx': Operation not permitted

Thank god for vm's, had a 2 hour old backup to restore from and back up in 15 minutes. :D

Snapshots! I love VM's + ZFS for this. It's saved me before, not from a rm -rf malfunction but from the "oh i'll just delete this test data on a test vm" to find out i've actually tabbed to the wrong window and hosed a box that's actually in use in a real environment... ZFS snapshots at 15 min intervals rock :)
 
I hate it the most when putty access cuts out at a critical point :mad:

Ever since I had to do 30+GB db backups I now don't perform a lengthy task without starting 'screen'.

There's no worse feeling than dc'ing during a 10 hour backup and having to restart because you're an idiot who didn't use 'screen'...
 
Ever since I had to do 30+GB db backups I now don't perform a lengthy task without starting 'screen'.

There's no worse feeling than dc'ing during a 10 hour backup and having to restart because you're an idiot who didn't use 'screen'...

another benefit of using screen is that if you do jaag *** aan you can always ctrl+a k (or some cases K) and you can kill the session even if ctrl+c does not work.

I do everything in screen.
 
I've never done the rm -rf / thing except on purpose (like before decomming a box, just for kicks). I expected I'd see customers do that from time to time, but I think it's only happened once in the last 8 or so years.

What I have seen plenty times is this:

chmod -R 777 / blah/blah/blah

Annoying, but fixable.
 
Top
Sign up to the MyBroadband newsletter
X