ジャーナルが破損したext4ファイルシステムを修復

ジャーナルが破損したext4ファイルシステムを修復

私のハードドライブのログにある種のハードウェアの問題があるようです。これにより、ドライブがロードされなくなります。実行mount -r -t ext4 /dev/sda5 /mnt/root結果は次のとおりです。

[ 1420.671055] ata1.00: exception Emask 0x0 SAct 0x1000000 SErr 0x0 action 0x0
[ 1420.673862] ata1.00: irq_stat 0x40000008
[ 1420.676600] ata1.00: failed command: READ FPDMA QUEUED
[ 1420.679326] ata1.00: cmd 60/40:c0:a8:9d:0a/00:00:08:00:00/40 tag 24 ncq 32768 in
[ 1420.679326]          res 41/40:40:e1:9d:0a/00:00:08:00:00/00 Emask 0x409 (media error) <F>
[ 1420.685014] ata1.00: status: { DRDY ERR }
[ 1420.687858] ata1.00: error: { UNC }
[ 1420.761064] ata1.00: configured for UDMA/133
[ 1420.763863] sd 0:0:0:0: >[sda] Unhandled sense code
[ 1420.766653] sd 0:0:0:0: >[sda]  
[ 1420.769364] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1420.772104] sd 0:0:0:0: >[sda]  
[ 1420.774780] Sense Key : Medium Error [current] [descriptor]
[ 1420.777491] Descriptor sense data with sense descriptors (in hex):
[ 1420.780249]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
[ 1420.783175]         08 0a 9d e1 
[ 1420.785972] sd 0:0:0:0: >[sda]  
[ 1420.788730] Add. Sense: Unrecovered read error - auto reallocate failed
[ 1420.791545] sd 0:0:0:0: >[sda] CDB: 
[ 1420.794331] Read(10): 28 00 08 0a 9d a8 00 00 40 00
[ 1420.797242] end_request: I/O error, dev sda, sector 134913505
[ 1420.800072] ata1: EH complete
[ 1420.800077] JBD2: Failed to read block at offset 2748
[ 1420.812529] JBD2: recovery failed
[ 1420.815275] EXT4-fs (sda5): error loading journal

これが何を意味するのかはほとんどわかりませんが、ログのロードに失敗するハードウェアの問題のようです。この問題を解決する方法はありますか?たとえば、ドライブの残りの部分をほとんどそのまま残しながら、ログを別のオフセットに再配置できますか?ドライブを使い続けるつもりはありません。重要なファイルをコピーできるようにマウントしたいだけです。

ベストアンサー1

ファイルにアクセスできるようにログを再生せずに読み取り専用でマウントする(通常のファイルシステムにコミットされていない変更が失われる可能性があります):

mount -o ro,noload...

おすすめ記事