天天看點

檔案系統損壞解決執行個體

客戶系統早晨突然掉電,再啟動,發現沒法啟動應用程式,封包件系統損壞。前輩幫忙解決了,記錄下來解決步驟,自己學習:

[root@erp02 ~]# mount /devdb

mount: wrong fs type, bad option, bad superblock on /dev/sdc2,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

以上,斷電使得/dev/sdc2分區出錯,不能mount:

檢視開機啟動的資訊:

[root@erp02 ~]# dmesg | tail -n 20

ADDRCONF(NETDEV_UP): eth1: link is not ready

Bluetooth: Core ver 2.10

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: L2CAP ver 2.8

Bluetooth: L2CAP socket layer initialized

Bluetooth: RFCOMM socket layer initialized

Bluetooth: RFCOMM TTY layer initialized

Bluetooth: RFCOMM ver 1.8

ext3: No journal on filesystem on sdc2

Bluetooth: HIDP (Human Interface Emulation) ver 1.1

eth0: no IPv6 routers present

hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }

hda: drive_cmd: error=0x04 { AbortedCommand }

ide: failed opcode was: 0xec

FS-Cache: Loaded

進行修複操作,先查詢Superblock位置資訊:

[root@erp02 ~]# dumpe2fs /dev/sdc2 | grep -i superblock

dumpe2fs 1.39 (29-May-2006)

  Primary superblock at 0, Group descriptors at 1-15

  Backup superblock at 32768, Group descriptors at 32769-32783

  Backup superblock at 98304, Group descriptors at 98305-98319

  Backup superblock at 163840, Group descriptors at 163841-163855

  Backup superblock at 229376, Group descriptors at 229377-229391

  Backup superblock at 294912, Group descriptors at 294913-294927

  Backup superblock at 819200, Group descriptors at 819201-819215

  Backup superblock at 884736, Group descriptors at 884737-884751

  Backup superblock at 1605632, Group descriptors at 1605633-1605647

  Backup superblock at 2654208, Group descriptors at 2654209-2654223

  Backup superblock at 4096000, Group descriptors at 4096001-4096015

  Backup superblock at 7962624, Group descriptors at 7962625-7962639

  Backup superblock at 11239424, Group descriptors at 11239425-11239439

  Backup superblock at 20480000, Group descriptors at 20480001-20480015

  Backup superblock at 23887872, Group descriptors at 23887873-23887887

根據查詢得到的backup superblock位置号,進行修複:

[root@erp02 ~]# fsck.ext3 -y -b 98304 /dev/sdc2

e2fsck 1.39 (29-May-2006)

/dev/sdc2 was not cleanly unmounted, check forced.

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 3A: Optimizing directories

... ...

/dev/sdc2: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sdc2: 86343/31326208 files (0.4% non-contiguous), 53066211/62647263 blocks

[root@erp02 ~]# mount /dev/sdc2

以上,發現還是不能mount。

檢查:

[root@erp02 ~]# fsck.ext3 /dev/sdc2

/dev/sdc2: clean, 86343/31326208 files, 53066211/62647263 blocks

[root@erp02 ~]# umount /dev/sdc2

umount: /dev/sdc2: not mounted

檢查完後變成ext2檔案系統,是以不能mount為ext3檔案系統。

[root@erp02 ~]# mount /dev/sdc2 /devdb

[root@erp02 ~]# mount

/dev/sdc2 on /devdb type ext2 (rw)

[root@erp02 ~]# umount /devdb

轉為ext3檔案系統

[root@erp02 ~]# /sbin/tune2fs -j /dev/sdc2

成功mount /devdb

啟動DEV資料庫和應用。

下面轉載幾篇重要的修複執行個體:

http://blog.csdn.net/cymm_liu/article/details/36185733

http://blog.csdn.net/cymm_liu/article/details/36185805

http://blog.csdn.net/cymm_liu/article/details/36185881

http://blog.csdn.net/cymm_liu/article/details/36186127

繼續閱讀