From owner-freebsd-fs@freebsd.org Wed Aug 17 16:55:32 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 4A0F1BBD5C1 for ; Wed, 17 Aug 2016 16:55:32 +0000 (UTC) (envelope-from bsdunix44@gmail.com) Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 134711583 for ; Wed, 17 Aug 2016 16:55:32 +0000 (UTC) (envelope-from bsdunix44@gmail.com) Received: by mail-pf0-x22f.google.com with SMTP id x72so39167264pfd.2 for ; Wed, 17 Aug 2016 09:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :message-id:cc:from:subject:date:to; bh=xE4l3qDTiVBBpnuU2Ob3pRGs/CtQZQjzm8vKAY1p06U=; b=z4OTC7Ly3fCMDuOjEHpc9Cig/nogUrIXGgi3hQ41Lyptz1M6e54h3LT7md/vRPsfkP a68UZky+rNWcPEFmyXzettoZwmgSSrOe/0U9wQi/B2UWo5cYF9rI870ynSPxbF/2urmP e0eyAcizx58wfw/qdW049pB3Wn5B2ilC3pcxI6uqgl6Ftd03ELlDIrKLhtDD+CVE2La7 ZaByEor91+XNvlxYf2wBvj7N7iyFONJKvCpSGP+C1ojGV0dNFAsHEAzkRkkodSSuYrpQ 3WLskiVc6jV9Mtc+1R2gz6uVP3LVIgkq+HsXzJHH7J8YAHygqgGJhdG9AvNnKidbHhlB GByw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:in-reply-to:mime-version :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=xE4l3qDTiVBBpnuU2Ob3pRGs/CtQZQjzm8vKAY1p06U=; b=hKgujPjfDZ0Qd665Ire/ugtEoD6HiCYUxNyNT/KQjFUaEK9MP5cn7YtG2x3XgPx8D3 Dli3P1+zk4W895BUdiKG8lXd0PeSVYR/RLuSCC3tfO1ZHnul7bhjyOFs9PsTjeq4E1pu 3Qx9grrci1IhlGKZLSQafuqg5U9f94lBE23xjS6jL2r+e1eWec360Pdi8mGvfE1qjEK3 LZV8biCM/Ll2eO5H7Q8LiMihZ+XEacwUDTWN5agNiGqnCV5nzxAdWQ6kGkEn5se6/4me dmBAGge7zFTheBkuJHDsAERw7VRi6E8rbhFYtKerADWWhAyTMX+BmmqzcwNCEs0RJOzw NT1A== X-Gm-Message-State: AEkoousl3AcukQv28quFXrYiJzK3oRSy8W7JbXT9P227jJ6m3xtxVbZiC5Q4sXk/XAD9zA== X-Received: by 10.98.147.14 with SMTP id b14mr24930241pfe.103.1471452931348; Wed, 17 Aug 2016 09:55:31 -0700 (PDT) Received: from [192.168.0.10] (cpe-70-118-225-173.kc.res.rr.com. [70.118.225.173]) by smtp.gmail.com with ESMTPSA id n10sm11441pap.16.2016.08.17.09.55.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Aug 2016 09:55:30 -0700 (PDT) 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> <20160817095222.GG22506@mordor.lan> <52d5b687-1351-9ec5-7b67-bfa0be1c8415@kateley.com> In-Reply-To: <52d5b687-1351-9ec5-7b67-bfa0be1c8415@kateley.com> Mime-Version: 1.0 (1.0) Message-Id: <92F4BE3D-E4C1-4E5C-B631-D8F124988A83@gmail.com> Cc: freebsd-fs@freebsd.org X-Mailer: iPhone Mail (14A5341a) From: Chris Watson Subject: Re: HAST + ZFS + NFS + CARP Date: Wed, 17 Aug 2016 11:55:27 -0500 To: linda@kateley.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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 16:55:32 -0000 Of course, if you are willing to accept some amount of data loss that opens u= p a lot more options. :) Some may find that acceptable though. Like turning off fsync with PostgreSQL= to get much higher throughput. As little no as you are made *very* aware of= the risks.=20 It's good to have input in this thread from one with more experience with RS= F-1 than the rest of us. You confirm what others have that said about RSF-1,= that it's stable and works well. What were you deploying it on? Chris Sent from my iPhone 5 > On Aug 17, 2016, at 11:18 AM, Linda Kateley wrote: >=20 > The question I always ask, as an architect, is "can you lose 1 minute wort= h of data?" If you can, then batched replication is perfect. If you can't.. t= hen HA. Every place I have positioned it, rsf-1 has worked extremely well. I= f i remember right, it works at the dmu. I would suggest try it. They have b= een trying to have a full freebsd solution, I have several customers running= it well. >=20 > linda >=20 >=20 >> On 8/17/16 4:52 AM, Julien Cigar wrote: >>> On Wed, Aug 17, 2016 at 11:05:46AM +0200, InterNetX - Juergen Gotteswint= er wrote: >>>=20 >>>> Am 17.08.2016 um 10:54 schrieb Julien Cigar: >>>>> On Wed, Aug 17, 2016 at 09:25:30AM +0200, InterNetX - Juergen Gotteswi= nter wrote: >>>>>=20 >>>>> Am 11.08.2016 um 11:24 schrieb Borja Marcos: >>>>>>> On 11 Aug 2016, at 11:10, Julien Cigar wrote= : >>>>>>>=20 >>>>>>> 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. >>>>>>>=20 >>>>>>> Out of curiosity I'm also testing a ZFS + iSCSI + CARP at the moment= , >>>>>>> I'm in the early tests, haven't done any heavy writes yet, but ATM i= t >>>>>>> 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 u= sing an essentially unreliable transport >>>>>> (Ethernet) for low-level filesystem operations. >>>>>>=20 >>>>>> 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 u= p >>>>> to the same disk chassis. >>>> Yes this is the first thing on the list to avoid .. :) >>>>=20 >>>> I'm still busy to test the whole setup here, including the >>>> 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 >>>> 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 bot= h >>>> 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 >>>> zpool import -f in the failover script you can be relatively confident >>>> 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 >>> 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 >> no doubts about it's ability to handle "complex situations", where >> 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 >>>>>=20 >>>>>> 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 :) >>>>>>=20 >>>>>> ZFS receive does a lot of sanity checks as well. As long as your zfs r= eceive 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. >>>>>>=20 >>>>>>=20 >>>>>> Cheers, >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> Borja. >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> _______________________________________________ >>>>>> 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 >>>>> _______________________________________________ >>>>> 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 > _______________________________________________ > 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"