OOPS.<br>I missed the nfs layers set to nfs ro on this test session.<br>So I repeat the test sorry...<br><br><div><span class="gmail_quote">2007/7/16, Pásztor Lénárd Zoltán &lt;<a href="mailto:lenard.pasztor@gmail.com">lenard.pasztor@gmail.com
</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><span class="gmail_quote"></span><br><div><span class="q"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Lenard, what version of Unionfs have you been using?&nbsp;&nbsp;I assume by &quot;newest&quot;
<br>you mean something in which we added the mtime-based cache-coherency<br>support.&nbsp;&nbsp;Are you?&nbsp;&nbsp;All of our recent releases include that automatic<br>cache-coherency support.</blockquote></span><div><br>v2.0, 2.6.22.1-u1<br>
</div><span class="q">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>One possibility is that you mount unionfs on top of nfs mounts, and the nfs<br>mounts don&#39;t reflect server-side changes fast enough for you?&nbsp;&nbsp;This would be
<br>an NFS issue, since it caches attributes from the server onto the client,<br>and doesn&#39;t purge them frequently enough.&nbsp;&nbsp;In that case, I&#39;d recommend that<br>you mount all of your NFS mounts with &quot;-o noac&quot; (No Attribute Cache), or
<br>play with the four options ac{reg,dir}{min,max}.<br><br>In other words, if the lower file system doesn&#39;t see new objects&#39; data and<br>attributes (esp. mtime/ctime), then Unionfs, sitting above, cannot see them
<br>either -- thus you have to first make the lower file systems see the updated<br>file attributes.</blockquote></span><div><br>My test config:<br>2 nfs servers loadbalanced via LVS. Backend filesystem is ocfs2 on top of a drbd 
0.8. block device (primary/primary config)<br>This is for HA.<br><br>Clients have an initrd. Initrd mounts the root filesystem.<br>NFS related kernel command line opions:<br>nfsroot=10.0.3.2:/storage,soft,noac<br><br>#nfs root mounted by kernel internally at boot time (autoconfig):
<br>nfs:/storage /root nfs ro,sync,vers=3,rsize=8192,wsize=8192,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,nolock,proto=tcp,timeo=7,retrans=3,sec=sys,addr=<a href="http://10.0.3.2" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
10.0.3.2</a> 0 0<br><br># local storage for write support
<br>/dev/disk/by-label/local /union_local ext3 rw,data=ordered 0 0<br><br># &#39;new&#39; root filesystem by unionfs (mounted by initrd)<br>unionfs / unionfs rw,dirs=/union_local=rw:/root/layers/by-host/app1=ro:/root/layers/by-role/app=ro:/root/systems/current=ro 0 0
<br><br>There is only one nfs export ( /storage ), but the union branches has 3 nfs layer. This layers are in the same nfs mount&#39;s sub directories.<br><br>The nfs export (/storage) hierarchy:<br></div></div>/layers<br>

/layers/by-host/app1<br>/layers/by-host/app1/etc<br>/layers/by-host/app1/etc/hostname &quot;app1&quot;<br>/layers/by-role/app<br>
/layers/by-role/app/etc<br>
/layers/by-role/app/etc/hostname &quot;app&quot;<br>/systems<br>/systems/current/<br>/systems/current/bin<br>/systems/current/boot<br>/systems/current/dev<br>...<br>/systems/current/etc/hostname &quot;base-system&quot;<br>

...<br><br>For testing all layer has the /etc/hostname file.<br>The local storage is empty ext3 filesystem.<br>So, when the client boots it sets the hostname from by-host branch to &quot;app1&quot;.<br><br>(nfs)$cat /storage/layers/by-host/app1/etc/hostname
<br>app1<br><br>(client)$cat /etc/hostname<br>app1<br># from /storage/layers/by-host/app1/etc/hostname. It&#39;s ok.<br><br><br>(nfs)$echo &quot;xyz&quot; &gt; /storage/layers/by-host/app1/etc/hostname<br>(nfs)$cat /storage/layers/by-host/app1/etc/hostname
<br>xyz<br><br>(client)$cat /etc/hostname<br>app1<br># It not changed on client side. :(<br><br>(server)$rm /storage/layers/by-host/app1/etc/hostname<br># source deleted from by-host branch<br><br>(client)$cat /etc/hostname
<br>app<br># from /storage/layers/by-role/app/etc/hostname. It&#39;s ok.<br><br>(nfs)$echo &quot;xyz&quot; &gt; /storage/layers/by-host/app1/etc/hostname<br># the /storage/layers/by-host/app1/etc/hostname now exists<br><br>

(client)$cat /etc/hostname<br>app<br># client site not changed :(<br><br>(server)$rm /storage/layers/by-role/app/etc/hostname<br><br>(client)$cat /etc/hostname<br>
xyz<br># from /storage/layers/by-host/app1/etc/hostname. It&#39;s ok.<br><br><br clear="all"><br>-- <br>thx,<br><span class="sg"><br> Lénárd
</span></blockquote></div><br><br clear="all"><br>-- <br>üdv,<br><br> Lénárd