How do i wipe a drive

Status
Not open for further replies.

onthax

Explorer
Joined
Jan 31, 2012
Messages
81
I was having some performance issues with my raidz drive on 4k sector drives

so i was following a guide to use gnop to make .nops to do it

when i do

[onthax@ipstore] /dev# zpool create -f -m /mnt/storage/ storage raidz ada1.nop ada2.nop ada3.nop ada4.nop

i get

cannot create 'storage': no such pool or dataset

when i do an ls on /dev i get

ada1
ada1.nop
ada1p1
ada1p2


etc for each of the drives, but when i run

gpart destroy ada1

i get gpart: device busy

anyone know what's going on?
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi onthax,

If you are sure....really, really sure you want to clear the drives grab a copy of DBAN from dban.org.

Burn the iso to disk, boot it and it should be able to blow away any data you have on the drives.

Alternatively I think you could boot FreeNAS single user & "dd" out a meg or 2 of data to the ends of the drive and that should clear out any partition info. Search the fourms, there are a couple of posts that detail how to do that.

-Will
 

onthax

Explorer
Joined
Jan 31, 2012
Messages
81
Hi onthax,

If you are sure....really, really sure you want to clear the drives grab a copy of DBAN from dban.org.

Burn the iso to disk, boot it and it should be able to blow away any data you have on the drives.

Alternatively I think you could boot FreeNAS single user & "dd" out a meg or 2 of data to the ends of the drive and that should clear out any partition info. Search the fourms, there are a couple of posts that detail how to do that.

-Will

Thanks for the quick reply survive, Yup, backed everything up, just trying to make a new zpool with the aligned sectors, tryed the dd, but didnt do it in single-user mode, will try that this arvo.

-Onthax
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
I would expect that you would need to ungnop the drives, and then you can gpart destroy.

Alternatively, you can use dd to blow away the first 512 bytes, and the last 512 bytes (yeah, you'll have to do the math to figure out what the seek number should be).
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Here's the magic incantation for wiping the beginnning & end of your disk(s), replace ada3 with your disk/device:

Code:
dd if=/dev/zero of=/dev/ada3 bs=1m count=1

dd if=/dev/zero of=/dev/ada3 bs=1m oseek=`diskinfo ada3 | awk '{print int($3 / (1024*1024)) - 4;}'`

 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
You dont need to create gnop yourself, just check the 4k sector size box while creating the volume on the gui
 

onthax

Explorer
Joined
Jan 31, 2012
Messages
81
I would expect that you would need to ungnop the drives, and then you can gpart destroy.

Alternatively, you can use dd to blow away the first 512 bytes, and the last 512 bytes (yeah, you'll have to do the math to figure out what the seek number should be).

drives were ungnoped when i tried to kill the partitions, got the same error when using gpart under single user mode, but dd'ed the start and it went away. didnt have to dd the end, will that affect it at all? (it's now successfully in a zpool)

You dont need to create gnop yourself, just check the 4k sector size box while creating the volume on the gui

The 4k box isnt in Freenas 8
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Of course it is in Freenas 8. What version are you using? Don't tell me 8.0.0, you should be running 8.0.3..
Make sure to clear browser cache.
 
Status
Not open for further replies.
Top