Hrm. You did an fsck and reboot, and yet you still get a "stale file
handle"? That's... annoying. I don't think I've ever bumped into quite
that situation before. While your potential solution -- backup,
reformat, restore -- sounds like overkill, I'm afraid I don't have
anything else, other, possibly, than "Ignore it." Which is probably
sub-optimal, as it might cause issues with things that scan the
hierarchy. I'd be interested in what the output of this is:
strace -s 1024 -f -o /tmp/rm.log rm -- ?
(Feel free to replace "rm -- ?" with whatever it is that throws the
stale file handle error...)
I'd also be interested in whether or not 'dmesg' has anything of note.
-Ken
On 2017-03-28 11:14, . . wrote:
On 03/28/2017 09:58 AM, Ken D'Ambrosio wrote:
On 2017-03-28 10:56, . . wrote:
I'm unable to delete one file which lists as 'Stale file handle' on a
jfs file system. I've read I should be able to do so with inode.
Unfortunately, 'ls -i' doesn't report an inode. It displays a
question mark and file name. Is there another way?
"Stale file handle" probably means you should give a reboot; usually,
it means that the mountpoint is kinda flaky. And the question mark as
a filename may point toward corruption -- I'd *strongly* recommend an
fsck, ASAP.
Good luck!
-Ken
I'd done an fsck and rebooted straightaway. It's but one file and I
was able to rename its directory and rebuild the original directory
with the original name and a copy of the offending file without
corruption. I then nuked all but the offending file in the renamed
directory.
I've checked the entire partition and only the one file reports as
bad. It's apparently not causing problems but it bugs me.
If there's no way to nuke the file does the following make sense?
1) Copy the partition containing the problem file to a blank
partition, omitting the partition containing the problem file.
2) Reformat the problem partition.
3) Copy the created partition to the reformatted partition.