27 February 2008

Daemons wear the pants in our relationship

When I try to use AFS over the internet, I occasionally lose the connection. No problem, I think, I'll just reload it:

% /etc/init.d/openafs-client reload
Stopping AFS services:afsd: Shutting down all afs processes and afs state
afsd: AFS still mounted; Not shutting down


Well, damn. Pretty sure nothing is using it, but hope is not lost, there's a force-reload command too. As in, to force it to reload.

% /etc/init.d/openafs-client force-reload
Stopping AFS services:afsd: Shutting down all afs processes and afs state
afsd: AFS still mounted; Not shutting down


AFS just told me to go to hell, and there's pretty much nothing I can do about it. I never need to unmount it if I try to stop the daemon while still connected, but I'll listen to the error message and try unmounting it's folder instead:

% umount /afs
umount: /afs: device is busy


Just for giggles, let's force that too:

% umount -f /afs
umount2: Device or resource busy


Yeah, totally didn't see that coming. What is the point of having force options if they never work? Somebody finally told me about umount -l, which detaches the filesystem but doesn't actually clean up references to it, which is generally considered a bad idea but actually works, unlike all the approved mechanisms

1 comment:

sxw said...

If you're running in freelance mode (supply the -dynroot option to afsd), you should find that there's no need to restart the AFS daemon after a network failure.

Simon.