This article mainly share the server in the hard disk after the failure of/var/log/messages and/var/log/mcelog will appear in the specific logs and corresponding repair methods, with the increasing number of cases and rich, I will conclude the formation of automated scripts.
Of course, there will be many hard disks have physical bad, need to be replaced, this will require the hard disk supplier to replace, this is not covered in this article.
Server model:
HP se1170s
HDD Model:
Mb2000eaznl
Fault 1:
Jul 00:46:34 xxxxxxxxxxxxxx kernel: [8384801.159283] Ext4-fs (SDL1): Warning:mounting fs with errors, running e2fsck I S recommended
Jul 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016500] SD 6:0:6:0: [SDL] Sense Key:medium Error [current]
Jul 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016508] SD 6:0:6:0: [SDL] ADD. Sense:unrecovered Read error
Jul 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016524] Buffer I/O error on device SDL1, logical block 1415594116
Jul 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.095561] Buffer I/O error on device SDL1, logical block 1415594117
Fault resolution:
#e2fsck/DEV/SDL1
If the bad block cannot be repaired, you need to format the hard drive with Fdisk:
#fdisk/dev/sdl
#d
#n
#p
#Enter
#Enter
#w
Format the disk with the Ext4 file system:
#mkfs. EXT4/DEV/SDL1
Mount the formatted hard drive back:
#mount-L/HADOOP07/HADOOP/7-T Ext4-o Defaults,noatime,nodiratime,noauto
If a few days later found/var/log/messages inside the latest/dev/sdl error log, it indicates that the hard disk needs to be replaced, then you can first ban the disk hanging in the directory read and write function, before you can first copy the data inside:
#chmod 0/hadoop07
This article from the "Linux and Network" blog, reproduced please contact the author!
Linux hard disk failure case sharing