From owner-freebsd-fs@freebsd.org Wed Aug 17 10:05:23 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05C67BBDC85 for ; Wed, 17 Aug 2016 10:05:23 +0000 (UTC) (envelope-from julien@perdition.city) Received: from relay-b02.edpnet.be (relay-b02.edpnet.be [212.71.1.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "edpnet.email", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A051015BA for ; Wed, 17 Aug 2016 10:05:22 +0000 (UTC) (envelope-from julien@perdition.city) X-ASG-Debug-ID: 1471427542-0a7b8d2a6d1db9eb0001-3nHGF7 Received: from mordor.lan (213.219.167.114.bro01.dyn.edpnet.net [213.219.167.114]) by relay-b02.edpnet.be with ESMTP id rmxDiDGxUMqjvQIQ (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Aug 2016 11:52:24 +0200 (CEST) X-Barracuda-Envelope-From: julien@perdition.city X-Barracuda-Effective-Source-IP: 213.219.167.114.bro01.dyn.edpnet.net[213.219.167.114] X-Barracuda-Apparent-Source-IP: 213.219.167.114 Date: Wed, 17 Aug 2016 11:52:22 +0200 From: Julien Cigar To: InterNetX - Juergen Gotteswinter Cc: Borja Marcos , freebsd-fs@freebsd.org Subject: Re: HAST + ZFS + NFS + CARP Message-ID: <20160817095222.GG22506@mordor.lan> X-ASG-Orig-Subj: Re: HAST + ZFS + NFS + CARP References: <61283600-A41A-4A8A-92F9-7FAFF54DD175@ixsystems.com> <20160704183643.GI41276@mordor.lan> <20160704193131.GJ41276@mordor.lan> <20160811091016.GI70364@mordor.lan> <1AA52221-9B04-4CF6-97A3-D2C2B330B7F9@sarenet.es> <472bc879-977f-8c4c-c91a-84cc61efcd86@internetx.com> <20160817085413.GE22506@mordor.lan> <465bdec5-45b7-8a1d-d580-329ab6d4881b@internetx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="I3tAPq1Rm2pUxvsp" Content-Disposition: inline In-Reply-To: <465bdec5-45b7-8a1d-d580-329ab6d4881b@internetx.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Barracuda-Connect: 213.219.167.114.bro01.dyn.edpnet.net[213.219.167.114] X-Barracuda-Start-Time: 1471427543 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://212.71.1.222:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 5396 X-Virus-Scanned: by bsmtpd at edpnet.be X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.0100 X-Barracuda-Spam-Score: 0.01 X-Barracuda-Spam-Status: No, SCORE=0.01 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32085 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 10:05:23 -0000 --I3tAPq1Rm2pUxvsp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 17, 2016 at 11:05:46AM +0200, InterNetX - Juergen Gotteswinter = wrote: >=20 >=20 > Am 17.08.2016 um 10:54 schrieb Julien Cigar: > > On Wed, Aug 17, 2016 at 09:25:30AM +0200, InterNetX - Juergen Gotteswin= ter wrote: > >> > >> > >> Am 11.08.2016 um 11:24 schrieb Borja Marcos: > >>> > >>>> On 11 Aug 2016, at 11:10, Julien Cigar wrote: > >>>> > >>>> As I said in a previous post I tested the zfs send/receive approach = (with > >>>> zrep) and it works (more or less) perfectly.. so I concur in all wha= t you > >>>> said, especially about off-site replicate and synchronous replicatio= n. > >>>> > >>>> Out of curiosity I'm also testing a ZFS + iSCSI + CARP at the moment= ,=20 > >>>> I'm in the early tests, haven't done any heavy writes yet, but ATM i= t=20 > >>>> works as expected, I havent' managed to corrupt the zpool. > >>> > >>> I must be too old school, but I don=E2=80=99t quite like the idea of = using an essentially unreliable transport > >>> (Ethernet) for low-level filesystem operations. > >>> > >>> In case something went wrong, that approach could risk corrupting a p= ool. Although, frankly, > >>> ZFS is extremely resilient. One of mine even survived a SAS HBA probl= em that caused some > >>> silent corruption. > >> > >> try dual split import :D i mean, zpool -f import on 2 machines hooked = up > >> to the same disk chassis. > >=20 > > Yes this is the first thing on the list to avoid .. :) > >=20 > > I'm still busy to test the whole setup here, including the=20 > > MASTER -> BACKUP failover script (CARP), but I think you can prevent > > that thanks to: > >=20 > > - As long as ctld is running on the BACKUP the disks are locked=20 > > and you can't import the pool (even with -f) for ex (filer2 is the > > BACKUP): > > https://gist.github.com/silenius/f9536e081d473ba4fddd50f59c56b58f > >=20 > > - The shared pool should not be mounted at boot, and you should ensure > > that the failover script is not executed during boot time too: this is > > to handle the case wherein both machines turn off and/or re-ignite at > > the same time. Indeed, the CARP interface can "flip" it's status if both > > machines are powered on at the same time, for ex: > > https://gist.github.com/silenius/344c3e998a1889f988fdfc3ceba57aaf and > > you will have a split-brain scenario > >=20 > > - Sometimes you'll need to reboot the MASTER for some $reasons > > (freebsd-update, etc) and the MASTER -> BACKUP switch should not > > happen, this can be handled with a trigger file or something like that > >=20 > > - I've still have to check if the order is OK, but I think that as long > > as you shutdown the replication interface and that you adapt the > > advskew (including the config file) of the CARP interface before the=20 > > zpool import -f in the failover script you can be relatively confident= =20 > > that nothing will be written on the iSCSI targets > >=20 > > - A zpool scrub should be run at regular intervals > >=20 > > This is my MASTER -> BACKUP CARP script ATM > > https://gist.github.com/silenius/7f6ee8030eb6b923affb655a259bfef7 > >=20 > > Julien > >=20 >=20 > 100=E2=82=AC question without detailed looking at that script. yes from a= first > view its super simple, but: why are solutions like rsf-1 such more > powerful / featurerich. Theres a reason for, which is that they try to > cover every possible situation (which makes more than sense for this). I've never used "rsf-1" so I can't say much more about it, but I have=20 no doubts about it's ability to handle "complex situations", where=20 multiple nodes / networks are involved. >=20 > That script works for sure, within very limited cases imho >=20 > >> > >> kaboom, really ugly kaboom. thats what is very likely to happen sooner > >> or later especially when it comes to homegrown automatism solutions. > >> even the commercial parts where much more time/work goes into such > >> solutions fail in a regular manner > >> > >>> > >>> The advantage of ZFS send/receive of datasets is, however, that you c= an consider it > >>> essentially atomic. A transport corruption should not cause trouble (= apart from a failed > >>> "zfs receive") and with snapshot retention you can even roll back. Yo= u can=E2=80=99t roll back > >>> zpool replications :) > >>> > >>> ZFS receive does a lot of sanity checks as well. As long as your zfs = receive doesn=E2=80=99t involve a rollback > >>> to the latest snapshot, it won=E2=80=99t destroy anything by mistake.= Just make sure that your replica datasets > >>> aren=E2=80=99t mounted and zfs receive won=E2=80=99t complain. > >>> > >>> > >>> Cheers, > >>> > >>> > >>> > >>> > >>> Borja. > >>> > >>> > >>> > >>> _______________________________________________ > >>> freebsd-fs@freebsd.org mailing list > >>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > >>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > >>> > >> _______________________________________________ > >> freebsd-fs@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > >=20 --=20 Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --I3tAPq1Rm2pUxvsp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXtDPSAAoJELK7NxCiBCPAQWQP/RBRHxh6kwjEjfVRPQd3y9ky omHqCV+ej068aB0J0D44wXdFKYWrIPNX28Mfg5muaIWZvRmwUH2zLKNgxLFKpzNS y8XyY0SktMzsBYZVHicu6US/l+5+BTfNes2HTdB0592etvtPuSW/E6xZCwwe4mga XZmc4vNByAViWqnH6+B7cQTviLx3K8ZQU2JRZMrrkLKOqjoOH5K6xrc4rq67jU0z j9t2kQ90X8cdMEMdWuz8o4NCZtM3T70sjswHPvd/8GwBKdsVlJlQuhQNECIPYsGz bvh4t37HK3SkL2k91JgPysWdqNxoUuF8Q4wg91Vn+0riWvdVxyJpWODu+y1qLXk9 eUNYU/bWAXz2iPuKw41JwclvQfFhG5+ND1Q9WyqR3I5QMxZub5T/64mgRNu2wTZ+ bXeKgjq6bhM55L2GzHyl5LGZOkxWK+HTpgBuPATE27Ya0Ass3EEB86aXBsylkMqD dnNfht3QAv1xKsXzteoaiJ2t0Hcyzu2vqdScE9oJY8/k8aiHl9JXMoCo932MogYU mZGkydJrT2BxqvAbSo83e+fg+IwVLsiKU1zFATTztT9fIXlYmlAjMaoC4h9yrYBb pMo5X8ThyY8wduglq7V+zikRWWBohRn/jInDMKRWsExzAQvFAFyWyHafxOxMk8E2 bwPvxdjqwagH4b1S7a5D =bUas -----END PGP SIGNATURE----- --I3tAPq1Rm2pUxvsp--