Multiple FreeBSD SCSI Hosts

Jukka A. Ukkonen jau at oxit.fi
Sun Feb 3 17:12:36 UTC 2013


Hello all,

I have been browsing through these old messages about the
SCSI RESERVE/RELEASE operations in FreeBSD.

What nobody seems to have quite realized at the time is that
a multiply attached SCSI device can be used as the trusted
3rd party for a "cluster group" or for anything which should
be active only at one node at any particular time.
E.g. Solaris cluster groups do exactly that. If one node gets
the reservation through, no other node will until the first
successful one either releases the device or crashes.
The reserved LUN can be either an otherwise unused small
storage unit or one that is going to be anyhow mounted and
unmounted as the cluster group dictates.
The same method would work also for selecting the leader
among Shared QFS metadata servers and for other similar
purposes.

The reservation should definitely not be only bundled inside
the mount operations. Instead it should be possible to trigger
reserve and release through ioctl() or through a separate
system call. This is because sometimes the feature might be
used for unmounted raw devices or for devices which could
be logically mounted to multiple systems while anyhow busy
for all other systems but one.
E.g. something in the style of Shared QFS could use a SCSI
reservation to its metadata volumes, which need not visible
to the users as separate file systems at all.

Anyhow I could see seriously more use for this particular
SCSI feature than just locking a mounted tape drive were
it implemented for other devices than sa only and somehow
exported to the user space. Obviously it should be available
for root only, though.

Cheers,
--jau



More information about the freebsd-scsi mailing list