[SFS] how to erase the crap out of (off from?) an old RAID/LVM/whatever disk

David L. Willson DLWillson at TheGeek.NU
Sat Mar 10 03:59:59 MST 2018


    
I knew there was a tool for the job, but I couldn't remember the name. Thanks for the reminder, Zack!


Sent from my Verizon, Samsung Galaxy smartphone

-------- Original message --------
From: Zack Coffey <clickwir at gmail.com> 
Date: 3/9/18  21:38  (GMT-07:00) 
To: "David L. Willson" <DLWillson at thegeek.nu> 
Cc: sfs at lists.sofree.us 
Subject: Re: [SFS] how to erase the crap out of (off from?) an old RAID/LVM/whatever disk 

I've used wipefs before. 
http://manpages.courier-mta.org/htmlman8/wipefs.8.html

On Mar 9, 2018 6:01 PM, "David L. Willson" <DLWillson at thegeek.nu> wrote:
This was hard enough to find that I want to stick in my journal. Hello, journal.

```
# wait for /dev/sdc to become available
while ! blockdev --getsz /dev/sdc; do sleep 5; done
# erase the tail - gets the RAID config
dd bs=512 if=/dev/zero of=/dev/sdc count=2048 seek=$(( $( blockdev --getsz /dev/sdc ) - 2048))
# erase the head - gets the partition table
dd bs=512 if=/dev/zero of=/dev/sdc count=1024
# cleanly disconnects
eject /dev/sdc
```

--
David L. Willson
Teacher, Engineer, Evangelist
COA LFCS CCAH RHCE CLP
Mobile 720-333-LANS(5267)
http://sofree.us

This is a good time for a r3VOLution.


_______________________________________________

SFS mailing list

SFS at lists.sofree.us

http://lists.sofree.us/cgi-bin/mailman/listinfo/sfs



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sofree.us/pipermail/sfs/attachments/20180310/6b716621/attachment.html>


More information about the SFS mailing list