Table of Contents

Disks

Linux disk (HDD, SDD, etc) tips.

Health testing

Check SMART capable disks with smartctl -A /dev/sda. Look for total bytes written, power on hours, integrity errors.

See Douglas Gilbert's article https://sg.danny.cz/scsi/smartmontools_scsi.html on what is SMART (and what it's not), smartctl as well as info about SCSI/ATA/PATA/SATA.

Speed testing

Check USB speeds with lsusb -t

Test disk write speeds with dd: dd if=/dev/zero of=benchmark.img bs=1G count=2 status=progress

Tips

Safe unmount with sudo udisksctl power-off -b /dev/sda

Free up space reserved for the root account with tune2fs -m 0 ''%%/dev/sdXY%%''. This is useful for a storage-only drive.

Special block devices

/dev/urandom: non-blocking random bytes
/dev/random: legacy, blocking if not enough entropy (early boot)