Perform an exhaustive, non-destructive read-write test for bad blocks and blacklist them

e2fsck

  • Check a Linux ext2/ext3/ext4 filesystem. The partition should be unmounted.
    More information: <https://manned.org/e2fsck>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo e2fsck -fccky {{/dev/sdXN}}

click the source code to copy install e2fsck on any operating system with command-not-found.com