GPFS and both Samba and NFS
Hello, Since this is my first note to the group, I'll introduce myself first. I am Lindsay Todd, a Systems Programmer at Rensselaer Polytechnic Institute's Center for Computational Innovations, where I run a 1.2PiB GPFS cluster serving a Blue Gene/Q and a variety of Opteron and Intel clients, run an IBM Watson, and serve as an adjunct faculty. I also do some freelance consulting, including GPFS, for several customers. One of my customers is needing to serve GPFS storage through both NFS and Samba; they have GPFS 3.5 running on RHEL5 (not RHEL6) servers. I did not set this up for them, but was called to help fix it. Currently they export NFS using cNFS; I think we have that straightened out server-side now. Also they run Samba on several of the servers; I'm sure the group will not be surprised to hear they experience file corruption and other strange problems. I've been pushing them to use Samba-CTDB, and it looks like it will happen. Except, I've never used this myself. So this raises a couple questions: 1) It looks like RHEL5 bundles in an old version of CTDB. Should that be used, or would we be better with a build from the Enterprise Samba site, or even a build from source? 2) Given that CTDB can also run NFS, what are people who need both finding works best: run both cNFS + Samba-CTDB, or let CTDB run both? It seems to me that if I let CTDB run both, I only need a single floating IP address for each server, while if I also use cNFS, I will want a floating address for both NFS and Samba, on each server. Thanks for the help! R. Lindsay Todd, PhD
On 12/12/13 18:14, Lindsay Todd wrote:
Hello,
Since this is my first note to the group, I'll introduce myself first. I am Lindsay Todd, a Systems Programmer at Rensselaer Polytechnic Institute's Center for Computational Innovations, where I run a 1.2PiB GPFS cluster serving a Blue Gene/Q and a variety of Opteron and Intel clients, run an IBM Watson, and serve as an adjunct faculty. I also do some freelance consulting, including GPFS, for several customers.
One of my customers is needing to serve GPFS storage through both NFS and Samba; they have GPFS 3.5 running on RHEL5 (not RHEL6) servers. I did not set this up for them, but was called to help fix it. Currently they export NFS using cNFS; I think we have that straightened out server-side now. Also they run Samba on several of the servers; I'm sure the group will not be surprised to hear they experience file corruption and other strange problems.
I've been pushing them to use Samba-CTDB, and it looks like it will happen. Except, I've never used this myself. So this raises a couple questions:
1) It looks like RHEL5 bundles in an old version of CTDB. Should that be used, or would we be better with a build from the Enterprise Samba site, or even a build from source?
Hi Lindsay, We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build: git clone git://git.samba.org/ctdb.git ctdb.git cd ctdb.git git branch -r git checkout -b "my_build" origin/1.2.40 cd packaging/RPM/ ./makerpms.sh yum install /root/rpmbuild/RPMS/x86_64/ctdb*.rpm I then take the Sernet src rpm and rebuild it, using ctdb.h from the above rather than the 1.0.114 version they use. This is possibly not required, but I thought it best to be sure that the differing headers wouldn't cause any problems. I remain, as ever, very grateful to Sernet for providing these!
2) Given that CTDB can also run NFS, what are people who need both finding works best: run both cNFS + Samba-CTDB, or let CTDB run both? It seems to me that if I let CTDB run both, I only need a single floating IP address for each server, while if I also use cNFS, I will want a floating address for both NFS and Samba, on each server.
We let CTDB run both, but we didn't come to that decision by comparing the merits of both options. I think Bristol (Bob Cregan is cc'd, I'm not sure he's on this list) run cNFS and CTDB side by side. As you say - you'd at least require different IP addresses to do that.
Thanks for the help!
Best of luck :)
R. Lindsay Todd, PhD
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
-- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
On Fri, 2013-12-13 at 15:15 +0000, Orlando Richards wrote: [SNIP]
Hi Lindsay,
We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build:
Interestingly the RHEL7 beta is shipping ctdb 2.1 in combination with Samba 4.1 http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/ JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On 13/12/13 15:31, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 15:15 +0000, Orlando Richards wrote:
[SNIP]
Hi Lindsay,
We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build:
Interestingly the RHEL7 beta is shipping ctdb 2.1 in combination with Samba 4.1
http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/
JAB.
The samba team are currently working to bring ctdb into the main samba source tree - so hopefully this will become a moot point soon! -- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
Orlando, give that there are so many emails/interest on this topic in recent month, let me share some personal expertise on this :-) any stock Samba or CTDB version you will find any distro is not sufficient and it doesn't matter which you choose (SLES, RHEL or any form of debian and any version of all of them). the reason is that Samba doesn't have the GPFS header and library files included in its source, and at compile time it dynamically enables/disables all GPFS related things based on the availability of the GPFS packages . as non of the distros build machines have GPFS installed all this packages end up with binaries in their rpms which don't have the required code enabled to properly support GPFS and non of the vfs modules get build either. the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging. Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package. said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right. also some people in the past have used a single instance of Samba to export shares over CIFS as they believe its a safe alternative to a more complex CTDB setup. also here a word of caution, even if you have a single instance of Samba running on top of GPFS you are exposed to potential data corruption if you don't use the proper Samba version (explained above) and the proper configuration, you can skip CTDB For that, but you still require a proper compiled version of Samba with GPFS code installed on the build machine. to be very clear the problem is not GPFS, its that Samba does locking AND caching on top of the Filesystem without GPFS knowledge if you don't use the right code/config to 'tell' GPFS about it, so GPFS can not ensure data consistency, not even on the same physical node for data thats shared over CIFS. there are unfortunate no shortcuts. i also have to point out that if you recompile the packages and configure everything correctly this is most likely to work, but you won't get official support for the CIFS part of this setup from IBM. This email is not an official Statement/Response of IBM, see it as personal 'AS-IS' Information sharing. Sven From: Orlando Richards <orlando.richards@ed.ac.uk> To: gpfsug-discuss@gpfsug.org Date: 12/13/2013 07:35 AM Subject: Re: [gpfsug-discuss] GPFS and both Samba and NFS Sent by: gpfsug-discuss-bounces@gpfsug.org On 13/12/13 15:31, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 15:15 +0000, Orlando Richards wrote:
[SNIP]
Hi Lindsay,
We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build:
Interestingly the RHEL7 beta is shipping ctdb 2.1 in combination with Samba 4.1
http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/
JAB.
The samba team are currently working to bring ctdb into the main samba source tree - so hopefully this will become a moot point soon! -- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On Fri, 2013-12-13 at 10:14 -0800, Sven Oehme wrote: [SNIP]
the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging.
Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package.
That is a factually inaccurate statement. There is nothing in CTDB that is GPFS specific. Trust me I have examined the code closely to determine if this is the case. So unless this has changed recently you are flat out wrong. Consequently there is no requirement whatsoever to rebuild CTDB to get the vfs_gpfs module. In addition there is also no requirement to actually have GPFS installed to build the vfs_gpfs module either. What you need to have is the GPFS GPL header files and nothing else. As it is a loadable VFS module linking takes place at load time not compile time. It is unworthy of an IBM employee to spread such inaccurate misinformation. [SNIP]
said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right.
Indeed. However I know not only what those options are, but also what they do despite IBM's refusal to tell us anything about them. I would also point out that there are sites that where running Samba on top of GPFS for many years before IBM began offering their SONAS/Storwize Unifed products. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
Allo Just jumping in here a minute:
It is unworthy of an IBM employee to spread such inaccurate misinformation.
Whilst this may be inaccurate - I very, very, much doubt that IBM or their employees have a secret master plan to spread misinformation (!) In the spirit of this group, let's work together to technically look at such issues. Sven, if that is the case, perhaps you could crib the lines of code / show your methodology that supports your views / experience. Regards, Jez -- UG Chair On 16/12/13 11:21, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 10:14 -0800, Sven Oehme wrote:
[SNIP]
the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging.
Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package.
That is a factually inaccurate statement. There is nothing in CTDB that is GPFS specific. Trust me I have examined the code closely to determine if this is the case. So unless this has changed recently you are flat out wrong.
Consequently there is no requirement whatsoever to rebuild CTDB to get the vfs_gpfs module. In addition there is also no requirement to actually have GPFS installed to build the vfs_gpfs module either. What you need to have is the GPFS GPL header files and nothing else. As it is a loadable VFS module linking takes place at load time not compile time.
It is unworthy of an IBM employee to spread such inaccurate misinformation.
[SNIP]
said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right. Indeed. However I know not only what those options are, but also what they do despite IBM's refusal to tell us anything about them.
I would also point out that there are sites that where running Samba on top of GPFS for many years before IBM began offering their SONAS/Storwize Unifed products.
JAB.
On 16/12/13 11:30, Chair wrote:
Allo
Just jumping in here a minute:
It is unworthy of an IBM employee to spread such inaccurate misinformation.
Whilst this may be inaccurate - I very, very, much doubt that IBM or their employees have a secret master plan to spread misinformation (!) In the spirit of this group, let's work together to technically look at such issues.
Sven, if that is the case, perhaps you could crib the lines of code / show your methodology that supports your views / experience.
Presumably this all comes down to the locking setup? Relevant to this, I've got: (from samba settings:) vfs objects = shadow_copy2, fileid, gpfs, syncops clustering = yes gpfs:sharemodes = yes syncops:onmeta = no blocking locks = Yes fake oplocks = No kernel oplocks = Yes locking = Yes oplocks = Yes level2 oplocks = Yes oplock contention limit = 2 posix locking = Yes strict locking = Auto (gpfs settings:) syncSambaMetadataOps yes
Regards,
Jez -- UG Chair
On 16/12/13 11:21, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 10:14 -0800, Sven Oehme wrote:
[SNIP]
the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging.
Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package.
That is a factually inaccurate statement. There is nothing in CTDB that is GPFS specific. Trust me I have examined the code closely to determine if this is the case. So unless this has changed recently you are flat out wrong.
Consequently there is no requirement whatsoever to rebuild CTDB to get the vfs_gpfs module. In addition there is also no requirement to actually have GPFS installed to build the vfs_gpfs module either. What you need to have is the GPFS GPL header files and nothing else. As it is a loadable VFS module linking takes place at load time not compile time.
It is unworthy of an IBM employee to spread such inaccurate misinformation.
[SNIP]
said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right. Indeed. However I know not only what those options are, but also what they do despite IBM's refusal to tell us anything about them.
I would also point out that there are sites that where running Samba on top of GPFS for many years before IBM began offering their SONAS/Storwize Unifed products.
JAB.
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
-- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
On Mon, 2013-12-16 at 11:30 +0000, Chair wrote:
Allo
Just jumping in here a minute:
It is unworthy of an IBM employee to spread such inaccurate misinformation.
Whilst this may be inaccurate - I very, very, much doubt that IBM or their employees have a secret master plan to spread misinformation (!) In the spirit of this group, let's work together to technically look at such issues.
You made me begin to douby myself so I have double checked. Specifically the ctdb-2.1-3.el7.src.rpm from the RHEL7 beta and it is as I calmed. There is no compilable code that is linked too or dependant on GPFS. Some of the support scripts (specifically the 60.ganesha and 62.cnfs) are GPFS aware, but no recompilation is needed as they are copied through to the binary RPM as is. You either know for a definite fact that CTDB needs recompiling on a machine with GPFS installed or you are simply spreading falsehoods. Why make such a long and detailed post if you don't know it to be true in the first place?
Sven, if that is the case, perhaps you could crib the lines of code / show your methodology that supports your views / experience.
There is none, because he is flat out 100% wrong. I did extensive research on this when deploying a GPFS/Samba/CTDB solution. I need a recompile to get the vfs_gpfs module and I naturally as was not going to use the RHEL supplied CTDB rpms without thoroughly checking out whether they needed recompiling. Note this all pre-dated Sernet offering pre-compiled binaries with the vfs_gpfs module included. Personally I prefer running with standard RHEL binaries with my own vfs_gpfs. It makes it easy to have a test setup that is plain Samba so one can narrow things down to being CTDB related very easily. In addition you don't know which version of the GPFS headers Sernet have compiled against. It also helps to have pucka Windows SMB servers as well so you can rule out client side issues. The sort of why is Powerpoint 2011 on a Mac taking minutes to save a file, where saving it under a different name takes seconds. When it exhibits the same behaviour on a Windows server you know there is nothing wrong with your Samba servers. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On 16/12/13 12:49, Jonathan Buzzard wrote:
In addition you don't know which version of the GPFS headers Sernet have compiled against.
Good point - in fact, it's an older version that I have on my GPFS 3.5 setup. I've updated my build process to fix that - thanks Jab :) -- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
Jez, the other replies to my email where kind of unexpected as i was indeed intending to help, i will continue to provide details and try to answer serious questions and comments. also as you point out there is no secret master plan to spread misinformation, the topic is simply complicated and there are reasons that are hard to explain why there is no full official support outside the current shipping IBM products and i will not dive into discussions around it. a few words of clarification, on the controversial point, compile ctdb yes/no. while its technically correct, that you don't have to recompile ctdb and it has no code that links/depends in any form on GPFS (samba does), you still have to compile one if the one shipped with your distro is out of date and while i didn't explicitly wrote it this way, this is what i intended to say. the version RH ships is very old and since has gotten many fixes which i highly recommend people to use unless the distros will pickup more recent version like RHEL7 will do. i probably wouldn't recommend a daily git build, but rather the packaged versions that are hosted on ftp.samba.org like : https://ftp.samba.org/pub/ctdb/packages/redhat/RHEL6/ so the proposed order of things would be to install gpfs, pull the src package of ctdb, compile and install ctdb and the devel packages, then pull a recent samba src package , install all the dependencies and build samba on this same host with gpfs and ctdb packages already installed. the resulting rpm's should contain the proper code to continue. after you got your versions compiled, installed and the basics of ctdb running, you should use the following smb.conf as a starting point : [global] netbios name = cluster fileid:mapping = fsname gpfs:sharemodes = yes gpfs:leases = yes gpfs:dfreequota = yes gpfs:hsm = yes syncops:onmeta = no kernel oplocks = no level2 oplocks = yes notify:inotify = no vfs objects = shadow_copy2 syncops gpfs fileid shadow:snapdir = .snapshots shadow:fixinodes = yes shadow:snapdirseverywhere = yes shadow:sort = desc wide links = no async smb echo handler = yes smbd:backgroundqueue = False use sendfile = no strict locking = yes posix locking = yes force unknown acl user = yes nfs4:mode = simple nfs4:chown = yes nfs4:acedup = merge nfs4:sidmap = /etc/samba/sidmap.tdb gpfs:winattr = yes store dos attributes = yes map readonly = yes map archive = yes map system = yes map hidden = yes ea support = yes dmapi support = no unix extensions = no socket options = TCP_NODELAY SO_KEEPALIVE TCP_KEEPCNT=4 TCP_KEEPIDLE=240 TCP_KEEPINTVL=15 strict allocate = yes gpfs:prealloc = yes if you don't configure using the registry you need to maintain the smb.conf file on all your nodes and i am not diving into how to setup the registry, but for the people who care, michael adam's presentation is a good starting point http://www.samba.org/~obnox/presentations/linux-kongress-2008/lk2008-obnox.p... also depending on your authentication/idmap setup , there are multiple changes/additions that needs to be made. on the gpfs side you should set the following config parameters : cifsBypassShareLocksOnRename=yes syncSambaMetadataOps=yes cifsBypassTraversalChecking=yes allowSambaCaseInsensitiveLookup=no your filesystem should have the following settings configured : -D nfs4 File locking semantics in effect -k nfs4 ACL semantics in effect -o nfssync Additional mount options --fastea Yes Fast external attributes enabled? -S relatime Suppress atime mount option the -S is a performance optimization, but you need to check if your backup/av or other software can deal with it, it essentially reduces the frequency of atime updates to once every 24 hours which is the new default on nfs mounts and others as well. a lot of the configuration parameters above are also above and beyond locking and data integrity, they are for better windows compatibility and should be checked if applicable for your environment. i would also recommend to run on GPFS 3.5 TL3 or newer to get the proper GPFS level of fixes for this type of configurations. i would like to repeat that i don't write this email to encourage people to all go start installing/ configuring samba on top of GPFS as i pointed out that you are kind on your own unless you can read source code and/or have somebody who does and is able to help as soon as you run into a problem. the main point of sharing this information is to clarify a lot of misinformation out there and provide the people who already have setups that are incorrect the information to at least not run into data corruption issues do to wrong configuration. Sven From: Chair <chair@gpfsug.org> To: gpfsug-discuss@gpfsug.org Date: 12/16/2013 03:31 AM Subject: Re: [gpfsug-discuss] GPFS and both Samba and NFS Sent by: gpfsug-discuss-bounces@gpfsug.org Allo Just jumping in here a minute:
It is unworthy of an IBM employee to spread such inaccurate misinformation.
Whilst this may be inaccurate - I very, very, much doubt that IBM or their employees have a secret master plan to spread misinformation (!) In the spirit of this group, let's work together to technically look at such issues. Sven, if that is the case, perhaps you could crib the lines of code / show your methodology that supports your views / experience. Regards, Jez -- UG Chair On 16/12/13 11:21, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 10:14 -0800, Sven Oehme wrote:
[SNIP]
the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging.
Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package.
That is a factually inaccurate statement. There is nothing in CTDB that is GPFS specific. Trust me I have examined the code closely to determine if this is the case. So unless this has changed recently you are flat out wrong.
Consequently there is no requirement whatsoever to rebuild CTDB to get the vfs_gpfs module. In addition there is also no requirement to actually have GPFS installed to build the vfs_gpfs module either. What you need to have is the GPFS GPL header files and nothing else. As it is a loadable VFS module linking takes place at load time not compile time.
It is unworthy of an IBM employee to spread such inaccurate misinformation.
[SNIP]
said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right. Indeed. However I know not only what those options are, but also what they do despite IBM's refusal to tell us anything about them.
I would also point out that there are sites that where running Samba on top of GPFS for many years before IBM began offering their SONAS/Storwize Unifed products.
JAB.
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Hi Sven, Many thanks for taking the time to write back in detail. This is exactly the sort of discussion the user group is aimed at - I.E. technical discussion outside of the GPFS Developer Forum. I heartily encourage other IBMers to get involved. Regards, Jez On 16/12/13 15:31, Sven Oehme wrote:
Jez,
the other replies to my email where kind of unexpected as i was indeed intending to help, i will continue to provide details and try to answer serious questions and comments.
also as you point out there is no secret master plan to spread misinformation, the topic is simply complicated and there are reasons that are hard to explain why there is no full official support outside the current shipping IBM products and i will not dive into discussions around it.
a few words of clarification, on the controversial point, compile ctdb yes/no. while its technically correct, that you don't have to recompile ctdb and it has no code that links/depends in any form on GPFS (samba does), you still have to compile one if the one shipped with your distro is out of date and while i didn't explicitly wrote it this way, this is what i intended to say.
the version RH ships is very old and since has gotten many fixes which i highly recommend people to use unless the distros will pickup more recent version like RHEL7 will do. i probably wouldn't recommend a daily git build, but rather the packaged versions that are hosted on ftp.samba.org like : _https://ftp.samba.org/pub/ctdb/packages/redhat/RHEL6/_
so the proposed order of things would be to install gpfs, pull the src package of ctdb, compile and install ctdb and the devel packages, then pull a recent samba src package , install all the dependencies and build samba on this same host with gpfs and ctdb packages already installed. the resulting rpm's should contain the proper code to continue.
after you got your versions compiled, installed and the basics of ctdb running, you should use the following smb.conf as a starting point :
[global] netbios name = cluster fileid:mapping = fsname gpfs:sharemodes = yes gpfs:leases = yes gpfs:dfreequota = yes gpfs:hsm = yes syncops:onmeta = no kernel oplocks = no level2 oplocks = yes notify:inotify = no vfs objects = shadow_copy2 syncops gpfs fileid shadow:snapdir = .snapshots shadow:fixinodes = yes shadow:snapdirseverywhere = yes shadow:sort = desc wide links = no async smb echo handler = yes smbd:backgroundqueue = False use sendfile = no strict locking = yes posix locking = yes force unknown acl user = yes nfs4:mode = simple nfs4:chown = yes nfs4:acedup = merge nfs4:sidmap = /etc/samba/sidmap.tdb gpfs:winattr = yes store dos attributes = yes map readonly = yes map archive = yes map system = yes map hidden = yes ea support = yes dmapi support = no unix extensions = no socket options = TCP_NODELAY SO_KEEPALIVE TCP_KEEPCNT=4 TCP_KEEPIDLE=240 TCP_KEEPINTVL=15 strict allocate = yes gpfs:prealloc = yes
if you don't configure using the registry you need to maintain the smb.conf file on all your nodes and i am not diving into how to setup the registry, but for the people who care, michael adam's presentation is a good starting point _http://www.samba.org/~obnox/presentations/linux-kongress-2008/lk2008-obnox.p... <http://www.samba.org/%7Eobnox/presentations/linux-kongress-2008/lk2008-obnox...>
also depending on your authentication/idmap setup , there are multiple changes/additions that needs to be made.
on the gpfs side you should set the following config parameters :
cifsBypassShareLocksOnRename=yes syncSambaMetadataOps=yes cifsBypassTraversalChecking=yes allowSambaCaseInsensitiveLookup=no
your filesystem should have the following settings configured :
-D nfs4 File locking semantics in effect -k nfs4 ACL semantics in effect -o nfssync Additional mount options --fastea Yes Fast external attributes enabled? -S relatime Suppress atime mount option
the -S is a performance optimization, but you need to check if your backup/av or other software can deal with it, it essentially reduces the frequency of atime updates to once every 24 hours which is the new default on nfs mounts and others as well.
a lot of the configuration parameters above are also above and beyond locking and data integrity, they are for better windows compatibility and should be checked if applicable for your environment.
i would also recommend to run on GPFS 3.5 TL3 or newer to get the proper GPFS level of fixes for this type of configurations.
i would like to repeat that i don't write this email to encourage people to all go start installing/ configuring samba on top of GPFS as i pointed out that you are kind on your own unless you can read source code and/or have somebody who does and is able to help as soon as you run into a problem. the main point of sharing this information is to clarify a lot of misinformation out there and provide the people who already have setups that are incorrect the information to at least not run into data corruption issues do to wrong configuration.
Sven
From: Chair <chair@gpfsug.org> To: gpfsug-discuss@gpfsug.org Date: 12/16/2013 03:31 AM Subject: Re: [gpfsug-discuss] GPFS and both Samba and NFS Sent by: gpfsug-discuss-bounces@gpfsug.org ------------------------------------------------------------------------
Allo
Just jumping in here a minute:
It is unworthy of an IBM employee to spread such inaccurate misinformation.
Whilst this may be inaccurate - I very, very, much doubt that IBM or their employees have a secret master plan to spread misinformation (!) In the spirit of this group, let's work together to technically look at such issues.
Sven, if that is the case, perhaps you could crib the lines of code / show your methodology that supports your views / experience.
Regards,
Jez -- UG Chair
On 16/12/13 11:21, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 10:14 -0800, Sven Oehme wrote:
[SNIP]
the only way to get something working (don't get confused with officially Supported) is to recompile the CTDB src packages AND the Samba src packages on a node that has GPFS already installed. also the inclusion of CTDB into Samba will not address this, its just a more convenient packaging.
Only if the build happens on such a node things like the vfs modules for GPFS are build and included in the package.
That is a factually inaccurate statement. There is nothing in CTDB that is GPFS specific. Trust me I have examined the code closely to determine if this is the case. So unless this has changed recently you are flat out wrong.
Consequently there is no requirement whatsoever to rebuild CTDB to get the vfs_gpfs module. In addition there is also no requirement to actually have GPFS installed to build the vfs_gpfs module either. What you need to have is the GPFS GPL header files and nothing else. As it is a loadable VFS module linking takes place at load time not compile time.
It is unworthy of an IBM employee to spread such inaccurate misinformation.
[SNIP]
said all this the binaries alone are only part of the Solution, after you have the correct packages, you need to properly configuration the system and setting all the right options (on GPFS as well as on CTDB and smbd.conf), which unfortunate are very System configuration specific, as otherwise you still can end up with data corruption if not set right. Indeed. However I know not only what those options are, but also what they do despite IBM's refusal to tell us anything about them.
I would also point out that there are sites that where running Samba on top of GPFS for many years before IBM began offering their SONAS/Storwize Unifed products.
JAB.
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On Mon, 2013-12-16 at 07:31 -0800, Sven Oehme wrote: [SNIP]
a few words of clarification, on the controversial point, compile ctdb yes/no. while its technically correct, that you don't have to recompile ctdb and it has no code that links/depends in any form on GPFS (samba does), you still have to compile one if the one shipped with your distro is out of date and while i didn't explicitly wrote it this way, this is what i intended to say.
Fair enough, but what you actually said is not remotely close to that.
the version RH ships is very old and since has gotten many fixes which i highly recommend people to use unless the distros will pickup more recent version like RHEL7 will do. i probably wouldn't recommend a daily git build, but rather the packaged versions that are hosted on ftp.samba.org like : https://ftp.samba.org/pub/ctdb/packages/redhat/RHEL6/
so the proposed order of things would be to install gpfs, pull the src package of ctdb, compile and install ctdb and the devel packages,
As I pointed out that is a pointless exercise. Just install the packages.
then pull a recent samba src package , install all the dependencies and build samba on this same host with gpfs and ctdb packages already installed. the resulting rpm's should contain the proper code to continue.
I would in the strongest possible terms recommend using a VM for compiling packages. Anyone compiling and maintaining packages on the production or even for that matter a test GPFS cluster deserves sacking.
after you got your versions compiled, installed and the basics of ctdb running, you should use the following smb.conf as a starting point :
[global] netbios name = cluster fileid:mapping = fsname gpfs:sharemodes = yes gpfs:leases = yes gpfs:dfreequota = yes gpfs:hsm = yes syncops:onmeta = no kernel oplocks = no level2 oplocks = yes notify:inotify = no vfs objects = shadow_copy2 syncops gpfs fileid shadow:snapdir = .snapshots shadow:fixinodes = yes shadow:snapdirseverywhere = yes shadow:sort = desc wide links = no async smb echo handler = yes smbd:backgroundqueue = False use sendfile = no strict locking = yes posix locking = yes force unknown acl user = yes nfs4:mode = simple nfs4:chown = yes nfs4:acedup = merge nfs4:sidmap = /etc/samba/sidmap.tdb gpfs:winattr = yes store dos attributes = yes map readonly = yes map archive = yes map system = yes map hidden = yes ea support = yes dmapi support = no unix extensions = no socket options = TCP_NODELAY SO_KEEPALIVE TCP_KEEPCNT=4 TCP_KEEPIDLE=240 TCP_KEEPINTVL=15 strict allocate = yes gpfs:prealloc = yes
Nothing new there for those in the know. That said some of those options might not be wanted.
if you don't configure using the registry you need to maintain the smb.conf file on all your nodes and i am not diving into how to setup the registry, but for the people who care, michael adam's presentation is a good starting point http://www.samba.org/~obnox/presentations/linux-kongress-2008/lk2008-obnox.p...
also depending on your authentication/idmap setup , there are multiple changes/additions that needs to be made.
on the gpfs side you should set the following config parameters :
cifsBypassShareLocksOnRename=yes syncSambaMetadataOps=yes cifsBypassTraversalChecking=yes allowSambaCaseInsensitiveLookup=no
The cifsBypassTraversalChecking=yes is very very much a site based choice. You need to understand what it does because it could create a security nightmare if you just randomly enable it. On the other hand it could be a life saver if you are moving from an existing Windows server. Basically it enables Windows security schematics rather than Posix based ones. That is you will no longer need access to all the parent folders to a file in order to be able to access the file. So long as you have permissions on the file you are good to go.
your filesystem should have the following settings configured :
-D nfs4 File locking semantics in effect -k nfs4 ACL semantics in effect
Really I would have expected -k samba :-)
-o nfssync Additional mount options --fastea Yes Fast external attributes enabled? -S relatime Suppress atime mount option
the -S is a performance optimization, but you need to check if your backup/av or other software can deal with it, it essentially reduces the frequency of atime updates to once every 24 hours which is the new default on nfs mounts and others as well.
How does -S option impact on doing policy based tiering? I would approach that with caution if you are doing any tiering or HSM. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On 16/12/13 15:31, Sven Oehme wrote: [SNIP]
i would like to repeat that i don't write this email to encourage people to all go start installing/ configuring samba on top of GPFS as i pointed out that you are kind on your own unless you can read source code and/or have somebody who does and is able to help as soon as you run into a problem. the main point of sharing this information is to clarify a lot of misinformation out there and provide the people who already have setups that are incorrect the information to at least not run into data corruption issues do to wrong configuration.
I meant to say that is *VERY* sound advice. Roughly speaking if you had not already worked out just about everything in that email and more besides you should not be rolling your own GPFS/Samba/CTDB solution because you don't know what you are doing and it will likely end in tears at some point. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
Hi all, I've been following this discussion because I use GPFS with both NFS and Samba. Although, now I'm a bit concerned because it sounds like this may not be an appropriate thing to do. It seems like the issue is the clustered implementations of Samba and NFS, yes? Or is this for any implementation? I use GPFS 3,4, under RHEL5, but only on one machine. We do not have a cluster of GPFS systems, so it's the plain version of NFS and Samba that comes with RedHat--no CTDB. My one-node GPFS system exports NFS shares to which other servers write data, as well as hosts a few Samba shares for desktop computers. So now I'm curious. Is this wrong to do? I haven't had any problems in the three years I've had it running. To clarify, while NFS and Samba are both writing data to the same GPFS filesystem, they're not writing to the same files or directories. NFS is for server-to-server data, and Samba is for desktop clients, which is relegated to different directories of the same file system. ____________________________________________ Adam Wead Systems and Digital Collections Librarian Rock and Roll Hall of Fame and Museum 216.515.1960 (t) 215.515.1964 (f) On Mon, Dec 16, 2013 at 3:46 PM, Jonathan Buzzard <jonathan@buzzard.me.uk>wrote:
On 16/12/13 15:31, Sven Oehme wrote:
[SNIP]
i would like to repeat that i don't write this email to encourage people to all go start installing/ configuring samba on top of GPFS as i pointed out that you are kind on your own unless you can read source code and/or have somebody who does and is able to help as soon as you run into a problem. the main point of sharing this information is to clarify a lot of misinformation out there and provide the people who already have setups that are incorrect the information to at least not run into data corruption issues do to wrong configuration.
I meant to say that is *VERY* sound advice. Roughly speaking if you had not already worked out just about everything in that email and more besides you should not be rolling your own GPFS/Samba/CTDB solution because you don't know what you are doing and it will likely end in tears at some point.
JAB.
-- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On 17/12/13 03:49, Adam Wead wrote:
Hi all,
I've been following this discussion because I use GPFS with both NFS and Samba. Although, now I'm a bit concerned because it sounds like this may not be an appropriate thing to do. It seems like the issue is the clustered implementations of Samba and NFS, yes? Or is this for any implementation?
The issue is that running a GPFS cluster with Samba/NFS etc. on top is not in the same league as installing Linux on a single server with some storage attached and configuring Samba/NFS. The system is much more complex and there are nasty ways in which your data can get corrupted. To proceed for example without a functional clone test system would be fool hardy in the extreme. For example in my last job I had a functional clone of the live GPFS systems. By functional clone that means real hardware, with similar FC cards, attached to the same type of storage (in this case LSI/Netapp Engenio based) with NSD's of the same type though fewer running the same OS image, same multipathing drivers, same GPFS version, same Samba/CTDB versions. In addition I then had a standalone Samba server, same OS, same storage, etc. all the same except no GPFS and no CTDB. It was identical apart from the vfs_gpfs module. One of the reasons I choose to compile my own vfs_gpfs and insert it into pucka RHEL is that I wanted to be able to test issues against a known target that I could get support on. Then for good measure a test real Windows server, because there is nothing like being able to rule out problems as being down to the client not working properly with SMB. Finally virtual machines for building my vfs_gpfs modules. If you think I am being over the top, with my test platform let me assure you that *ALL* of it was absolutely essential for the diagnosis of problems with the system and the generation of fixes at one time or another. The thing is if you don't get this without being told then running a GPFS/Samba/CTDB service is really not for you. Also you need to understand what I call "GPFS and the Dark Arts" aka "Magic levers for Samba", what they do and why you might want them. There are probably only a handful of people outside IBM who understand those, which is why you get warnings from people inside IBM about doing it yourself. So by all means do it, but make sure you have the test systems in place and a through understanding of all the technologies involved as you are going to have to do support for yourself; you cannot ring IBM or RedHat and say my GPFS/Samba/CTDB storage cluster is not working as you are well of the beaten path. Sure you can get support from IBM for GPFS issues provided it is entirely GPFS related, but saving from Office 2010 on a shared drive with rich permissions is giving wacked out file ownership and permission issues is going to be down to you to fix. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On Fri, 2013-12-13 at 15:35 +0000, Orlando Richards wrote:
On 13/12/13 15:31, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 15:15 +0000, Orlando Richards wrote:
[SNIP]
Hi Lindsay,
We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build:
Interestingly the RHEL7 beta is shipping ctdb 2.1 in combination with Samba 4.1
http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/
JAB.
The samba team are currently working to bring ctdb into the main samba source tree - so hopefully this will become a moot point soon!
Yes I am aware of this. The point of bringing up what is going into RHEL7 was to get a flavour of what RedHat consider stable enough to push out into a supported enterprise product. I always ran my GPFS/Samba/CTDB clusters by taking a stock RHEL Samba, and patching the spec file to build the vfs_gpfs module possibly with extra patches to the vfs_gpfs module for bug fixes against the GPFS version running on the cluster and have it produce a suitable RPM with just the vfs_gpfs module that I could then load into the stock RHEL Samba. It would appear that RedHat are doing something similar in RHEL7 with a vfs_glusterfs RPM for Samba. Of course even with CTDB in Samba you are still going to need to do some level of rebuilding because you won't get the vfs_gpfs module otherwise. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On 16/12/13 11:02, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 15:35 +0000, Orlando Richards wrote:
On 13/12/13 15:31, Jonathan Buzzard wrote:
On Fri, 2013-12-13 at 15:15 +0000, Orlando Richards wrote:
[SNIP]
Hi Lindsay,
We rebuild ctdb from the (git) source (in the 1.2.40 branch currently), after running into performance problems with the sernet bundled version (1.0.114). It's easy to build:
Interestingly the RHEL7 beta is shipping ctdb 2.1 in combination with Samba 4.1
http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/
JAB.
The samba team are currently working to bring ctdb into the main samba source tree - so hopefully this will become a moot point soon!
Yes I am aware of this. The point of bringing up what is going into RHEL7 was to get a flavour of what RedHat consider stable enough to push out into a supported enterprise product.
I always ran my GPFS/Samba/CTDB clusters by taking a stock RHEL Samba, and patching the spec file to build the vfs_gpfs module possibly with extra patches to the vfs_gpfs module for bug fixes against the GPFS version running on the cluster and have it produce a suitable RPM with just the vfs_gpfs module that I could then load into the stock RHEL Samba.
It would appear that RedHat are doing something similar in RHEL7 with a vfs_glusterfs RPM for Samba.
Of course even with CTDB in Samba you are still going to need to do some level of rebuilding because you won't get the vfs_gpfs module otherwise.
Sernet include GPFS in their builds - they truly are wonderful :) -- -- Dr Orlando Richards Information Services IT Infrastructure Division Unix Section Tel: 0131 650 4994 skype: orlando.richards The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
participants (6)
-
Adam Wead -
Chair -
Jonathan Buzzard -
Lindsay Todd -
Orlando Richards -
Sven Oehme
