Naziel a écritsmart permet notamment de prévenir qu'un disque est en train de mourir (il y a un truc à paramétrer avant:
https://doc.ubuntu-fr.org/smartmontools ), donc pour moi ce serait bien de l'activer sur le ssd.
Okay il faudrait que je me penche sur le sujet. Le paramètre dont tu fais allusion, je pense que tu veux parler du deamon à installer pour remonter automatiquement de l'erreur.
Du coup, j'ai fais un petit état des lieux de mon disque principal SSD /dev/sda
xbionic@bionic:~$ sudo smartctl -s on -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-45-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Crucial_CT275MX300SSD1
Serial Number: 164614AF7931
LU WWN Device Id: 5 00a075 114af7931
Firmware Version: M0CR031
User Capacity: 275064201216 bytes [275 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Feb 9 10:56:41 2019 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 693) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 4) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SCT capabilities: (0x0035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 000 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0032 100 100 010 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 3689
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 835
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
173 Unknown_Attribute 0x0032 099 099 000 Old_age Always - 16
174 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 47
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 000 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 068 055 000 Old_age Always - 32 (Min/Max 14/45)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
202 Unknown_SSD_Attribute 0x0030 099 099 001 Old_age Offline - 1
206 Unknown_SSD_Attribute 0x000e 100 100 000 Old_age Always - 0
246 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 3750619490
247 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 117207672
248 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 47672948
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 000 000 000 Pre-fail Always - 1245
210 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 3689 -
# 2 Vendor (0xff) Completed without error 00% 3534 -
# 3 Vendor (0xff) Completed without error 00% 3436 -
# 4 Vendor (0xff) Completed without error 00% 2373 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Completed [00% left] (57881389-57946924)
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Naziel a écritCa m'embête un peu de copier le disque dur de 20 Go sur le ssd, Tu n'as pas un autre disque dur externe?
Okay, je viens de ressortir un disque dur auto-alimenté (donc un vrai externe), il fait 1 To (1 partition NTFS) :
xbionic@bionic:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3,8G 0 3,8G 0% /dev
tmpfs 781M 1,4M 780M 1% /run
/dev/sda2 23G 8,3G 14G 39% /
tmpfs 3,9G 74M 3,8G 2% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/sda6 166G 64G 95G 41% /home
/dev/sda1 37M 6,1M 31M 17% /boot/efi
tmpfs 781M 16K 781M 1% /run/user/1000
/dev/sdc1 932G 21G 911G 3% /media/xbionic/Seagate Expansion Drive
xbionic@bionic:~$
J'ai donc adopté la même méthodologie que tu m'as suggéré : tester le disque dur externe /dev/sdc avant tout opération.
J'ai donc voulu activé l'outil SMART sur le disque mais sans succès :
xbionic@bionic:~$ sudo smartctl --smart=on --offlineauto=on --saveauto=on /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-45-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
Read Device Identity failed: scsi error unsupported field in scsi command
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
xbionic@bionic:~$
J'ai donc lancé avec le permissive mode. Il semblerait que le disque ne soit pas compatible.
xbionic@bionic:~$ sudo smartctl -T verypermissive -s on -a /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-45-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
Read Device Identity failed: scsi error unsupported field in scsi command
=== START OF INFORMATION SECTION ===
Device Model: [No Information Found]
Serial Number: [No Information Found]
Firmware Version: [No Information Found]
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: [No Information Found]
Local Time is: Sat Feb 9 11:18:21 2019 CET
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
Checking to be sure by trying SMART RETURN STATUS command.
SMART support is: Unknown - Try option -s with argument 'on' to enable it.
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enable failed: scsi error unsupported field in scsi command
Read SMART Data failed: scsi error unsupported field in scsi command
=== START OF READ SMART DATA SECTION ===
SMART Status command failed: scsi error unsupported field in scsi command
SMART overall-health self-assessment test result: UNKNOWN!
SMART Status, Attributes and Thresholds cannot be read.
Read SMART Error Log failed: scsi error unsupported field in scsi command
Read SMART Self-test Log failed: scsi error unsupported field in scsi command
Selective Self-tests/Logging not supported
xbionic@bionic:~$
Naziel a écritUne seule écriture, mais de 20 Go !
Le retour de dmesg est très concis, donc peut être que le disque ne supporte pas smart mais peut encore être lu
Mais ce qui est curieux que la commande
sudo smartctl -T verypermissive -s on -a /dev/sdb
[...]
SMART support is: Available - device has SMART capability.
SMART support is: Disabled