Excellent how to Dr.<br>Can you add this to the Fedora wiki?<br><br><div class="gmail_quote">2011/8/25 Dr. Michael J. Chudobiak <span dir="ltr">&lt;<a href="mailto:mjc@avtechpulse.com">mjc@avtechpulse.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">As detailed in another thread, we upgraded a few test machines on our<br>
LAN to Fedora 15 (with gnome-shell and firefox), with user folders<br>
served from a NFSv4 server (F14 originally, then F15).<br>
<br>
It just didn&#39;t work. The F15 desktops would freeze frequently. And<br>
worse, this would freeze ALL desktops on the LAN intermittently, as the<br>
NFS server struggled with client flakiness.<br>
<br>
When it did work, Firefox would lose authenticated logins randomly,<br>
presumably due to corruption of its cookies.sqlite file. sqlite and NFS<br>
seems to be a nightmare, for both NFSv3 and NFSv4.<br>
<br>
Moving from a NFSv4 server to a glusterfs server solved all of these<br>
problems, and sped up boot times significantly too. glusterfs looks<br>
intimidating at first, because of all its fancy replicating features and<br>
what-not, but it turns out to be trivially easy to set up a simple<br>
server than will replace 95% of the NFS installations out there.<br>
<br>
Luckily, you can easily point both the NFS daemon and the glusterfs<br>
daemon at the same export folder, so you can migrate clients slowly over<br>
time.<br>
<br>
This HOW-TO is intended to document the process. There are other similar<br>
HOW-TOs out there, but they are all a little out-of-date or don&#39;t show<br>
how to enable locking correctly, which is critical for Firefox.<br>
<br>
In this example, we export the server&#39;s /fileserver folder, and mount it<br>
on /fileserver on the clients. In my server, /fileserver was already<br>
being served by the NFSv4 server, which is fine.<br>
<br>
--------------------------------------------<br>
1. On the server:<br>
- yum install glusterfs-server<br>
<br>
--------------------------------------------<br>
2. On each client:<br>
- yum install glusterfs-fuse<br>
- mkdir /etc/glusterfs/<br>
- mkdir /fileserver<br>
<br>
--------------------------------------------<br>
3. On the server, edit the volume configuration file<br>
(/etc/glusterfs/glusterfsd.vol) so that it looks like this:<br>
<br>
volume raw<br>
   type storage/posix<br>
   option directory /fileserver<br>
end-volume<br>
<br>
volume brick<br>
   type features/posix-locks<br>
   subvolumes raw<br>
end-volume<br>
<br>
volume server<br>
   type protocol/server<br>
   option transport-type tcp<br>
   subvolumes brick<br>
   option auth.addr.brick.allow *<br>
end-volume<br>
<br>
<br>
The first stanza selects the basic folder to export.<br>
<br>
The second stanza adds file locking to it. This is required to support<br>
Firefox, and some other applications.<br>
<br>
The third stanza authorizes everyone to access this file-locked export<br>
over the network.<br>
<br>
There is also a /etc/glusterfs/glusterfsd.vol file on the system, for<br>
configuring the management interface. For this simple installation it<br>
does not need to be modified.<br>
<br>
--------------------------------------------<br>
4. Restart the server services:<br>
- service glusterd restart<br>
- service glusterfsd restart<br>
<br>
I believe the first service is a management service, and the second is<br>
the actual file-export service.<br>
--------------------------------------------<br>
<br>
--------------------------------------------<br>
5. On the client, create the /etc/glusterfs/glusterfs.vol configuration<br>
file, which should look like this:<br>
<br>
volume client<br>
   type protocol/client<br>
   option transport-type tcp<br>
   option remote-host 192.168.0.3  # use YOUR server IP here<br>
   option remote-subvolume brick<br>
end-volume<br>
<br>
<br>
--------------------------------------------<br>
6. On the client, add this line to the end of /etc/rc.d/rc.local:<br>
<br>
mount -t glusterfs /etc/glusterfs/glusterfs.vol /fileserver<br>
<br>
--------------------------------------------<br>
7. On the client, reboot, and check /var/log/messages for errors. On one<br>
machine, we had an selinux problem that was flagged in the logs. We had<br>
to manually create the logging file using:<br>
<br>
touch /var/log/glusterfs/fileserver.log; reboot<br>
<br>
--------------------------------------------<br>
8. On the client, see if you can access the files in /fileserver. If<br>
not, read the /var/log/glusterfs/* files on both the client and the server.<br>
<br>
At this point, everything should work!<br>
<br>
<br>
<br>
Weird things and gotchas:<br>
<br>
A. You need the file-locking option to make Firefox work properly.<br>
<br>
B. LibreOffice wouldn&#39;t start on one system, until we did:<br>
rm ~/.libreoffice<br>
rm ~/.<a href="http://openoffice.org" target="_blank">openoffice.org</a><br>
<br>
C. selinux prevented the creation of log files on one client, which<br>
prevented the filesystem from mouting. The manual fix noted above fixed<br>
that.<br>
<br>
D. This HOWTO mounts the glusterfs from /etc/rc.d/rc.local, which is the<br>
last step in the boot process. In theory, you can mount it from<br>
/etc/fstab or using autofs. However, we found that autofs mounting just<br>
didn&#39;t work - not sure why. fstab mounting didn&#39;t work either - I<br>
suspect it occurred too early in the boot process. /etc needs to be up<br>
and running so glusterfs can read the config file, and I don&#39;t think the<br>
current init/systemd files handle this correctly. There are some Debian<br>
bug reports about this that you can google.<br>
<br>
<br>
I hope this is useful to someone, and that we can finally drive a stake<br>
through the heart of NFS...<br>
<br>
<br>
- Mike<br>
<font color="#888888">--<br>
users mailing list<br>
<a href="mailto:users@lists.fedoraproject.org">users@lists.fedoraproject.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/users" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/users</a><br>
Guidelines: <a href="http://fedoraproject.org/wiki/Mailing_list_guidelines" target="_blank">http://fedoraproject.org/wiki/Mailing_list_guidelines</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-- <br>Marcos Luis Ortíz Valmaseda<br> Software Engineer (UCI)<br> Linux User # 418229<br> <a href="http://marcosluis2186.posterous.com">http://marcosluis2186.posterous.com</a><br>
 <a href="http://www.linkedin.com/in/marcosluis2186">http://www.linkedin.com/in/marcosluis2186</a><br> <a href="https://fedoraproject.org/wiki/User:Marcosluis">https://fedoraproject.org/wiki/User:Marcosluis</a><br><br>