Linux system hard disk failure repair method

  

Linux system hard disk will have some bad sectors in the process of use, if the bad track occurs in the critical area of ​​the system, it will damage the system files, and various errors occur. This article will introduce you, this article will teach you how to repair the Linux system hard disk failure.

Fault Tip:

Jul 17 00:46:34 xxxxxxxxxxxxxx kernel: [8384801.159283] EXT4-fs (sdl1): warning: mounting fs with errors, running e2fsck is recommended < Br>

Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016500] sd 6:0:6:0: [sdl] Sense Key : Medium Error [current]

Jul 17 00:50: 00 xxxxxxxxxxxxxx kernel: [8385006.016508] sd 6:0:6:0: [sdl] Add. Sense: Unrecovered read error

Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016524] Buffer I/O error On device sdl1, logical block 1415594116

Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.095561] Buffer I/O error on device sdl1, logical block 1415594117

Troubleshooting:

#e2fsck /dev/sdl1

1. If the bad block cannot be repaired, you need to format the hard disk with fdisk:

#fdisk /dev/sdl

#d

#n

#p

#Enter

#Enter

#w

2. Format the disk with the ext4 file system:

#mkfs.ext4 /dev/sdl1

3. Format The hard disk mount back:

#mount -L /Hadoop07 /hadoop/7 -t ext4 -o defaults,noatime,nodiratime,noauto

If you find /var/log in a few days /messages has the latest /dev/sdl error log, which indicates that this hard disk needs to be replaced. At this time, you can first disable the read and write function of the disk that is hung in the directory. Before that, you can put the data inside. Copy it out:

#chmod 0 /hadoop07

The above is the repair method for the failure of the Linux system hard disk. Of course, if it is a physical bad track, it is a problem with the hard disk itself, that is not Repaired in this way.

Copyright © Windows knowledge All Rights Reserved