ディレクトリの削除中にエラーが発生しました:ディレクトリが空ではありません。

ディレクトリの削除中にエラーが発生しました:ディレクトリが空ではありません。

ディレクトリを削除しようとすると(rm -rf)、次の結果が表示されます。

rm: cannot remove 'EMBA': Directory not empty

また、ディレクトリを一覧表示しようとすると、次の結果が表示されます。

ls: reading directory 'EMBA': Input/output error

EMBAディレクトリには権限777があり、それを使用するプログラムはありません。

オペレーティングシステムはUbuntu 20.04で、ファイルシステムはNTFSです。

修正する

roaimaの答えに基づいて、以下を試しました。

1 - dmesgまたはJournalctl -kの最新の出力で、ディスクI / Oエラーに対応するメッセージを確認してください。

I can't find any error messages

2 - SMART属性を確認して、ディスクがすぐに消耗するのか、ファイルシステムのみが問題であるかを確認します(smartctl -x)。

I think there is notting relevant

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   080   064   006    Pre-fail  Always       -       108362796
  3 Spin_Up_Time            0x0003   097   096   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       39
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   076   060   045    Pre-fail  Always       -       37146160
  9 Power_On_Hours          0x0032   097   097   000    Old_age   Always       -       3456 (84 124 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       38
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   070   061   040    Old_age   Always       -       30 (Min/Max 24/34)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       15
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       643
194 Temperature_Celsius     0x0022   030   040   000    Old_age   Always       -       30 (0 19 0 0 0)
195 Hardware_ECC_Recovered  0x001a   080   064   000    Old_age   Always       -       108362796
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       667h+38m+56.521s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       6276317084
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       8419504151

3 - ntfsfixを使用してファイルシステムを確認します。私は得る:

 Mounting volume... OK
 Processing of $MFT and $MFTMirr completed successfully.
 Checking the alternate boot sector... OK
 NTFS volume version is 3.1.
 NTFS partition /dev/sdb2 was processed successfully.

4 - Windowsオペレーティングシステムを使用してファイルシステムを確認します。

Windows has encountered errors on the volume 

エラーを修正してシステムを再起動した後にディレクトリを削除したときに発生するエラーを修正しました。

ベストアンサー1

ファイルシステムまたはディスクエラーが発生しました(Input/output error)。試すべきことは次のとおりです。

  1. 最近の出力を確認するdmesgか、journalctl -kディスクI / Oエラーに対応するメッセージを見つけてください。
  2. SMART属性を調べて、ディスクにエラーが発生しようとしているのか、ファイルシステムの問題であるかを確認してください(smartctl -x /dev/sdbディスクsdbの正しいデバイス名に置き換えられています)。
  3. ファイルシステム(ntfsfix /dev/sdb1sdb1正しいデバイス名と交換)を確認してください。そしてパーティション番号)
  4. Windowsオペレーティングシステムを使用してファイルシステムを確認します。

おすすめ記事