<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Comment below...<div><br><div><div>On Nov 8, 2013, at 8:17 AM, Matt Weiss <<a href="mailto:mweiss@cimlbr.com">mweiss@cimlbr.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I am working on a failover script using OmniOS as a NFS server.<br><br>According to VMware, if I mount and nfs datastore via its IP Address then I should be able to move the IP around and still mount it, however it is not working right.<br><br>For example:<br><br>On an ESXi instance (5.1U1) I mount the following NFS Datastore<br>172.16.50.100<br>/tank/vmrep<br>which amounts to a UUID of 6c0c1d0d-928ef591 in /vmfs/volumes<br><br><br>omni-rep1: 172.16.50.1<br>omni-rep2: 172.16.50.2<br><br>I am using zrep to failover my zfs dataset.<br><a href="http://www.bolthole.com/solaris/zrep/zrep.documentation.html">http://www.bolthole.com/solaris/zrep/zrep.documentation.html</a><br><br>Essential, it puts primary into read-only, does a zfs send/receive, then sets the secondary to rw.<br><br><br>To expose my dataset (tank/vmrep) I am using sharenfs property of zfs. I have created a virtual ip to use for this purpose.<br><br>#setnfsip.sh<br>ipadm create-addr -T static -a 172.16.50.100/24 vmxnet3s0/nfs<br><br>#removenfsip.sh<br>ipadm delete-addr vmxnet3s0/nfs<br><br><br>So, when I want to failover, I just do the following:<br><br>#!/bin/sh<br>#zfs unshare tank/vmrep<br>#sleep 5<br>/scripts/removenfsip.sh<br>sync<br>sleep 5<br>#zrep sync tank/vmrep<br>#sleep 5<br>#the following does the zfs snapshot/send/receive<br>zrep failover tank/vmrep<br>sleep 5<br>#ssh 172.16.50.2 /usr/sbin/zfs share tank/vmrep<br>#sleep 5<br>ssh 172.16.50.2 /scripts/setnfsip.sh<br><br><br>So, all goes well, omni-rep2 is now exporting tank/vmrep with NFS, it has the 172.16.50.100 ip address, it is the exact replica of omni-rep1.<br></blockquote><div><br></div><div>It is a replica, but it isn't the same from an NFS perspective. The files may have the</div><div>same contents, but the NFSv3 file handles are different because they are in two different</div><div>file systems.  For this to work, the clients would have to remount, which blows your</div><div>requirement for transparency.</div><br><blockquote type="cite"><br>The problem is in ESXi the datastore goes inaccessable.  I can fail back and the datastore comes back online like fine.  I can mount the nfs datastore as a new one with the .100 ip on omni-rep2 so it is being exported properly.<br></blockquote><div><br></div><div>Yes, works as designed.</div><br><blockquote type="cite"><br>According to the last paragraph of this<br><br><a href="https://communities.netapp.com/community/netapp-blogs/getvirtical/blog/2011/09/28/nfs-datastore-uuids-how-they-work-and-what-changed-in-vsphere-5">https://communities.netapp.com/community/netapp-blogs/getvirtical/blog/2011/09/28/nfs-datastore-uuids-how-they-work-and-what-changed-in-vsphere-5</a><br><br>It should work, I have merely changed which host is broadcasting my datastore's IP address.<br><br>I know a guy named saso? did some iScsi failover recently and noted it worked with NFS.  I am just wondering what I am missing here.<br></blockquote><div><br></div><div>Saso's solution, and indeed most failover cluster solutions, use shared storage and not</div><div>ZFS replication between the nodes. One good reason to do this is so you can transparently</div><div>failover NFS service.</div><div><br></div><div>NB, the replication method is used often for disaster recovery, because in DR there often is</div><div>no transparent failover requirement.</div><div> -- richard</div></div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">--</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><a href="mailto:Richard.Elling@RichardElling.com">Richard.Elling@RichardElling.com</a><br>+1-760-896-4422<br><br><br></div></span></div></span></div></span></div></span></div>
</div>
<br></div></body></html>