1

I have an NTFS partition(/dev/sda3) mounted via ntfs-3g on arch linux. This partition contains a file called cee431d2730eb5e1697bd57b3bb529 which I want to delete.

ls -la returns the following output

ls: cannot access 'data/cee431d2730eb5e1697bd57b3bb529': Input/output error
total 16611578
#Some other files...
d?????????  ? ?       ?              ?            ? cee431d2730eb5e1697bd57b3bb529

Similarly file cee431d2730eb5e1697bd57b3bb529 returns cee431d2730eb5e1697bd57b3bb529: cannot open 'cee431d2730eb5e1697bd57b3bb529' (Input/output error)

ls -i also returns ? cee431d2730eb5e1697bd57b3bb529(it can't find the inode)

I tried deleting it with rm -f which also fails with an input/output error(both as root and normal user).

Running ntfsfix /dev/sda3 also didn't fix the problem.

  • 1
    Is there any additional information provided by dmesg? – Emmanuel Rosa Sep 8 '18 at 10:17
1

As far I know, currently there is no Linux tool for the fixing of ntfs partitions. ntfsfix is only a trick, it simply sets the partition as "clean", but it actually doesn't clean it.

Writing to a corrupted filesystem endangers the data on it, and we generally don't trust ntfs, thus we try to avoid the further data corruption, this is why this tool rather chooses to reject the deletion.

You need to use a different operating system to fix the partition. Ideally, to avoid rebooting your Linux, it is useful if you use some virtualization technology for that with direct partition access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.