LoginSignup
0
0

HDDマウント時にMetadata kept in Windows cache, refused to mount.と出力される

Posted at
shell
sudo mount -tntfs-3g /dev/sda1 /mnt/hdd

のようにしてマウントすると

The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only

と出てマウントに失敗する。(実際にはマウントできているが書き込みができない。)

ChatGPTには

提供されたエラーメッセージから推測すると、/dev/sda1デバイスはNTFSファイルシステムを持っており、Windowsが正常にシャットダウンされていない可能性があります。NTFSパーティションが安全な状態でないため、読み取り専用でマウントされているようです。

エラーメッセージにも記載されていますが、次のいずれかの理由でこのエラーが発生する可能性があります。

Windowsのハイバネーション(休止状態)が有効になっている場合、NTFSパーティションは読み取り専用でマウントされます。Windowsを完全にシャットダウンしてから再試行してください。

Windowsの高速起動(ファストスタートアップ)が有効になっている場合、NTFSパーティションは正しくアンマウントされず、読み取り専用でマウントされる場合があります。同様に、Windowsを完全にシャットダウンしてから再試行してください。

したがって、まずはWindowsを正しくシャットダウンし、ハイバネーションと高速起動の設定が無効になっていることを確認してください。その後、再度マウントを試みると、書き込み可能なモードでNTFSパーティションをマウントできるはずです。

との指摘があり、BIOSの高速起動がオフであることを確認し、Windowsもシャットダウンをもう一度してみたが、結果は変わらなかった。

ntffsfixコマンドの使用

驚くべきことにその修正方法がありましたので紹介させていただきます。

shell
ntfsfix /dev/sdb1

出力

Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda1 was processed successfully.

これで治りました。

rsync: [receiver] mkstemp "/mnt/hdd/xxx/xxxxxx.xxxx" failed: Read-only file system (30)

とでていたのですが、このエラーもなくなり、データ転送ができるようになりました。

お疲れ様でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0