[SFS] how to erase the crap out of (off from?) an old RAID/LVM/whatever disk
David L. Willson
DLWillson at TheGeek.NU
Fri Mar 9 18:01:37 MST 2018
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sofree.us/pipermail/sfs/attachments/20180309/7ea1f528/attachment.html>
More information about the SFS
mailing list