[OpenAFS] Unclean shutdown: AFS client ate my filesystem (ext3)

Derek Atkins warlord@MIT.EDU
10 Jul 2002 09:45:06 -0400


Helge Bahmann <bahmann@math.tu-freiberg.de> writes:

> On 9 Jul 2002 Derek Atkins wrote:
> 
> > The AFS Cache has never been fully tested with ext3, but it should
> > still die on system shutdown.
> 
> I think the fact that the cache manager did not shutdown cleanly is not
> related to using ext3 as cache, and more to the fact that a process kept
> files open in /afs (at least thats what the shutdown messages told me).
> Perhaps I should do "fuser -9 -k -m /afs", but this is racy

Well, the system shutdown process sends a SIGTERM and SIGKILL to all
processes, which should DWYW.  It should kill off all the users of AFS
and then allow AFS to be unmounted.

> Does openafs have an option for "forced umount", like nfs?

Nope.  If AFS is in use, it cannot be unmounted.  There is no "force"
because applications may die horrible deaths if you do it.

> > What version of the OpenAFS are you using?  Recent 1.2.x releases
> > shouldn't have this shutdown problem (which _did_ exist in earlier
> > versions).
> 
> 1.2.3, both client and server

Ahh, yes.  This particular shutdown problem was fixed in a later
release.  Upgrade your client to a more recent version and you should
not have this problem.

> I am less worried about shutdown failure, but messing up my filesystem is
> really really bad.

The shutdown failure is the direct cause of your filesystem messup.
The AFS client uses under-the-covers interfaces to the file system.
It has only been thoroughly tests on ext2.  With ext3 it is quite
possible (as you have seen) for the cache manager to get the file
system into a "bad state".

This is why the recommendation is two fold:
        1) use ext2.
        2) use a separate cache partition.

#1 is because it's been tested and known to work (and worst case you
have to fsck the partition), and #2 is for many many reasons, which I
wont get into here.

I hope this helps.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available