`<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I believe most of you are correct. Just because I failover the
data, I have not actually failed over the NFS state and therefore my
setup will not work as intended.<br>
<br>
That being said, what are other people using in production for
transparent failover using NFS?<br>
<br>
I have heard of RSF-1, but I was looking to homebrew this.<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/8/2013 3:54 PM, Richard Elling
wrote:<br>
</div>
<blockquote
cite="mid:3BA1C366-1A6B-448B-B299-9264183B9997@RichardElling.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Comment below...
<div><br>
<div>
<div>On Nov 8, 2013, at 8:17 AM, Matt Weiss <<a
moz-do-not-send="true" 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 moz-do-not-send="true"
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 moz-do-not-send="true"
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
moz-do-not-send="true"
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>
</blockquote>
<br>
</body>
</html>
`