Hier matin vers 8h le serveur de base de donnée s'est mis à se comporter de manière extrêmement lente. L'un des CPU était bloqué à 100% en waiting (top retourne 25% cpu waiting en permannence, et c'est un 4 coeurs), curieux, le redémarrage de mysql n'y change rien, je lance alors un reboot soft du système, mais après 20 minutes, le serveur n'a pas toujours pas booté (SSH off).
Le problème ne semblant pas du à un problème de notre logiciel, nous avons contacté le support, qui nous a informé que deux des disques durs du serveur de base de donnée du site sont tombés défaillants. Ceci ayant été détecté lors de la vérification du système de fichiers lancé en mode recovery qui retournait nombreuses erreurs d'après le technicien.
J'accède au serveur en mode recovery, puis je monte mes partitions.
D'abord "fdisk -l" retourne :
> Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0007d44f
>
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 20975616 20971521 10G fd Linux raid autodetect
/dev/sda2 20975617 1952468992 1931493376 921G fd Linux raid autodetect
/dev/sda3 1952468993 1953520064 1051072 513.2M 82 Linux swap / Solaris
>
Partition 3 does not start on physical sector boundary.
>
Partition 4 does not start on physical sector boundary.
>
>
Disk /dev/md2: 921 GiB, 988924542976 bytes, 1931493248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alignment offset: 3584 bytes
Disk /dev/md1: 10 GiB, 10737352704 bytes, 20971392 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Alors je monte les systèmes de fichiers dans /mnt2 que je créé pour l'occasion :
> mkdir /mnt2
mount /dev/md1 /mnt2/
mount /dev/md2 /mnt2/home/
Dans /mnt2 je retrouve bien un système de fichier qui m'appartient, mais qui s'apparente à une backup de 2013 !
En effectuant
> smartctl -a /dev/sda
Il semble que sda connaisse des dysfonctionnements depuis 2013 en effet :
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.4.23-mod-std-ipv6-64-rescue] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.14 (AF)
Device Model: ST1000DM003-9YN162
Serial Number: S1D23Y6K
LU WWN Device Id: 5 000c50 04b545541
Firmware Version: CC4H
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Mar 4 08:43:06 2017 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
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: ( 584) 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 116) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x3085) SCT Status supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 103 099 006 Pre-fail Always - 220546165
3 Spin_Up_Time 0x0003 097 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 14
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 224
7 Seek_Error_Rate 0x000f 089 060 030 Pre-fail Always - 828120307
9 Power_On_Hours 0x0032 055 055 000 Old_age Always - 39746
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 13
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 078 078 000 Old_age Always - 22
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 0 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 063 051 045 Old_age Always - 37 (Min/Max 25/49)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 12
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 26
194 Temperature_Celsius 0x0022 037 049 000 Old_age Always - 37 (0 23 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 136
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 136
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 39744h+19m+34.373s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 1073486515116
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 654004613546
SMART Error Log Version: 1
ATA Error Count: 21 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 21 occurred at disk power-on lifetime: 39731 hours (1655 days + 11 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
– – – – – – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
– – – – – – – – ---------------- --------------------
60 00 08 ff ff ff 4f 00 14d+13:12:18.051 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 14d+13:12:18.051 SET FEATURES [Enable SATA feature]
27 00 00 00 00 00 e0 00 14d+13:12:18.051 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 14d+13:12:18.050 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 14d+13:12:18.050 SET FEATURES [Set transfer mode]
Error 20 occurred at disk power-on lifetime: 39731 hours (1655 days + 11 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
– – – – – – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
– – – – – – – – ---------------- --------------------
60 00 08 ff ff ff 4f 00 14d+13:12:15.173 READ FPDMA QUEUED
ea 00 00 00 00 00 a0 00 14d+13:11:58.308 FLUSH CACHE EXT
61 00 08 ff ff ff 4f 00 14d+13:11:58.307 WRITE FPDMA QUEUED
ea 00 00 00 00 00 a0 00 14d+13:11:58.307 FLUSH CACHE EXT
ea 00 00 00 00 00 a0 00 14d+13:11:58.091 FLUSH CACHE EXT
Error 19 occurred at disk power-on lifetime: 39731 hours (1655 days + 11 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
– – – – – – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
– – – – – – – – ---------------- --------------------
60 00 08 ff ff ff 4f 00 14d+13:11:08.047 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 14d+13:11:08.046 SET FEATURES [Enable SATA feature]
27 00 00 00 00 00 e0 00 14d+13:11:08.046 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 14d+13:11:08.046 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 14d+13:11:08.046 SET FEATURES [Set transfer mode]
Error 18 occurred at disk power-on lifetime: 39731 hours (1655 days + 11 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
– – – – – – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
– – – – – – – – ---------------- --------------------
60 00 08 ff ff ff 4f 00 14d+13:11:05.103 READ FPDMA QUEUED
ea 00 00 00 00 00 a0 00 14d+13:11:03.031 FLUSH CACHE EXT
61 00 08 80 0f 40 41 00 14d+13:11:03.031 WRITE FPDMA QUEUED
ea 00 00 00 00 00 a0 00 14d+13:11:03.030 FLUSH CACHE EXT
ea 00 00 00 00 00 a0 00 14d+13:11:02.813 FLUSH CACHE EXT
Error 17 occurred at disk power-on lifetime: 39731 hours (1655 days + 11 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
– – – – – – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
– – – – – – – – ---------------- --------------------
60 00 08 ff ff ff 4f 00 14d+13:04:02.758 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 14d+13:04:02.758 SET FEATURES [Enable SATA feature]
27 00 00 00 00 00 e0 00 14d+13:04:02.758 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 14d+13:04:02.758 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 14d+13:04:02.757 SET FEATURES [Set transfer mode]
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% 12 -
# 2 Short offline Completed without error 00% 6 -
# 3 Short offline Completed without error 00% 6 -
# 4 Short offline Completed without error 00% 2 -
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 Not_testing
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.
La théorie qui se confirme est que sda a commencé de dysfonctionner en 2013, et n'était depuis lors plus utilisé par le système. Il semble qu'il manque un sdb dans l'histoire, qui ne s'affiche pas mais je crois qu'il devrait y être.
smartctl -a /dev/sdb
`Smartctl open device: /dev/sdb failed: No such device `
Soit le disque a été débranché, soit il n'est plus reconnu.
J'ai ajouté à nombreux messages destinés au support une demande de vérification de la connectique du disque, cela semble peu probable.
Quelqu'un voit-t-il une autre solution ? C'est vraiment la cata ?
Si le disque n'est pas reconnu via la commande "fdisk -l", aucun moyen d'y accéder via une méthode plus bas niveau ?
Je ne peut pas remettre le site en ligne avec une base vide, ni avec une ancienne, les backups étaient effectuées automatiquement sur le même système de fichiers…
Pour info on a déjà fait des tests ici https://community.ovhcloud.com/t/51482
Pour moi non si le serveur ne le reconnaît pas. Rien à faire à part le récupérer et tenter à la maison. (sauf à demander au technicien de vérifier les branchements)
Ok, finallement j'ai redémarré une nouvelle fois la machine, toujours en mode rescue, et surprise !!!
/dev/sdb est re-apparu, et mes fichiers sont revenus.
J'ai pu déjà faire un dump de 70% des tables, le reste est actuellement en cours de réparation (qui échoue déjà…).
Merci Buddy pour ton aide !!! Sans toi j'aurais peut-être pas essayé le redémarrage !!!
La vie est belle quand on a de la chance (j'ai récupéré la table utilisateurs, le site sera en ligne dans la journée, un nouveau serveur attends de recevoir le dump le plus complet possible).
à l'avenir penser à vérifier ton raid ( cat /proc/mdstat ) , l'état des disques (les commandes précédentes ) et faire des sauvegardes distantes ![]()
Autrement dit : va voir ce que 'mdadm' peut faire pour toi.
Bonjour Buddy
Et pour les RAID Hardware ?
On check comment si un HD n'est pas en train de se casser la g… ? ![]()
Merci et bonne journée. ![]()
Didier
Bonjour,
avez un logiciel (gratuit ou propriétaire) qui va demande à la carte raid si tout va bien.
Cordialement, janus57
Bonjour Janus
ça doit exister en effet !
Je vais creuser du côté des guides et documentations OVH.
Merci
Didier