Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Expanded question into two parts (to first understand what a directory hole is)
Source Link
drgrog
  • 173
  • 2
  • 6

I have a specific directory where I am unable to delete the files or the directory. The directory is on an ext4 file system, using RAID5 over 3 disks on a QNAP NAS.

Using rm -f gives me:

rm: unable to stat `file.jpg': Input/output error 

And also shows the following on dmesg:

EXT4-fs error (device dm-0): dx_probe:933: inode #55050534: block 3591: comm rm: Directory hole found 

Since the "Input/output error" usually means hardware, I have run several tests such as what I assume is QNAP's version of fsck, badblocks, as well as the SMART rapid and long tests on the individual disks, plus raid scrubbing gets run periodically anyway - and all have come back saying no errors.

The folder has a lot of files as it's blackhole for thousands of files added daily/hourly (unable to count them as ls | wc suffers from the "Input/output error" and "Directory hole found" errors) - so based on similar black hole post) I'm assuming I've trashed the directory and not the hardware.

Unfortunately the version of find on the QNAP does not support the -exec argument, and so I cannot try what was suggested in that post.

The question isquestions are: how else can I delete the files and directory, and plug whatever a directory hole is.

  1. What exactly is a 'Directory hole',
  2. How can I delete the directory and files within a directory hole.

I have a specific directory where I am unable to delete the files or the directory. The directory is on an ext4 file system, using RAID5 over 3 disks on a QNAP NAS.

Using rm -f gives me:

rm: unable to stat `file.jpg': Input/output error 

And also shows the following on dmesg:

EXT4-fs error (device dm-0): dx_probe:933: inode #55050534: block 3591: comm rm: Directory hole found 

Since the "Input/output error" usually means hardware, I have run several tests such as what I assume is QNAP's version of fsck, badblocks, as well as the SMART rapid and long tests on the individual disks, plus raid scrubbing gets run periodically anyway - and all have come back saying no errors.

The folder has a lot of files as it's blackhole for thousands of files added daily/hourly (unable to count them as ls | wc suffers from the "Input/output error" and "Directory hole found" errors) - so based on similar black hole post) I'm assuming I've trashed the directory and not the hardware.

Unfortunately the version of find on the QNAP does not support the -exec argument, and so I cannot try what was suggested in that post.

The question is: how else can I delete the files and directory, and plug whatever a directory hole is.

I have a specific directory where I am unable to delete the files or the directory. The directory is on an ext4 file system, using RAID5 over 3 disks on a QNAP NAS.

Using rm -f gives me:

rm: unable to stat `file.jpg': Input/output error 

And also shows the following on dmesg:

EXT4-fs error (device dm-0): dx_probe:933: inode #55050534: block 3591: comm rm: Directory hole found 

Since the "Input/output error" usually means hardware, I have run several tests such as what I assume is QNAP's version of fsck, badblocks, as well as the SMART rapid and long tests on the individual disks, plus raid scrubbing gets run periodically anyway - and all have come back saying no errors.

The folder has a lot of files as it's blackhole for thousands of files added daily/hourly (unable to count them as ls | wc suffers from the "Input/output error" and "Directory hole found" errors) - so based on similar black hole post) I'm assuming I've trashed the directory and not the hardware.

Unfortunately the version of find on the QNAP does not support the -exec argument, and so I cannot try what was suggested in that post.

The questions are:

  1. What exactly is a 'Directory hole',
  2. How can I delete the directory and files within a directory hole.
Source Link
drgrog
  • 173
  • 2
  • 6

How to delete files after EXT4-fs error: Directory hole found

I have a specific directory where I am unable to delete the files or the directory. The directory is on an ext4 file system, using RAID5 over 3 disks on a QNAP NAS.

Using rm -f gives me:

rm: unable to stat `file.jpg': Input/output error 

And also shows the following on dmesg:

EXT4-fs error (device dm-0): dx_probe:933: inode #55050534: block 3591: comm rm: Directory hole found 

Since the "Input/output error" usually means hardware, I have run several tests such as what I assume is QNAP's version of fsck, badblocks, as well as the SMART rapid and long tests on the individual disks, plus raid scrubbing gets run periodically anyway - and all have come back saying no errors.

The folder has a lot of files as it's blackhole for thousands of files added daily/hourly (unable to count them as ls | wc suffers from the "Input/output error" and "Directory hole found" errors) - so based on similar black hole post) I'm assuming I've trashed the directory and not the hardware.

Unfortunately the version of find on the QNAP does not support the -exec argument, and so I cannot try what was suggested in that post.

The question is: how else can I delete the files and directory, and plug whatever a directory hole is.