星期五, 9月 17, 2010

$MFTMirr does not match $MFT (record 0) 解決小記

在 X Window 下卸載隨身碟或是 2.5 吋硬碟,
有的時候會出現 X 很快的又掛載硬碟上來

這個時候如果不小心搶快把 USB 線拔掉
重新連接的時候, 就會出現以下錯誤訊息


# mount /dev/sdb1 /mnt/
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.

這個時候該如何呢?
有些 ntfs 指令沒機會玩, 現在就有機會啦
ntfs 開頭的指令如下

# ntfs
ntfs-3g           ntfscat           ntfscp            ntfsls
ntfs-3g.probe     ntfsclone         ntfsfix           ntfsresize
ntfs-3g.secaudit  ntfscluster       ntfsinfo          ntfsundelete
ntfs-3g.usermap   ntfscmp           ntfslabel         

看了一下, 應該是用 ntfsfix 比較有可能

所以就試試看

# ntfsfix /dev/sdb1
Mounting volume... FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.

果然順利的解決問題

筆記一下


************************************************************************************
with English

Sometimes when you unmount flash disk at X Window. 
X Window will mount it again quickly. 

If you remove the USB cable at the same time.
When you connect the USB cable, you will see the error messages.

# mount /dev/sdb1 /mnt/
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.


What would you do at this time?
Some commands which start with ntfs you can use it. 

There are some commands start with ntfs

# ntfs
ntfs-3g           ntfscat           ntfscp            ntfsls
ntfs-3g.probe     ntfsclone         ntfsfix           ntfsresize
ntfs-3g.secaudit  ntfscluster       ntfsinfo          ntfsundelete
ntfs-3g.usermap   ntfscmp           ntfslabel         

I think the ntfsfix were be probably suitable command.
So I try it ~

# ntfsfix   /dev/sdb1
Mounting volume... FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.

The command ntfsfix  fix my problem.

Note it and enjoy it ^^


沒有留言: