12.07.2015 Views

04-Guenther Deschner - Samba3 in the Enterprise PDF - sambaXP

04-Guenther Deschner - Samba3 in the Enterprise PDF - sambaXP

04-Guenther Deschner - Samba3 in the Enterprise PDF - sambaXP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Samba 3 <strong>in</strong> <strong>the</strong> <strong>Enterprise</strong>hands-on experience and lab-reportGün<strong>the</strong>r <strong>Deschner</strong>Samba TeamSUSE LINUX Products GmbH


Overview• The author• What are <strong>the</strong> <strong>Enterprise</strong> requirements?• Scalability and Performance– Samba as Doma<strong>in</strong> Controler– Samba as File- and Pr<strong>in</strong>t Server• Migration• Conclusion2© May 3, 2005 Novell Inc.


The author


Gün<strong>the</strong>r <strong>Deschner</strong>• Currently work<strong>in</strong>g for Research & Development atNovell / SUSE LINUX• 5 yrs. L<strong>in</strong>ux Consultant experience• Strong <strong>in</strong>terest <strong>in</strong> <strong>the</strong> Samba-Project s<strong>in</strong>ce 2001• Member of <strong>the</strong> Samba-Team s<strong>in</strong>ce 20<strong>04</strong>• Many larger Samba projects(mostly <strong>in</strong> <strong>the</strong> area of public authorities andgovernment)4© May 3, 2005 Novell Inc.


What are <strong>the</strong> <strong>Enterprise</strong>requirements and btw:what is “<strong>the</strong> <strong>Enterprise</strong>”?


Samba <strong>in</strong> <strong>the</strong> <strong>Enterprise</strong>• What is “<strong>the</strong> <strong>Enterprise</strong>” ?• Samba behaviour <strong>in</strong> large scale environments• Here Samba has to deal with:• Thousands and thousands of users, groups and mach<strong>in</strong>es• Complex or huge trusted-doma<strong>in</strong> setups• Elaborate migration scenarios• Distributed network topologies• Project Managers who tend to take Samba as a 1:1replacement for <strong>the</strong>ir W<strong>in</strong>dows Servers• Adm<strong>in</strong>istrators who are used to W<strong>in</strong>dows-likeadm<strong>in</strong>istration and expect Samba to behave <strong>the</strong> same6© May 3, 2005 Novell Inc.


Samba <strong>in</strong> <strong>the</strong> <strong>Enterprise</strong>• Today Samba is used <strong>in</strong> environments <strong>in</strong> which it hasnot <strong>in</strong>itially been designed for• Is Samba actually able to meet <strong>Enterprise</strong>requirements?• What is <strong>the</strong> Samba Team do<strong>in</strong>g for mak<strong>in</strong>g Samba 3more suitable to <strong>the</strong> <strong>Enterprise</strong> environments?• If we want or not, Samba 3 is perceived as a directcompetitor to W<strong>in</strong>dows 2003 !7© May 3, 2005 Novell Inc.


Samba <strong>in</strong> <strong>the</strong> <strong>Enterprise</strong>•Two major po<strong>in</strong>ts will be discussed <strong>in</strong> this call:• Scalability and Performance• Migration8© May 3, 2005 Novell Inc.


Scalability and Performance


Samba as Doma<strong>in</strong> Controler• Huge DCs mostly use LDAP Directory Services (DS)• First critical aspect:How well does <strong>the</strong> DS perform and scale?• Most common: OpenLDAP• Very important performance impact:OpenLDAP Release and Berkeley DB tun<strong>in</strong>g10© May 3, 2005 Novell Inc.


Samba as Doma<strong>in</strong> Controler• Second critical aspect:How well does Samba query <strong>the</strong> DS ?• Earlier Samba 3 versions had• Relatively poor LDAP-performance for large userdatabases• High <strong>in</strong>efficiency <strong>in</strong> handl<strong>in</strong>g Doma<strong>in</strong> Logons fromW<strong>in</strong>dows XP (and all <strong>in</strong>volved MSRPC calls)• Consequences:• MSRPC-calls are tim<strong>in</strong>g out• Adm<strong>in</strong>-Tools break down• Complete loss of PDC functionality11© May 3, 2005 Novell Inc.


Samba as Doma<strong>in</strong> Controler• What was done dur<strong>in</strong>g <strong>the</strong> last months?• Various LDAP-related improvements:• Almost completly replaced “expensive”enumeration-calls with direct LDAP queries• ldapsam:trusted = yes(a variety of performance improvements that all assumethat NSS- and pdb-Accounts are part of <strong>the</strong> same LDAP-Object)• LDAP-filter<strong>in</strong>g for pdb-enumeration-calls to dist<strong>in</strong>guish<strong>the</strong> list<strong>in</strong>g of user and computer accounts• LDAP Paged Results (RFC 2696) to make usrmgr.exe andrelated tools to work at all <strong>in</strong> 40k user environments12© May 3, 2005 Novell Inc.


Samba as Doma<strong>in</strong> Controler• Example: A High-Performance <strong>Samba3</strong>-LDAP-DC• Customer had a Samba PDC and lots of W<strong>in</strong>dows XPclients• Size: > 10k Users, > 7k Mach<strong>in</strong>es, 6k global groups• Dur<strong>in</strong>g migration: very poor PDC-performance(PDC deadlock)• Samba < 3.0.7 and OpenLDAP 2.1.x (ldbm or bdbBackend) could only handle about 300 concurrentDoma<strong>in</strong>-Logons spread over 8 m<strong>in</strong>utes• How to reproduce that?13© May 3, 2005 Novell Inc.


Samba as Doma<strong>in</strong> Controler• Debugg<strong>in</strong>g:• Samba 4 smbtorture-Test to simulate 1:1 W<strong>in</strong>dows XPDoma<strong>in</strong>-Logon attempt (RPC-LOGIN)• Test-Lab with equivalent hardware• Scripts to trigger huge amounts of parallel smbtorturelogon-attempts,randomly spread over realistic peaktimes• Script<strong>in</strong>g framework to record and monitor benchmarkresults• Logfile analysis14© May 3, 2005 Novell Inc.


Samba as Doma<strong>in</strong> Controler• Improvements:• Rule of thumb: avoid unnecessary enumerations whendirect LDAP queries are sufficient; avoid redundant LDAPqueries where possible• Redesign<strong>in</strong>g customer`s <strong>in</strong>frastructure, renew<strong>in</strong>gsoftware components and enhanc<strong>in</strong>g Samba's LDAP-Code (ldapsam:trusted=yes) lead to enormousperformance ga<strong>in</strong>:• Several thousands concurrent and successful W<strong>in</strong>dowsXP Doma<strong>in</strong>-Logons evenly spread over 10 m<strong>in</strong>utes withtuned OpenLDAP and current Samba 3 Release15© May 3, 2005 Novell Inc.


Samba as File Server• <strong>Samba3</strong> is known for high file-serv<strong>in</strong>g performance• Implicit issues with Doma<strong>in</strong> Membership <strong>in</strong> a SambacontrolledDoma<strong>in</strong>:• Implications with nss_ldap (critical number of LDAPconnections)• W<strong>in</strong>b<strong>in</strong>dd does operate block<strong>in</strong>g (alternative nonblock<strong>in</strong>gimplementation <strong>in</strong> trunk)• Sequence Number call (querydom<strong>in</strong>fo) that w<strong>in</strong>b<strong>in</strong>ddused, triggered full-dump of user database on SambaPDC (imag<strong>in</strong>e > 100 file-servers with w<strong>in</strong>b<strong>in</strong>dd that callfor sequence numbers each five m<strong>in</strong>utes)16© May 3, 2005 Novell Inc.


Samba as File Server• Addition of non-enumerat<strong>in</strong>g <strong>in</strong>fo-levels of querydom<strong>in</strong>fo• Alternative sequence-number implementation tied toOpenLDAP's syncrepl sequence-number (<strong>in</strong> trunk)17© May 3, 2005 Novell Inc.


Samba as File Server• Example: Federal M<strong>in</strong>istry of F<strong>in</strong>ance(Bundesm<strong>in</strong>isterium der F<strong>in</strong>anzen), Berl<strong>in</strong>• heavily SAN-based <strong>in</strong>frastructure (EMC Symetrix)• One redundant File-Server stor<strong>in</strong>g Home-Directoriesand Roam<strong>in</strong>g Profiles for approx. 2500 users for acouple of years now• To avoid undesired dependencies but to have at <strong>the</strong>same time a unified mapp<strong>in</strong>g: idmap_rid18© May 3, 2005 Novell Inc.


Migration


Migration - Example• Example: Ano<strong>the</strong>r German Government customer• Highly automated process to build and adm<strong>in</strong>istrate ahuge number of file- and pr<strong>in</strong>t servers (around 300)• Requirement for automated and unattended migrationfrom W<strong>in</strong>dows NT to Samba 3• Only a few adm<strong>in</strong>istrators with good Unix-KnowHow20© May 3, 2005 Novell Inc.


Migration• How can we achieve a transparent and completemigration from a W<strong>in</strong>dows Server to a Samba Server??21© May 3, 2005 Novell Inc.


Migrate – to what?• F<strong>in</strong>al migration goal: Samba Server should look like aclone of <strong>the</strong> W<strong>in</strong>dows Server(<strong>the</strong> fewer differences <strong>the</strong> better)• All security relevant permissions (ACLs) should reta<strong>in</strong><strong>the</strong>ir validity• Migration should not require any manual <strong>in</strong>terventionand must be scriptable (automated)22© May 3, 2005 Novell Inc.


Migrate – what and how?• What to migrate?• Shares (<strong>in</strong>cl. Share-ACls)• Files (<strong>in</strong>cl. ACLs, DOS Attributes, etc.)• Pr<strong>in</strong>ters (<strong>in</strong>cl. Drivers, Forms, Sett<strong>in</strong>gs, ACLs, etc.)• User- and Group-Accounts (<strong>in</strong>cl. aliases)• How to migrate? - Exist<strong>in</strong>g utilities:• Files: robocopy, scopy, xcopy, smbget, smbclient, cifsand smbfs kernel modules, etc.• Pr<strong>in</strong>ters: pr<strong>in</strong>tmig.exe• User- and Group-Accounts: net rpc vampire23© May 3, 2005 Novell Inc.


Migration - net• rpcclient is powerfull for pr<strong>in</strong>ter-adm<strong>in</strong>istration but isjust able to handle clear text data• net has been expanded to meet above requirements• New net-based migration utilities allow to do file- andpr<strong>in</strong>tserver-clon<strong>in</strong>g• recursively copy files <strong>in</strong>cl. security descriptors (ACLs),timestamps and DOS-attributes from one Fileserver toano<strong>the</strong>r• copy pr<strong>in</strong>ter-drivers, pr<strong>in</strong>ters, pr<strong>in</strong>ter-sett<strong>in</strong>gs, pr<strong>in</strong>tersecurity descriptors (ACLs) and pr<strong>in</strong>ter metadata fromone Pr<strong>in</strong>tserver to ano<strong>the</strong>r24© May 3, 2005 Novell Inc.


Migration - net• net migration suite• is <strong>in</strong>dependent from SMB-implementation of source ordest<strong>in</strong>ation servers• does not need to care about any implementation detailson <strong>the</strong> UNIX-side• can access all data that SMB- or MSRPC-client-calls canhandle• allow to migrate from Server A to Server B over Client C25© May 3, 2005 Novell Inc.


Migration – <strong>the</strong> net syntaxnet rpc share migrate files [share]net rpc share migrate shares ...net rpc share migrate all ...net rpc pr<strong>in</strong>ter migrate pr<strong>in</strong>ters [pr<strong>in</strong>ter]net rpc pr<strong>in</strong>ter migrate drivers ...net rpc pr<strong>in</strong>ter migrate security ...net rpc pr<strong>in</strong>ter migrate forms ...net rpc pr<strong>in</strong>ter migrate sett<strong>in</strong>gs ...net rpc pr<strong>in</strong>ter migrate all ...26© May 3, 2005 Novell Inc.


Migration – net examples●Migrate <strong>the</strong> pr<strong>in</strong>ter driver of pr<strong>in</strong>ter “hplaser” fromSRV1 to SRV2:net rpc pr<strong>in</strong>ter migrate drivers hplaser -S srv1 --dest<strong>in</strong>ation=srv2 -U adm<strong>in</strong>%pass●Migrate <strong>the</strong> share “myshare” from a W<strong>in</strong>2k PDC to <strong>the</strong>local Samba Server:net rpc share migrate all myshare-S w2kpdc -U adm<strong>in</strong>%pass –-acls –-attrs27© May 3, 2005 Novell Inc.


Conclusion


Conclusion• Samba 3 is - more than ever – gett<strong>in</strong>g <strong>in</strong>to good shapeto face <strong>Enterprise</strong> needs• Samba 3 is NOT (and will never be) an equivalent toW<strong>in</strong>dows 2003 Servers• (In-)famous POSIX-ACL-Mapp<strong>in</strong>g is still one of <strong>the</strong> ma<strong>in</strong>obstacles to deploy Samba <strong>in</strong> a lot of projects• Until Samba 4 is ready for production, <strong>the</strong> SambaTeam cont<strong>in</strong>ues Samba 3 development to achieveimproved quality, performance and scalability29© May 3, 2005 Novell Inc.


Thank you for your attention.gd@samba.org


General DisclaimerThis document is not to be construed as a promise by any participat<strong>in</strong>g company todevelop, deliver, or market a product. Novell, Inc., makes no representations orwarranties with respect to <strong>the</strong> contents of this document, and specifically disclaims anyexpress or implied warranties of merchantability or fitness for any particular purpose.Fur<strong>the</strong>r, Novell, Inc., reserves <strong>the</strong> right to revise this document and to make changes toits content, at any time, without obligation to notify any person or entity of suchrevisions or changes. All Novell marks referenced <strong>in</strong> this presentation are trademarks orregistered trademarks of Novell, Inc. <strong>in</strong> <strong>the</strong> United States and o<strong>the</strong>r countries. All thirdpartytrademarks are <strong>the</strong> property of <strong>the</strong>ir respective owners.No part of this work may be practiced, performed, copied, distributed, revised, modified,translated, abridged, condensed, expanded, collected, or adapted without <strong>the</strong> priorwritten consent of Novell, Inc. Any use or exploitation of this work without authorizationcould subject <strong>the</strong> perpetrator to crim<strong>in</strong>al and civil liability.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!