[8713] in Info-AFS_Redistribution

home help back first fref pref prev next nref lref last post

Disk cache and journaling filesystems

daemon@ATHENA.MIT.EDU (Atro Tossavainen)
Fri Jun 8 06:32:18 2001

From: Atro Tossavainen <atossava@cc.helsinki.fi>
Message-Id: <200106081025.f58APgI16230@sirppi.helsinki.fi>
To: info-afs@transarc.com
Date: Fri, 8 Jun 2001 13:25:41 +0300 (EET DST)
Reply-To: Atro.Tossavainen@helsinki.fi
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hello,

One of my computers, a HP, recently crashed and when it came back up,
one of the disks had failed.

This disk was part of the volume group that contained a logical volume
with a HFS filesystem (non-journaling) that I had designated as the AFS
cache.

After noticing that the logical volume had failed, the computer
proceeded with system initialisation. At AFS initialisation, it noticed
that /usr/vice/cache was an empty directory (since it served only as the
mount point for the now defunct HFS partition) and proceeded to build a
new disk cache on /usr (which is a VxFS partition).

It built a number of empty Vnnnnn files, then panicked.

There is no safety check in the afs.rc to guard against this, which I
think is rather daft -- since you _know_ that afsd is going to panic
if you try to do this.

So (Transarc) please include this (or similar) in the afs.rc for HP,
Digital UNIX and any other platforms for which the use of a particular
type of file system is not supported as the disk cache, after checking
that the /afs root directory and /usr/vice/cache exist, but before
starting afsd.

Note: This doesn't take into account the possibility of a memcache, in
which case it is legal for /usr/vice/cache to be anywhere. Maybe a check
for that should be added too.

CACHEDIR=`cut -f2 -d: /usr/vice/etc/cacheinfo`

case `uname` in
	HP-UX)	CACHEMNT=`df $CACHEDIR | cut -f2 -d\( | cut -f1 -d\ `
		CACHEFS_LOGGING=`mount | grep ${CACHEMNT}.*log`
		FSTYPE=VxFS
		;;
	OSF1)	CACHEMNT=`df $CACHEDIR | grep -v Filesystem | cut -f1 -d\ `
		CACHEFS_LOGGING=`mount | grep ${CACHEMNT}.*advfs`
		FSTYPE=AdvFS
		;;
esac

if [ ! -z "$CACHEFS_LOGGING" ]; then
    echo "$CACHEDIR is on the $CACHEMNT $FSTYPE partition, which is not"
    echo "supported on `uname`. Running afsd would panic the machine. Not starting AFS."
    exit 1
fi

-- 
Atro Tossavainen (Mr.)               / The Institute of Biotechnology at
Systems Analyst, Techno-Amish &     / the University of Helsinki, Finland,
+358-9-19158939  UNIX Dinosaur     / employs me, but my opinions are my own.
< URL : http : / / www . iki . fi / atro . tossavainen / >

home help back first fref pref prev next nref lref last post