當服務器或PC機器的硬盤在使用一段時間后,會出現無法使用正常進行使用; 1. 當將文件系統掛載到指定的目錄的時候,會出現mount 失敗,如下圖: [root@template ~]# mount /dev/sdc /media/ mount: wrong fs type, bad option, bad superblock on /dev/sdc, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so 2.查看后台的log 信息:如syslog message等查看是否有錯誤的說明,這里的錯誤截取了message 日志的部分內容: 926 Oct 18 13:30:49 template kernel: sd 0:0:2:0: [sdb] Unhandled sense code 927 Oct 18 13:30:49 template kernel: sd 0:0:2:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE 928 Oct 18 13:30:49 template kernel: sd 0:0:2:0: [sdb] Sense Key : Medium Error [current] 929 Oct 18 13:30:49 template kernel: Info fld=0x22c66634 930 Oct 18 13:30:49 template kernel: sd 0:0:2:0: [sdb] Add. Sense: a synchronization mark error 931 Oct 18 13:30:49 template kernel: sd 0:0:2:0: [sdb] CDB: Read(10): 28 00 22 c6 65 98 00 01 00 00 932 Oct 18 13:30:49 template kernel: JBD: Failed to read block at offset 19654 933 Oct 18 13:30:49 template kernel: JBD: recovery failed 934 Oct 18 13:30:49 template kernel: EXT4-fs (sdb): error loading journal 935 Oct 18 13:30:49 template kernel: EXT4-fs (sdc): warning: checktime reached, running e2fsck is recommended 3.根據日志的相關提示,嘗試對磁盤進行修復: [root@template ~]# e2fsck -p /dev/sdc /dev/sdc: recovering journal Error reading block 72928454 (Attempt to read block from filesystem resulted in short read). /dev/sdc: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) 4.再根據實際情況查看磁盤是否需要進一步修復,如果需要則進行下面的步驟: [root@template ~]# fsck /dev/sdc fsck from util-linux-ng 2.17.2 e2fsck 1.41.12 (17-May-2010) /dev/sdc: recovering journal Error reading block 72928454 (Attempt to read block from filesystem resulted in short read). Ignore error<y>? yes Force rewrite<y>? yes /dev/sdc contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdc: 29/36634624 files (0.0% non-contiguous), 16523254/146515446 blocks