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:
- What exactly is a 'Directory hole',
- How can I delete the directory and files within a directory hole.