hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : did I just kill my server witht this command ?!?
Reply

Forum Jump

did I just kill my server witht this command ?!?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-15-2010, 08:15 AM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 349
Angry

did I just kill my server witht this command ?!?


Ok I'm running centos 5 x64 and doing some testing on new servers that just had all software installed.

I was reading a topic somewhere and someone mentioned this command that they used to test the speed of their hdd raid:

dd if=/dev/zero of=/dev/sda bs=1M count=1000

So I thought that cant do no harm if someone else is running it so I ran it (except I did it with count=10000 because with 1000 it finished too quick as its a 15k SAS RAID10)

Anyway, so a little while later I goto the dc and connect to this server to run some tests, one of them being "arcconf getconfig 1" to retrieve details about the raid...

It doesnt react ... so I run it again .. nothing. Then suddenly it says can't open some log file in /var/log and still doesn't run (I was able to open the same file myself using pico without problems)

So I goto cli and "shutdown -r now" and BOOOM tons of errors all over the screen incl. ext3 related stuff. After a few mninutes of pages and pages of errors, I power off/on the box and it comes back. I enter the adaptec bios and it shows the array as "Optimal" but then when I goto boot ... nothing, doesnt recognize the boot media.

So I run linux rescue from the centos cd and it tells me that that partition table is UNREADABLE and that the only thing it can do is re-initialize the drives causing loss of all data.

Apologies for the long description I just wanted to be detailed.

Anyway, so here I am ..reinstalling centos on this box. Now I want to know if the command that I ran above would/could have caused damage to the partition table or if its more likely to be a hardware (raid controller) problem ????

Scary thing is I ran the SAME command on 5 other IDENTICAL servers and they all seem ok (so far) but I havent tried rebooting them yet

Reply With Quote


Sponsored Links
  #2  
Old 11-15-2010, 08:27 AM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 349
yep looks like I've killed them sll ... just rebooted snother one snd ssme issue, partition table ****ed.

Wow, what A DOUCHE. I feel like such a spastic now.

You'd think after 10 years in the biz I'd know better than to simply run a command like that without first making 100% sure it can do damage.

Oh well 2 days of work lost. But I'm happy believe it or not. It's just software and I can reinstall that easily since these boxes are not live yet... I was worried it was the RAID controller that ****ed up (due to some previous issues with it in relation to its BIOS). Happy to know the raid controller didnt do anything wrong

Reply With Quote
  #3  
Old 11-15-2010, 08:57 AM
drspliff drspliff is offline
Aspiring Evangelist
 
Join Date: Aug 2002
Location: Milton Keynes
Posts: 352
Oh this is too funny.

I guess we live and learn Care to name & shame where this 'advice' came from?

Reply With Quote
Sponsored Links
  #4  
Old 11-15-2010, 09:06 AM
afmatt afmatt is offline
Newbie
 
Join Date: Sep 2007
Posts: 10
Ouch.... Sounds like one of those days. Good thing it's nothing serious other than the software

Reply With Quote
  #5  
Old 11-15-2010, 09:09 AM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 349
wasn't advice really ..just someone mentioning they used that to test the speed of their HDDs (think it was one of those "vibrating fans killed my hdd" threads

but yeah ... its friggin insane and funny at the same time. But I am REEEALLL happy it wasnt the controller that did something as my initial assumption was and I was already starting to consider which controller to replace it with and how much of a huge hassle that is going to be

as it stands its just a bunch of os/cpanel reinstalls ... pain in the arse but I AM in the process of stress testing these boxes before they go live at the end of the month, so this is kinda giving them a bit of a workout.

Reply With Quote
  #6  
Old 11-15-2010, 10:24 AM
bizness bizness is offline
Web Hosting Master
 
Join Date: Jan 2001
Location: Miami, FL
Posts: 1,060
really...

hdparm for the win...

i use dd responsible though....

sorry to hear that you killed your box....

i hope u were able to sleuth out the data.

__________________
Biznesshosting, Inc. DBA VOLICO - Intelligent Hosting Solutions
East Coast Enterprise Dedicated Servers and Miami Colocation.
managed and unmanaged dedicated servers. High bandwidth colocation. Managed clusters.

Reply With Quote
  #7  
Old 11-15-2010, 02:34 PM
aeris aeris is offline
Web Hosting Master
 
Join Date: Oct 2009
Posts: 806
Heh, well.. you could indeed use that command to test the sequential write speed of a RAID. But it would be a destructive test, essentially zero-filling the first 10GB of the disk.

__________________
Your faithful student,
Twilight Sparkle

Reply With Quote
  #8  
Old 11-15-2010, 02:54 PM
Patrick Patrick is offline
Security Ninja
 
Join Date: Mar 2003
Location: Canada
Posts: 8,703
Ugh. Sounds like someone trolled you... next time, if you're not 100% sure what the command does, don't run it as root. :]

Reply With Quote
  #9  
Old 11-15-2010, 03:14 PM
trustedurl.com trustedurl.com is offline
That's all it takes?
 
Join Date: Aug 2001
Location: Canada
Posts: 2,120
Quote:
Originally Posted by papi View Post
dd if=/dev/zero of=/dev/sda bs=1M count=10000

Scary thing is I ran the SAME command on 5 other IDENTICAL servers and they all seem ok (so far) but I havent tried rebooting them yet

I really hope those are not production servers; you overwrite the first 10GB of raw data... those 5 servers should be toast as well. sorry

if = input
of = output
bs = blocksize
count = count

Reply With Quote
  #10  
Old 11-15-2010, 03:50 PM
TDS-chriss TDS-chriss is offline
Junior Guru
 
Join Date: Mar 2009
Location: deep blue yonder
Posts: 176
On the off change you're still keen on running the test, replace the original of= with of=foofile and you should be good to go. Remember to remove the foofile when you're done.

__________________
424 bits were harmed in the making of this signature.

Reply With Quote
  #11  
Old 11-15-2010, 05:32 PM
Ronald_Craft Ronald_Craft is offline
Web Hosting Master
 
Join Date: Aug 2003
Posts: 2,003
That is pretty amusing. Lesson learned. When I was a newbie I once did yum uninstall libstdc++. That caused one helluva night.

Reply With Quote
  #12  
Old 11-15-2010, 07:14 PM
Joe262 Joe262 is offline
WHT Addict
 
Join Date: Feb 2010
Location: Ohio, USA
Posts: 113
Nice.

Hope proper backups were kept ; )

__________________
error mounting /proc: No such file or directory
error mounting /sys: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

..OMG they tried to kill init.. you b@stards.


Reply With Quote
  #13  
Old 11-15-2010, 08:19 PM
papi papi is offline
Web Hosting Guru
 
Join Date: Jan 2004
Posts: 349
no backups, these were not live boxes!

I'm surprised no one asked yet what ths epeed result was anyway ... 770 megajigabytespersec!! Haha

Reply With Quote
  #14  
Old 11-15-2010, 10:36 PM
Joe262 Joe262 is offline
WHT Addict
 
Join Date: Feb 2010
Location: Ohio, USA
Posts: 113
Quote:
Originally Posted by papi View Post
I'm surprised no one asked yet what ths epeed result was anyway ... 770 megajigabytespersec!! Haha
Nah the zeroing over of your disk is far more amusing than any speed result.

__________________
error mounting /proc: No such file or directory
error mounting /sys: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

..OMG they tried to kill init.. you b@stards.


Reply With Quote
  #15  
Old 11-15-2010, 11:27 PM
CNSERVERS CNSERVERS is offline
Web Hosting Master
 
Join Date: Jun 2004
Location: Oregon
Posts: 1,227
Quote:
Originally Posted by papi View Post
no backups, these were not live boxes!

I'm surprised no one asked yet what ths epeed result was anyway ... 770 megajigabytespersec!! Haha
that test uses buffer, so it's not accurate at all.
if you want to test the real disk speed, you should use dd with oflag=dsync.

so you basically killed your OS by running a not accurate speed test

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill command options adsbarish Hosting Security and Technology 6 11-11-2008 05:31 PM
Want Witht and without www point same dom DirectAdmin danyboy2010 Web Hosting 10 04-20-2008 11:20 AM
Mysql Kill user command? mifa Hosting Security and Technology 2 03-19-2008 06:34 AM
What can be the problem witht his traceroute? AmericanD Hosting Security and Technology 3 11-02-2002 11:21 AM
Free Web Hosting witht he works CritticAge Shared Hosting Offers 9 06-08-2002 09:33 PM

Related posts from TheWhir.com
Title Type Date Posted
Linode Releases CLI Tool for Cloud Platform Web Hosting News 2014-01-29 17:15:43
tmzVPS Listing 2014-07-23 01:26:19
tmzVPS Listing 2014-07-23 01:27:35
Congress to Vote on Amendment that Could Kill NSA Broad Surveillance Funding Web Hosting News 2013-07-23 17:21:13
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?