Features/GFS2ClusteredSamba

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Current status)
 
(12 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
== Summary ==
 
== Summary ==
Support for active-active samba sharing over GFS2 using CTDB.
+
Support for clustered samba (including active/active configuration) over GFS2 using CTDB.
  
 
== Owner ==
 
== Owner ==
Line 10: Line 10:
 
== Current status ==
 
== Current status ==
 
* Targeted release: [[Releases/12 | Fedora 12 ]]
 
* Targeted release: [[Releases/12 | Fedora 12 ]]
* Last updated: 7/20/2009
+
* Last updated: 9/29/2009
* Percentage of completion: 70%
+
* Percentage of completion: 100%
 +
* I've been able to test the following:
 +
** Simultaneous samba exports of the same share from multiple cluster nodes (active/active samba)
 +
** Export the shares through a public IP address and mount from a client node using this public IP address
 +
** Run successful smbtorture nbench tests from a client
 +
** Active failover of samba service from one node (when killed) to another. I've _not_ tested this in f12 as I encountered a gfs2 recovery hang (it's a gfs2 bug I'm working on, has nothing to do with clustered samba), but I have seen this work with RHEL5 testing of gfs2-clustered-samba and should work in f12 as well.
  
 
== Detailed Description ==
 
== Detailed Description ==
With the availability of a clustered database (CTDB) for Samba, multiple instances of smbd across different nodes of a cluster are able to share state. It is now possible to share the same directory in a clustered GFS2 filesystem via Samba+CTDB from all the nodes of a cluster to facilitate Active/Active Samba sharing.
+
With the availability of a clustered database (CTDB) for Samba, multiple instances of smbd across different nodes of a cluster are able to share state. It is now possible to export a gfs2 filesystem through one or more nodes in the cluster in a active/passive or active/active configuration to provide a highly-available Samba service.
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
Active/Active sharing of Samba services was not possible over GFS2 (or any other clustered filesystem) on Fedora before this feature was implemented. With this it's possible now.
+
Samba was not cluster-aware until the introduction of CTDB and hence it was not possible to have a highly available samba service. Particularly, active/active configuration was not possible. With this feature, it will be possible to run highly available samba service(s) with different configurations (active/active, active/passive) over a shared gfs2 filesystem on the Red Hat cluster infrastructure.
  
 
== Scope ==
 
== Scope ==
* fcntl posix locks performance: Improve upon gfs2's posix lock performance (single-node & clustered) as smbd uses them extensively when posix locking is turned on.
+
* Verify simple functionality by exporting samba shares over gfs2 and running smbtorture tests (in progress)
* Get CTDB and CTDB-supported Samba packages into F-12.
+
* fcntl posix locks performance: Improve upon gfs2's posix lock performance (single-node & clustered) as smbd uses them extensively when posix locking is turned on. (in progress)
* Get Conga interface ready for manipulating the various config files (/etc/cluster/cluster.conf, /etc/sysconfig/ctdb, /etc/samba/smb.conf) through web-based GUI. (Alternative to hand-editing configs)
+
* Get CTDB and CTDB-supported Samba packages into F12. (complete)
* Verify working of clustered-samba use cases and document respective configuration parameters.
+
* Get Conga interface ready for manipulating the various config files (/etc/cluster/cluster.conf, /etc/sysconfig/ctdb, /etc/samba/smb.conf) through web-based GUI. (Alternative to hand-editing configs) (in progress)
 +
* Verify working of clustered samba use cases such as service failover, recovery, etc., and document respective configuration parameters. (in progress)
  
This feature will not affect the operation of non-clustered samba setups or other gfs2-based setups. This feature will provide the capability to do clustered-samba-over-gfs2 that was not available before.
+
This feature will not affect the operation of non-clustered samba setups or other gfs2-based setups. It will provide the capability to setup clustered samba over gfs2.
  
 
== How To Test ==
 
== How To Test ==
1. smbtorture tests like RAW_BENCH_LOCK (posix locking = on), RAW_BENCH_OPEN, BENCH_NBENCH and the ctdb ping_pong test are to be run on a samba+ctdb+gfs2 cluster.
+
Hardware Requirements
 +
* cluster nodes (2 or more) connected to shared storage
 +
* client node(s) to run client loads from.
  
* Basic Configuration:
+
Packages
** Setup a cluster with your machines: <link>
+
* kernel with gfs2 and dlm enabled
** mount a gfs2-formatted clustered volume at the same mountpoint on all nodes.
+
* Red Hat cluster packages cman/openais/corosync/lvm2-cluster etc. See [http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=blob;f=doc/usage.txt;h=f9e2866c4e558f22514076c8620cf5b88ffe3392;hb=refs/heads/STABLE3 usage.txt] for more information.
** export this mountpoint (or a directory within it) as a samba share. All smb.conf files in all nodes should be identical
+
* Latest samba and ctdb packages.
** Set ctdb configuration <link>
+
** start the ctdb service and check 'ctdb status' to make sure the ctdb cluster is up.
+
** Now you should simultaneously be able to access the samba share through all the exporting nodes and run operations on them simultaneously.
+
  
<!-- This does not need to be a full-fledged document.  Describe the dimensions of tests that this feature is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them. The more specific you can be, the better the community testing can be.  
+
Setup
 +
* Setup the cluster.conf file and start up the cluster 'service cman start'
 +
* If you're using clustered lvm, 'service clvmd start'
 +
* mount a gfs2-formatted clustered volume at the same mountpoint on all nodes.
 +
* Export this mountpoint (or a directory within it) as a samba share. All smb.conf files in all nodes should be identical
 +
* Set ctdb configuration. See [http://wiki.samba.org/index.php/CTDB_Setup#Critical_smb.conf_parameters ctdb setup]
 +
* start the ctdb service and check 'ctdb status' to make sure the ctdb cluster is up.
 +
* Now you should simultaneously be able to access the samba share through all the exporting nodes and run operations on them simultaneously.
  
Remember that you are writing this how to for interested testers to use to check out your feature - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your feature.
+
Tests
 
+
* The smbtorture test suite in the samba package has a few scenarios RAW_BENCH_LOCK, RAW_BENCH_OPEN, BENCH_NBENCH etc. See [http://wiki.samba.org/index.php/CTDB_Setup#Testing_your_cluster testing ctdb]
A good "how to test" should answer these four questions:
+
* There's also the ping_pong test at: [http://wiki.samba.org/index.php/CTDB_Setup#Filesystem_specific_configuration ping_pong doc]
 
+
* Any other test you can think of with multiple clients (windows users mounting the samba share) that stresses ctdb/gfs2.
0. What special hardware / data / etc. is needed (if any)?
+
1. How do I prepare my system to test this feature? What packages
+
need to be installed, config files edited, etc.?
+
2. What specific actions do I perform to check that the feature is
+
working like it's supposed to?
+
3. What are the expected results of those actions?
+
-->
+
  
 
== User Experience ==
 
== User Experience ==
Line 63: Line 68:
  
 
== Documentation ==
 
== Documentation ==
* [http://ctdb.samba.org/] about ctdb
+
* [http://ctdb.samba.org/ ctdb]
* [http://www.samba.org/] about samba
+
* [http://www.samba.org/ samba]
 
* [http://en.wikipedia.org/wiki/Red_Hat_Cluster_Suite Cluster Suite] on Wikipedia
 
* [http://en.wikipedia.org/wiki/Red_Hat_Cluster_Suite Cluster Suite] on Wikipedia
 
* [http://en.wikipedia.org/wiki/Global_File_System GFS/GFS2] on Wikipedia
 
* [http://en.wikipedia.org/wiki/Global_File_System GFS/GFS2] on Wikipedia
 
* [http://sources.redhat.com/cluster/wiki/ Cluster Wiki] page
 
* [http://sources.redhat.com/cluster/wiki/ Cluster Wiki] page
 
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/gfs2.txt;h=593004b6bbabaeee282b1041835f580cf12baa2e;hb=HEAD GFS2 kernel documentation] (a very basic introduction)
 
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/gfs2.txt;h=593004b6bbabaeee282b1041835f580cf12baa2e;hb=HEAD GFS2 kernel documentation] (a very basic introduction)
 
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
 
*
 
  
 
== Release Notes ==
 
== Release Notes ==
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
+
* Fedora now has support for clustered samba over gfs2
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
+
*
+
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==
* See [[Talk:Features/YourFeatureName]]  <!-- This adds a link to the "discussion" tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page -->
+
* See [[Talk:Features/GFS2ClusteredSamba]]  <!-- This adds a link to the "discussion" tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page -->
  
  
[[Category:FeaturePageIncomplete]]
+
[[Category:FeatureAcceptedF12]]
 
<!-- When your feature page is completed and ready for review -->
 
<!-- When your feature page is completed and ready for review -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->

Latest revision as of 14:52, 29 September 2009

Contents

[edit] Clustered Samba for GFS2

[edit] Summary

Support for clustered samba (including active/active configuration) over GFS2 using CTDB.

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 12
  • Last updated: 9/29/2009
  • Percentage of completion: 100%
  • I've been able to test the following:
    • Simultaneous samba exports of the same share from multiple cluster nodes (active/active samba)
    • Export the shares through a public IP address and mount from a client node using this public IP address
    • Run successful smbtorture nbench tests from a client
    • Active failover of samba service from one node (when killed) to another. I've _not_ tested this in f12 as I encountered a gfs2 recovery hang (it's a gfs2 bug I'm working on, has nothing to do with clustered samba), but I have seen this work with RHEL5 testing of gfs2-clustered-samba and should work in f12 as well.

[edit] Detailed Description

With the availability of a clustered database (CTDB) for Samba, multiple instances of smbd across different nodes of a cluster are able to share state. It is now possible to export a gfs2 filesystem through one or more nodes in the cluster in a active/passive or active/active configuration to provide a highly-available Samba service.

[edit] Benefit to Fedora

Samba was not cluster-aware until the introduction of CTDB and hence it was not possible to have a highly available samba service. Particularly, active/active configuration was not possible. With this feature, it will be possible to run highly available samba service(s) with different configurations (active/active, active/passive) over a shared gfs2 filesystem on the Red Hat cluster infrastructure.

[edit] Scope

  • Verify simple functionality by exporting samba shares over gfs2 and running smbtorture tests (in progress)
  • fcntl posix locks performance: Improve upon gfs2's posix lock performance (single-node & clustered) as smbd uses them extensively when posix locking is turned on. (in progress)
  • Get CTDB and CTDB-supported Samba packages into F12. (complete)
  • Get Conga interface ready for manipulating the various config files (/etc/cluster/cluster.conf, /etc/sysconfig/ctdb, /etc/samba/smb.conf) through web-based GUI. (Alternative to hand-editing configs) (in progress)
  • Verify working of clustered samba use cases such as service failover, recovery, etc., and document respective configuration parameters. (in progress)

This feature will not affect the operation of non-clustered samba setups or other gfs2-based setups. It will provide the capability to setup clustered samba over gfs2.

[edit] How To Test

Hardware Requirements

  • cluster nodes (2 or more) connected to shared storage
  • client node(s) to run client loads from.

Packages

  • kernel with gfs2 and dlm enabled
  • Red Hat cluster packages cman/openais/corosync/lvm2-cluster etc. See usage.txt for more information.
  • Latest samba and ctdb packages.

Setup

  • Setup the cluster.conf file and start up the cluster 'service cman start'
  • If you're using clustered lvm, 'service clvmd start'
  • mount a gfs2-formatted clustered volume at the same mountpoint on all nodes.
  • Export this mountpoint (or a directory within it) as a samba share. All smb.conf files in all nodes should be identical
  • Set ctdb configuration. See ctdb setup
  • start the ctdb service and check 'ctdb status' to make sure the ctdb cluster is up.
  • Now you should simultaneously be able to access the samba share through all the exporting nodes and run operations on them simultaneously.

Tests

  • The smbtorture test suite in the samba package has a few scenarios RAW_BENCH_LOCK, RAW_BENCH_OPEN, BENCH_NBENCH etc. See testing ctdb
  • There's also the ping_pong test at: ping_pong doc
  • Any other test you can think of with multiple clients (windows users mounting the samba share) that stresses ctdb/gfs2.

[edit] User Experience

Users not using gfs2, samba or ctdb should notice no change. Users will now have the ability to run a clustered samba setup exporting gfs2 shares.

[edit] Dependencies

Most of the kernel support (gfs2 filesystem) is already upstream. ctdb and samba packages have been included in Fedora.

[edit] Contingency Plan

In it's current state, a basic clustered samba setup should work. Enhancements such as posix lock performance & conga interface and testing of different use-cases would be nice to get done with. If not done with these tasks, in it's current form, the feature is still acceptable.

[edit] Documentation

[edit] Release Notes

  • Fedora now has support for clustered samba over gfs2

[edit] Comments and Discussion