Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


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

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


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
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,891

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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
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
Senior Member
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,781
Blog Entries: 14

Rep: Reputation: 278Reputation: 278Reputation: 278
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


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

Rep: Reputation: 233Reputation: 233Reputation: 233
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.
$ 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:
## 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
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.


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 > Forums > Linux Forums > Linux - Hardware

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

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