LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-07-2008, 09:45 PM   #1
baprozeniuk
LQ Newbie
 
Registered: Jul 2006
Posts: 6

Rep: Reputation: 0
Question Clearing fakeraid information from a hard drive


Hello,

I have 4 hard drives that were previously in a fakeraid array on an Asus M2N-E in raid5. Because of this setup they now have fakeraid information somehow embedded into them.

I was wondering if it is possible to clear this information from the drives?

Fedora 8 keeps seeing an nvidia_ijifefdg array even after it has been removed from the system with nvidia chipset. The drives are now in a system with an Intel G33 based motherboard.

Last edited by baprozeniuk; 08-07-2008 at 10:05 PM.
 
Old 08-08-2008, 10:58 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,747

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
You could try using dd to overwrite the entire drive with /dev/null or /dev/zero. For example, let's say the drives are sda, sdb, sdc, and sdd. For each drive:
dd of=/dev/null if=/dev/sda
dd 0f=/dev/null if=/de/sdb
dd of=/dev/null if=/dev/sdc
dd 0f=/dev/null if=/dev/sdd

Or, /dev/null could be replaced with /dev/zero.

The dd command will overwrite the entire drive from MBR sector to the end, so you need to back up any information you want to keep.
 
Old 08-08-2008, 11:02 AM   #3
baprozeniuk
LQ Newbie
 
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I tried using dd already, except i used /dev/urandom and just ctrl+c'd it after about 30 seconds, i figured the data would be at the beginning of the disk. I supposed it could have been at the end though.
 
Old 08-08-2008, 05:05 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.15.5
Posts: 1,500
Blog Entries: 12

Rep: Reputation: 155Reputation: 155
use dmraid; I believe it's dmraid -E, but check the man to be sure.

Edit: just looked it up; try dmraid -r first to identify the drive,
then dmraid -rE {device identified by dmraid -r} to erase the data

See http://linux.die.net/man/8/dmraid

Last edited by mostlyharmless; 08-08-2008 at 05:09 PM. Reason: add info
 
Old 08-09-2008, 10:10 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
I believe RAID info is at the end of the drive because the MBR is at the front.

While I completely recommend mostlyharmless' advice -- use the right tool; if you want to experiment w/ dd, then you will need to find out how big the RAID/fakeraid info is.


Here is a really brute force approach that I thought up, but didn't try. In fact, I wouldn't try it except as an experiment:

This is using an old 60 GB drive as the hypothetical target. I figure that zeroing the last cylinder will kill the RAID info w/o destroying too much data.
Code:
$ fdisk -l /dev/hda  | head -4

Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

$ DISK=/dev/hda
$ BS=8225280 
$ SEEK=$((7297-1))
$ dd if=/dev/zero of=$DISK bs=$BS seek=$SEEK count=1
To repeat: I haven't tested this, I don't plan to test this -- use at your own risk.

If you know that you need to zero only the last sector, then a much safer, but more complicated, way would be to use the fdisk -l output to calculate the last sector:
Code:
## using the same fdisk info
$ DISK=/dev/hda
$ BS=512
$ SEEK=$((60022480896/512-1))
$ dd if=/dev/zero of=$DISK bs=$BS seek=$SEEK count=1
Additional Warning:
I did re-read the dd man page; but since I didn't try this, I can't be sure that my seeks aren't off by 1 because either dd or fdisk numbers from 0.
 
Old 08-09-2008, 06:48 PM   #6
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
Couple of things you can do:

1. if devices are partitions, just delete the fd type partitions using fdisk
2. if devices are whole luns/drives, zero the last 128k of the drive with dd, that's where the raid superblock is

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
How to list hard drive information. tells Linux - Enterprise 4 01-26-2006 03:37 PM
hard drive information with command line Mugatu Linux - Newbie 3 01-08-2004 08:26 AM
Clearing space on hard drive niverson Red Hat 2 10-07-2003 01:30 PM
hard drive information vanhalen Linux - Newbie 3 07-08-2002 07:28 AM


All times are GMT -5. The time now is 04:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration