HAST + ZFS + NFS + CARP

Ben RUBSON ben.rubson at gmail.com
Mon Jul 4 05:56:32 UTC 2016


> On 03 Jul 2016, at 23:47, Julien Cigar <julien at perdition.city> wrote:
> 
> On Sun, Jul 03, 2016 at 09:29:46PM +0200, Julien Cigar wrote:
>> On Sat, Jul 02, 2016 at 05:04:22PM +0200, Ben RUBSON wrote:
>>> 
>>>> On 30 Jun 2016, at 20:57, Julien Cigar <julien at perdition.city> wrote:
>>>> 
>>>> On Thu, Jun 30, 2016 at 11:32:17AM -0500, Chris Watson wrote:
>>>>> 
>>>>> 
>>>>> Sent from my iPhone 5
>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> Yes that's another option, so a zpool with two mirrors (local + 
>>>>>>> exported iSCSI) ?
>>>>>> 
>>>>>> Yes, you would then have a real time replication solution (as HAST), compared to ZFS send/receive which is not.
>>>>>> Depends on what you need :)
>>>>>> 
>>>>>>> 
>>>>>>>> ZFS would then know as soon as a disk is failing.
>>>>> 
>>>>> So as an aside, but related, for those watching this from the peanut gallery and for the benefit of the OP perhaps those that run with this setup might give some best practices and tips here in this thread on making this a good reliable setup. I can see someone reading this thread and tossing two crappy Ethernet cards in a box and then complaining it doesn't work well. 
>>>> 
>>>> It would be more than welcome indeed..! I have the feeling that HAST
>>>> isn't that much used (but maybe I am wrong) and it's difficult to find 
>>>> informations on it's reliability and concrete long-term use cases...
>>>> 
>>>> Also the pros vs cons of HAST vs iSCSI
>>> 
>>> I made further testing today.
>>> 
>>> # serverA, serverB :
>>> kern.iscsi.ping_timeout=5
>>> kern.iscsi.iscsid_timeout=5
>>> kern.iscsi.login_timeout=5
>>> kern.iscsi.fail_on_disconnection=1
>>> 
>>> # Preparation :
>>> - serverB : let's make 2 iSCSI targets : rem3, rem4.
>>> - serverB : let's start ctld.
>>> - serverA : let's create a mirror pool made of 4 disks : loc1, loc2, rem3, rem4.
>>> - serverA : pool is healthy.
>>> 
>>> # Test 1 :
>>> - serverA : put a lot of data into the pool ;
>>> - serverB : stop ctld ;
>>> - serverA : put a lot of data into the pool ;
>>> - serverB : start ctld ;
>>> - serverA : make all pool disks online : it works, pool is healthy.
>>> 
>>> # Test 2 :
>>> - serverA : put a lot of data into the pool ;
>>> - serverA : export the pool ;
>>> - serverB : import the pool : it does not work, as ctld locks the disks ! Good news, nice protection (both servers won't be able to access the same disks at the same time).
>>> - serverB : stop ctld ;
>>> - serverB : import the pool : it works, 2 disks missing ;
>>> - serverA : let's make 2 iSCSI targets : rem1, rem2 ;
>>> - serverB : make all pool disks online : it works, pool is healthy.
>>> 
>>> # Test 3 :
>>> - serverA : put a lot of data into the pool ;
>>> - serverB : stop ctld ;
>>> - serverA : put a lot of data into the pool ;
>>> - serverB : import the pool : it works, 2 disks missing ;
>>> - serverA : let's make 2 iSCSI targets : rem1, rem2 ;
>>> - serverB : make all pool disks online : it works, pool is healthy, but of course data written at step3 is lost.
>>> 
>>> # Test 4 :
>>> - serverA : put a lot of data into the pool ;
>>> - serverB : stop ctld ;
>>> - serverA : put a lot of data into the pool ;
>>> - serverA : export the pool ;
>>> - serverA : let's make 2 iSCSI targets : rem1, rem2 ;
>>> - serverB : import the pool : it works, pool is healthy, data written at step3 is here.
>>> 
>>> # Test 5 :
>>> - serverA : rsync a huge remote repo into the pool in the background ;
>>> - serverB : stop ctld ;
>>> - serverA : 2 disks missing, but rsync still runs flawlessly ;
>>> - serverB : start ctld ;
>>> - serverA : make all pool disks online : it works, pool is healthy.
>>> - serverB : ifconfig <replication_interface> down ;
>>> - serverA : 2 disks missing, but rsync still runs flawlessly ;
>>> - serverB : ifconfig <replication_interface> up ;
>>> - serverA : make all pool disks online : it works, pool is healthy.
>>> - serverB : power reset !
>>> - serverA : 2 disks missing, but rsync still runs flawlessly ;
>>> - serverB : let's wait for server to be up ;
>>> - serverA : make all pool disks online : it works, pool is healthy.
>>> 
>>> Quite happy with these tests actually :)
>> 
>> Thank you very much for thoses quick tests! I'll start my own ones
>> tomorrow, but based on your preliminary it *seems* that ZFS + iSCSI
>> combinaison could be a potential candidate for what I'd like to do..!
> 
> another question from a performance point of view, imagine that you 
> create a single mirror zpool, something like:
> $> zpool create storage mirror loc1 loc2 rem1 rem2
> 
> (where rem1 and rem2 are iSCSI disks)
> 
> I guess that ZFS will split the read requests accross all devices in
> order to maximize performance... which could lead to contrary to what is
> expecpted when iSCSI disks are involved, no?

Not necessarily no, if your network card is not a bottleneck.
If you only have 1Gbps adapters, forget this solution.
You should have at least 10Gbps adapters, and depending on how many disks you have, you would have to go with 25/40Gbps adapters...

> Is there some sysctl params which could prevent this unexpected
> behavior?
> 
>> 
>>> 
>>> Ben
>>> 
>>> _______________________________________________
>>> freebsd-fs at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
>>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>> 
>> -- 
>> 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.
> 
> 
> 
> -- 
> 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.



More information about the freebsd-fs mailing list