S.M.A.R.T.: Difference between revisions
(6 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* Add <code>-d sat</code> | * Add <code>-d sat</code> | ||
For | ====Seagate USB Hard Drives==== | ||
See [https:// | For Seagate USB hard drives, it will run in uas mode and smart won't work. | ||
To fix this | See [https://askubuntu.com/questions/637450/cannot-perform-smart-data-and-self-test-on-external-hard-drive https://askubuntu.com/questions/637450/cannot-perform-smart-data-and-self-test-on-external-hard-drive]. | ||
< | To fix this: | ||
# Run <code>lsusb</code> to find the id of your HDD | |||
</ | #* It should start with <code>0bc2</code>. | ||
# Create file <code>/etc/modprobe.d/ignore_uas.conf</code> and add this following: | |||
#* <code>options usb-storage quirks=[ids]</code> | |||
#* E.g. <code>options usb-storage quirks=0bc2:ab31:,0bc2:a0a4:</code> | |||
# Run <code>sudo update-initramfs -u</code> | |||
# Reboot | |||
====Long Smart Tests==== | |||
When running long smart tests, you will want to continuously poll the device so it does not go to sleep. | |||
<syntaxhighlight lang="bash"> | |||
DEVICE=/dev/sda | |||
sudo smartctl -t long $DEVICE | |||
sudo watch -d--cumulative -n 10 smartctl -l selftest $DEVICE | |||
</syntaxhighlight> | |||
===Remote monitoring=== | ===Remote monitoring=== | ||
Line 36: | Line 45: | ||
* <code>-M daily</code> sends daily reminders for failures | * <code>-M daily</code> sends daily reminders for failures | ||
* <code>-s (S/../../6/01)</code> runs a short test every saturday at 1AM. | * <code>-s (S/../../6/01)</code> runs a short test every saturday at 1AM. | ||
===Tests=== | |||
<pre> | |||
sudo smartctl -t <short|long|conveyance|select> <drive> | |||
</pre> | |||
* <code>conveyance</code> is good to test after any physical movement of the drive. | |||
==gsmartcontrol== | ==gsmartcontrol== | ||
gsmartcontrol is a GUI frontend for smartctl | gsmartcontrol is a GUI frontend for smartctl |
Latest revision as of 14:43, 10 March 2023
SMART Testing
smartctl
USB Hard Drives
- Add
-d sat
Seagate USB Hard Drives
For Seagate USB hard drives, it will run in uas mode and smart won't work.
See https://askubuntu.com/questions/637450/cannot-perform-smart-data-and-self-test-on-external-hard-drive.
To fix this:
- Run
lsusb
to find the id of your HDD- It should start with
0bc2
.
- It should start with
- Create file
/etc/modprobe.d/ignore_uas.conf
and add this following:options usb-storage quirks=[ids]
- E.g.
options usb-storage quirks=0bc2:ab31:,0bc2:a0a4:
- Run
sudo update-initramfs -u
- Reboot
Long Smart Tests
When running long smart tests, you will want to continuously poll the device so it does not go to sleep.
DEVICE=/dev/sda
sudo smartctl -t long $DEVICE
sudo watch -d--cumulative -n 10 smartctl -l selftest $DEVICE
Remote monitoring
See Reference
- Install the following:
- sudo apt install mailutils msmtp msmtp-mta smartmontools
- Edit
/etc/smartd.conf
- Add some options
Example:
/dev/disk/by-id/usb-WD_easystore_264D_394B47573334314C-0:0 -s (S/../../6/01) -a -m [email protected] -M test -M daily
-a
turns on some defaults for checking smart attributes-M Test
sends a test email when smartd starts-M daily
sends daily reminders for failures-s (S/../../6/01)
runs a short test every saturday at 1AM.
Tests
sudo smartctl -t <short|long|conveyance|select> <drive>
conveyance
is good to test after any physical movement of the drive.
gsmartcontrol
gsmartcontrol is a GUI frontend for smartctl