From owner-freebsd-fs@FreeBSD.ORG Tue Jul 24 00:40:47 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 3A238106567A; Tue, 24 Jul 2012 00:40:47 +0000 (UTC) Date: Tue, 24 Jul 2012 00:40:47 +0000 From: John To: freebsd-fs@freebsd.org Message-ID: <20120724004047.GA62435@FreeBSD.org> References: <7FE7A5F3-53FF-4508-A3D6-562E8FA9764D@nipsi.de> <20120720123255.GA56250@FreeBSD.org> <20120721023537.GB19321@in-addr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120721023537.GB19321@in-addr.com> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: ISCSI on zvols with two maschines. What needs to be done? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 00:40:47 -0000 ----- Gary Palmer's Original Message ----- > > > ----- dennis berger's Original Message ----- > > >> Hi folks, > > >> > > >> The following question often comes to me, when I speak to my customers. > > >> > > >> Is it possible to attach two systems to the same storage array using shared SAS and use istgt + zfs to provide > > >> a reliable ISCSI target. This could be active/passive or later active/active. In case it's not possible, what needs to be done? > > >> > > >> The questions that came into my mind. > > >> > > >> Can I connect two freebsd to the storage and boot them up? Just that both systems would see the physical devices. > > > > > > Yes, please see: > > > > > > http://people.freebsd.org/~jwd/zfsnfsserver.jpg > > > > This is exactly how I would like to use it. > > --- > > Do I need to zfs import?! > > This is the key bit. What John suggests is that on system A you have > poolA and on system B you have pool B. Both pools have their own, > separate, disks. > > If system A goes down, system B notices this and imports poolA and shares > out its iSCSI devices. > > You have to be careful when system A comes back up that it doesn't > auto-import the pool and negotiates with system B to get it back > > It may be easier to think of a situation where there is only 1 pool. > In this situation, the two servers will be in active/passive mode, > and the passive system will only ever take load if the active node > goes down. > > The important thing to remember is NO filesystem which is included with > FreeBSD by default is cluster aware. This means that two servers > CANNOT both mount filesystems on direct-attached storage without > corrupting the data on the storage. The best you can get active/passive > right now, where only 1 server mounts the filesystem at a time and > the second server takes over in event of failure of the primary server. > > In this instance consider ZFS, even at the zpool layer, to be a > filesystem. Mounting the same zpool from shared storage on two servers > at the same time will almost certainly lead to corruption and probably a > restore from backup tapes. > > Gary What Gary wrote about my comments is correct. Even with ZFS you'll end up in trouble if you zpool import -f on both systems A & B. However, if the OP wanted to do without ZFS or any other file or volume management mechanism, individual drives could be exported by istgt on both systems A & B. Given systems A & B, hooked up with SAS interfaces to the shelves, da0 is the same disk on both A & B, then an instance of istgt could be run on both A & B exporting the same drive. The above leaves all filesystem layer responsibility to the initiator who wants to mount the target (whether single or dual pathed). YMMV, John