umount /dev/sda1
2. search the device for bad blocks
# -s: show the progress of the scan
# -v: verbose mode
badblocks -sv /dev/sda1
--
create a filesystem that excludes the badblocks which have been checked
mke2fs -c /dev/sda1
umount /dev/sda1
# -s: show the progress of the scan
# -v: verbose mode
badblocks -sv /dev/sda1
mke2fs -c /dev/sda1
# smartmontools
# -a, -all: Prints all SMART information about the disk
/usr/sbin/smartctl -a /dev/<device>
# hdparm - get/set hard disk parameters
/sbin/hdparm /dev/<device>