doc:appunti:hardware:raspberrypi_nas_smart_hard_disk
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:hardware:raspberrypi_nas_smart_hard_disk [2021/03/10 16:31] – niccolo | doc:appunti:hardware:raspberrypi_nas_smart_hard_disk [2021/04/16 17:11] – [smartctl] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Raspberry Pi NAS: Hard disk management ====== | ====== Raspberry Pi NAS: Hard disk management ====== | ||
+ | |||
+ | This page is about configuring the **hard disk power management** on a Raspberry Pi, to be used as NAS and mediacenter. The hard disk is connected via a **[[raspberrypi_nas_x835_sata_board|SupTronics X835 shield]]**. See the main index at **[[raspberrypi_nas]]**. | ||
There are two tools to manage SATA disks in GNU/Linux. **smartctl** is designed to interact with the **[[wp> | There are two tools to manage SATA disks in GNU/Linux. **smartctl** is designed to interact with the **[[wp> | ||
Line 18: | Line 20: | ||
# Disable DEVICESCAN, which does not work in our environment. | # Disable DEVICESCAN, which does not work in our environment. | ||
#DEVICESCAN -d removable -n standby -m root -M exec / | #DEVICESCAN -d removable -n standby -m root -M exec / | ||
- | |||
- | # Send an email test to < | ||
- | /dev/sda -d sat -m root@localhost -M test | ||
# Use the suggedested subset of checks, instead of the ' | # Use the suggedested subset of checks, instead of the ' | ||
+ | # NOTICE: We are running smartd with option --interval=3600 instead of the | ||
+ | # 1800 default, i.e. device polling occurs every 1 our instead of 30 minutes. | ||
+ | # The number of skipped checks (option -n) must be multipled by that value | ||
+ | # to obtain the maximum time that checks will be skipped: | ||
+ | # 336 * 3600 seconds = 14 days. | ||
/dev/sda -d sat \ | /dev/sda -d sat \ | ||
-H \ # Check the health with the SMART RETURN STATUS command | -H \ # Check the health with the SMART RETURN STATUS command | ||
Line 29: | Line 33: | ||
-f \ # Check for ' | -f \ # Check for ' | ||
-n standby,336 \ # Skip smartd checks during standby (max 336 times, add ', | -n standby,336 \ # Skip smartd checks during standby (max 336 times, add ', | ||
- | -W 0,50,60 \ # Report | + | -W 0,50,60 \ # Temperature |
-s S/ | -s S/ | ||
+ | -s O/ | ||
-m root@localhost \ # Send a warning email on failures and errors | -m root@localhost \ # Send a warning email on failures and errors | ||
-M daily \ # Repeat email warnings daily | -M daily \ # Repeat email warnings daily | ||
Line 65: | Line 70: | ||
* **Long Self-Test**: | * **Long Self-Test**: | ||
* **Conveyance Test** (ATA only): a few minutes to check for damages incurred during transporting of the device. It requires a few minutes to complete. | * **Conveyance Test** (ATA only): a few minutes to check for damages incurred during transporting of the device. It requires a few minutes to complete. | ||
+ | * **Offline Immediate | ||
+ | |||
+ | If you want to display the log e.g. of self-test executed, run: | ||
+ | |||
+ | < | ||
+ | smartctl -d sat -l selftest /dev/sda | ||
+ | </ | ||
+ | |||
+ | The output is something like this: | ||
+ | |||
+ | < | ||
+ | === START OF READ SMART DATA SECTION === | ||
+ | SMART Self-test log structure revision number 1 | ||
+ | Num Test_Description | ||
+ | # 1 Short offline | ||
+ | # 2 Short offline | ||
+ | # 3 Short offline | ||
+ | # 4 Conveyance offline | ||
+ | </ | ||
+ | |||
===== hdparm ===== | ===== hdparm ===== | ||
Line 138: | Line 163: | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
doc/appunti/hardware/raspberrypi_nas_smart_hard_disk.txt · Last modified: 2022/01/07 15:04 by niccolo