[OpenAFS] No such device in ls

Sean Kelly smkelly@rooster.creighton.edu
Thu, 5 Jan 2006 11:58:11 -0600


Greetings.

This may have been covered in list archives somewhere, but I failed to
locate it.

I'm having an issue where dead/broken mountpoints in AFS cause ls to output
error messages. For example, I just did a `vos remove <volname>` of a
mounted volume and now when I try to remove the mountpoint:

[smkelly@test-host users]$ rm dirname
rm: cannot lstat `dirname': No such device
[smkelly@test-host users]$ rmdir dirname
rmdir: `dirname': No such device
[smkelly@test-host users]$ ls dirname
ls: cyberark: No such device
[smkelly@test-host users]$ ls -ld dirname
ls: cyberark: No such device

I realize it is likely bad form not to unmount a volume before deleting it,
but to be fair it let me... Any idea how I remove this now? Mount a new
volume there just to remove it?

I also see this sort of thing when doing a general `ls` and there are files
in the listing that I don't have permission to read or are broken. My guess
is that it is likely related to Linux trying to stat() the file to
determine if it is a file or directory and me not even having access to
stat():

[smkelly@test-host smkelly]$ ls /afs/openafs.org/service/partitions
ls: /afs/openafs.org/service/partitions/penn.a: No such device
grand-opening.a  grand-opening.b  grand-opening.c  grand-opening.d

That sort of erroring mixed in with ls output could be confusing to users.
Is there any way to fix that sort of thing?

Thanks.

-- 
Sean M. Kelly
Unix Systems Architect
Division of Information Technology
Creighton University