[tech] Sorting out good USBs
James Arcus
jimbo at ucc.asn.au
Wed Jul 22 17:26:26 AWST 2020
Hi all,
I've been running `badblocks` over the mass of USBs we have in the room
and tossing ones that report any issues. The command is `sudo badblocks
-w -s /dev/sdX` where sdX is the volume label corresponding to the USB.
You might have to unmount its partitions first. It's also important to
check sdX is correct against the device list `lsblk` or the kernel logs
with `dmesg -k` to make sure you're not about to wipe the system drive.
So far I've thrown out 8 sticks and 24 have tested OK.
*Important note:* This process is /destructive/ to the data on the disk,
don't do it on a USB you care about. It also means you'll need to format
the drive before it can be used again. I haven't got around to doing
that yet, but can if I have the time.
Cheers,
James [MPT]
P.S. SSH is very handy to coordinate multiple checks across sticks
plugged into lots of PCs around the room.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ucc.gu.uwa.edu.au/pipermail/tech/attachments/20200722/a455017f/attachment.htm>
More information about the tech
mailing list