Jump to content
Lacehim

Best way to erase a drive for sale

7 posts in this topic Last Reply

Recommended Posts

Hi,

 

I haven't been on here for a while :) Nice new forum!  Just goes to show how reliable my Unraid system has been.  Zero downtime!  Yay.

 

I've decided to move on my old HP N40L with 4x2Tb drives.  I've replaced it with a HP G8 running 4x3Tb drives a few years ago, and I only used the N40L for backups.

The drives are full of data.  I would like to sell it with the drives intact, erased.

Am I better to do a full pre-clear on all the drives, or just erase them at hard drive level in parted magic?

I will be selling it as a bare system so the new owner can do what they want with it and keeping my unraid licence as a backup or if I decide to make a bigger array later on if I outgrow the G8.

 

TIA

Share this post


Link to post
8 hours ago, Lacehim said:

Am I better to do a full pre-clear on all the drives, or just erase them at hard drive level in parted magic?

Define better.

 

Preclear will take longer, but is more thorough. If you want to keep 99.9% of people from the data, a simple format is enough, and quick. If you are paranoid that somebody will take the time to try a comprehensive data recovery, preclear will keep that from happening.

Share this post


Link to post

Well I'm not talking about formatting the drive.  You can still recover data after doing that.

I'm talking about using Parted Magic which has an Erase program on it.  It erases from the hard drive internally.  Takes hours, but it's supposed to be secure.

I use it to repurpose drives and wipe ssd's on regular desktops.

Preclearing erases a few times doesn't?  It's been a while since I used it.  So that might be just as good and I can just set it off doing it's thing.  So I'll just do that. :)

Share this post


Link to post

Sorry, I should have started a new paragraph with my third sentence, or left it out entirely.

 

The direct answer to your question is

31 minutes ago, jonathanm said:

Preclear will take longer, but is more thorough.

I added the part about formatting as an aside for those that don't want to go through the full erase. Much quicker than either the erase option or preclear. Just not secure, as you noted.

Share this post


Link to post

In the past, I used preclear to erase mine. If I understand correctly, it should be secure as it fills the drive with 0's.

 

As I would swap in a new one I'd leave the old one still attached to the machine. Once the rebuild finishes, I run a single preclear cycle against the old drive.

Share this post


Link to post

Preclear is wastefully inefficient for the task at hand.

 

dd if=/dev/zero of=/dev/sdX bs=1M

is good, but

dd if=/dev/zero of=/dev/sdX bs=1M oflag=direct

is better ... especially on the N40L (I own/use 2). You can probably do all 4 concurrently.

BUT, using hdparm's  --security-erase would be even better.  Not only gets you concurrency, but puts no load on your system; do whatever else you want during those N** hours without slowdown.

 

**  hdparm -I /dev/sdX | tail

will show you how long the erase will take, or might indicate that your drive doesn't support it.

 

Some *nix programs are considered tools; some even deserve the name toolkit.

Well, hdparm is a friggin full-fledged machine shop!

 

--UhClem "Life is such monotony, without a good lobotomy." [or 4 ... better still 😀]

 

 

Edited by UhClem
chuckle

Share this post


Link to post

Thanks.  I tried a Pre-clear with the plugin but unraid needed the unassigned and it all started to get a bit complicated with them being assigned to the array. :)

In the end I pulled the usb, used parted magic erase disk which I use a lot, so I know how it works.  https://partedmagic.com/secure-erase/

It's probably just a fancy ui fror hdparm UhClem because it erases at the hardware level so no load on the system at all, which is sweet. :)  Takes about 240-338mins per drive and it can clear all 5 at the same time.  I'll test a drive with a recovery program afterwards, and if all clear I'll sell it.

Not worth that much with drives with 3 years running time, but better than cluttering up my cupboard. :)

 

Thanks for the help everyone.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.