gnome, automounting, and ataraid don't get along well
jh at sandstorm.net
Mon Nov 2 19:22:39 UTC 2009
[I sent this last week to freebsd-gnome and freebsd-current, but it
didn't appear on freebsd-current.]
I upgraded my desktop machine to 8.0-RC2 and 8.0-RELEASE packages
recently. This machine uses an Intel chipset, ICH9R southbridge, and
two SATA drives configured in a RAID1 with Intel's soft-RAID BIOS. ad10
and ad12 are automatically configured into an array by ataraid that
shows up as ar0, which has FreeBSD installed in a typical UFS
multi-partition setup. I'm using the GNOME desktop.
At first glance, all appears to be happy. But when I run a software
build that creates/mounts filesystem images with the md driver, I get an
authentication dialog (at http://users.rcn.com/john70/auth.jpg ) which
wants to mount something
but doesn't say what. If I authenticate, gnome then proceeds to mount
multiple devices in /dev/ufsid and/or partitions of ad12s1, ignoring the
fact that that they're part of a RAID that's already mounted. (It
seemed to ignore the md device, though.) I get this in syslog,
suggesting that kernel & mount are unaware of the duplicate mounts:
Oct 27 17:54:40 lister kernel: WARNING: /site was not properly dismounted
Oct 27 17:54:40 lister kernel: /site: mount pending error: blocks 32 files 2
This obviously has big potential for filesystem corruption on any
FreeBSD 8.0 system using GNOME and ataraid. Fortunately, I seem not to
have lost any data. This also happens when attaching/detaching a USB drive.
I didn't see any of this with FreeBSD 7.1, probably because automounting
was broken or disabled there.
I see several problems here.
1) the GNOME authentication dialog gives you no clue what it's trying to
mount (when I saw it, I guessed it was GNOME's automounting wanting to
play with the md device), and no clue that its caller will apply the
authorization on six other mounts it has pending.
2) the devices in /dev/ufsid/ are associated with partitions on the adN
drives, not for the RAID they're assembled into (not sure whether ata or
ataraid or geom/glabel is responsible for this). I only see devices for
one of the drives, but I think this is because the mirrored filesystems
have the same UFS IDs on each drive and duplicates get
3) adN devices that are in an ATA raid are still visible in /dev and
4) GNOME isn't aware of any of this (should it be, or should the issue
be handled in devfs & GEOM?)
5) There doesn't seem to be any tool to check or repair an ataraid mirror.
For the moment, I've got the authentication disabled so the problem
doesn't arise. If anyone wants to look at this, I'll be happy to help,
otherwise I'll look at ataraid when I get a chance.
More information about the freebsd-current