- Connect your USB drive to the machine
- Navigate to the TrueNAS Scale shell by opening the menu, going to
System Settings
and then clicking onShell
- Locate the drive's device ID using the
lsblk
command - Check the recommended block size using the command
blockdev --getbsz /dev/<YOUR BLOCK DEVICE ID>
- Note the block size you got from the last command
- STOP! Have you ensured that the USB device does NOT have any important data on it? If it does, stop now, unplug it from the TrueNAS Scale machine and back it up elsewhere! Running the specific badblocks command we'll use will destroy data on the drive!
- Okay, you've confirmed there is no data on the drive you need? Good!
- Fire up a new tmux session
tmux new -s badblocks_<YOUR BLOCK DEVICE ID>
- Run the command
badblocks -t random -w -s -b <YOUR BLOCKSIZE GOES HERE> /dev/<YOUR BLOCK DEVICE ID>
- Disconnect from the session by pressing
CTRL+b
thend
- Reconnect to the session to check on it by using
tmux attach-session -t badblocks_<YOUR BLOCK DEVICE ID>
- Wait for it to finish
Last active
January 6, 2025 18:49
-
-
Save troyfontaine/593bd40d30c10091d5cde491eb33adc7 to your computer and use it in GitHub Desktop.
Running Badblocks on External USB Drives attached to a TrueNAS Scale Machine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment