Date: Fri, 18 Oct 2002 14:34:31 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Mike Thompson <mike@atomz.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Multiple FreeBSD SCSI Hosts Message-ID: <20021018193431.GC38243@dan.emsphone.com> In-Reply-To: <4.3.2.7.2.20021018114625.00c974a0@pop.atomz.com> References: <4.3.2.7.2.20021018114625.00c974a0@pop.atomz.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 18), Mike Thompson said: > I'm interested in setting up two FreeBSD systems in a very simple > clustering type configuration around centralized external SCSI > storage devices for hardware redundancy. The specific configuration > I'm thinking about is shown in the simple diagram below: > > +-----------+ +----------+ +-----------+ > | FreeBSD | | | | FreeBSD | > | Host 1 | | External | | Host 2 | > | (primary) | | SCSI | |(secondary)| > | | |RAID/DRIVE| | | > | SCSI r/w | | | | SCSI r/o | > +-----+-----+ +---+--+---+ +-----+-----+ > | | | | > +---------------+ +---------------+ Whoa. Deja vu here. http://groups.google.com/groups?threadm=Pine.LNX.4.44.0210101808560.3631-100000@scribble.fsn.hu Your primary problem is that the disk cache on Host2 does not know about changes made to the filesystem by Host1. > 1. Do the FreeBSD SCSI drivers support such a configuration by > implementing the SCSI RESERVE/RELEASE commands to lock access to the > SCSI bus? If so, which drivers for which specific SCSI adapters? Reserve/release looks like it is implemented for tape devices on open(), but not for disks (since it's legal to mount slice 1 on machine A but slice 2 on machine B, for example). Reserve/release is probably not useful in this situation anyway, as I don't know how easy it is to break a reservation (when host1 goes down, host2 has to break the reservation before it can acces the disk). > 2. Many external raid controllers describe themselves as host dual > capability. Is the type of configuration they are describing? Possibly. Most of the time it's to allow multiple hosts to access their own private storage, but you can usually force a volume to be visible on multiple ports. > 3. Will the secondary server still experience a corrupted file system > because of write caching by the primary server? If so, would it be > possible to configure the primary server to write through the cache? Big time. The problem is not so much write caching on the primary, it's read caching on the secondary. Without a shared-storage filesystem, you're pretty much limited to NFS mounts (which are not all that bad). As for failover detection, one good way is to dedicate a small partition (da0s1a, for example) as a heartbeat partition. Host 1 writes a timestamp to /dev/da0s1a block 1 every second, Host 2 does the same thing on block 2. Each host then reads the other host's block, and if there are no updates for (say) 10 seconds, you can assume that the other host is dead, do a fsck, and mount the volume. Using the raw disk device bypasses any caches on the systems. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021018193431.GC38243>