5 ms·
A few months back I was wiping some old drives using a USB->SATA adapter plugged into an old Linux machine I keep around for experimenting on random things. Mos
by peckrob 9y ago
A few months back I was wiping some old drives using a USB->SATA adapter plugged into an old Linux machine I keep around for experimenting on random things. Mostly because I could just leave it to run for however long it took. There were two drives in the machine, sda and sdb. So the drive came up as sdc.
So then I typed:
$ shred -n1 -v /dev/sda
Took me about 4 seconds to realize what I did before hitting Ctrl-C.
Then, I sighed. Considered whether I could save anything. Realized there wasn't anything on there worth saving, and reinstalled. :)
I'm usually much more cautious than that and I'm thankful it happened on a dumb test machine at home and not something important, but it was still a bummer and my first real sysadmin-type screw up. Mistakes happen, though. Even Linus once dialed his hard drive [0].
[0] https://liw.fi/linux-anecdotes/ https://liw.fi/linux-anecdotes/
- tscs37 9y agoStuff like this is why I usually double check and only access disk by anything but the /dev/sdx or /dev/hdx labels; too easy to blow up in your face.
- tcprst 9y agoShortly after I started using Fedora as my daily driver I was attempting to dd if=/dev/zero the MBR and partition table off a USB disk sdb and accidentally wiped the one off of sda instead. As luck would have it, I had the output of fdisk -l /dev/sda in my terminal scrollback buffer and was able to recreate the partition table with no damage done.