Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2012 00:40:47 +0000
From:      John <jwd@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   Re: ISCSI on zvols with two maschines. What needs to be done?
Message-ID:  <20120724004047.GA62435@FreeBSD.org>
In-Reply-To: <20120721023537.GB19321@in-addr.com>
References:  <7FE7A5F3-53FF-4508-A3D6-562E8FA9764D@nipsi.de> <20120720123255.GA56250@FreeBSD.org> <F17CCAC7-97A6-406A-B8A8-087AFC267368@nipsi.de> <20120721023537.GB19321@in-addr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----- 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120724004047.GA62435>