http://wiki.linux-nfs.org/wiki/index.php?title=FedFsInstallNsdbAdministrator0.9&feed=atom&action=historyFedFsInstallNsdbAdministrator0.9 - Revision history2024-03-28T20:14:57ZRevision history for this page on the wikiMediaWiki 1.16.5http://wiki.linux-nfs.org/wiki/index.php?title=FedFsInstallNsdbAdministrator0.9&diff=5299&oldid=prevChucklever at 21:22, 9 January 20132013-01-09T21:22:38Z<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 21:22, 9 January 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Introduction ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Introduction ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>A <del class="diffchange diffchange-inline">''</del>[[FedFsGlossary#Namespace_Database|Namespace Database]]<del class="diffchange diffchange-inline">''</del>, or NSDB, is the repository for fileset location information in a <del class="diffchange diffchange-inline">''</del>[[FedFsGlossary#FedFs_Domain|FedFS domain]]<del class="diffchange diffchange-inline">''</del>. At its core, an NSDB is simply an LDAP server with an NSDB Container Entry, or NCE, for short. FedFS data is stored as children of this entry.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>A [[FedFsGlossary#Namespace_Database|Namespace Database]], or NSDB, is the repository for fileset location information in a [[FedFsGlossary#FedFs_Domain|FedFS domain]]. At its core, an NSDB is simply an LDAP server with an <ins class="diffchange diffchange-inline">[[FedFsGlossary#NSDB_Container_entry|</ins>NSDB Container Entry<ins class="diffchange diffchange-inline">]]</ins>, or NCE, for short. FedFS data is stored as children of this entry.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>In this article, we introduce several simple command line tools that can be used to manage and troubleshoot an NSDB.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>In this article, we introduce several simple command line tools that can be used to manage and troubleshoot an NSDB.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>== <del class="diffchange diffchange-inline">Install the NSDB admin tools </del>==</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>== <ins class="diffchange diffchange-inline">Simple queries </ins>==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">If you are running Fedora 19</del>, <del class="diffchange diffchange-inline">you </del>can <del class="diffchange diffchange-inline">install a packaged version of fedfs-utils-0</del>.<del class="diffchange diffchange-inline">9</del>. <del class="diffchange diffchange-inline"> On other distributions</del>, <del class="diffchange diffchange-inline">build </del>fedfs<del class="diffchange diffchange-inline">-utils from scratch</del>. </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">First</ins>, <ins class="diffchange diffchange-inline">create an entry for your NSDB in your admin host's NSDB connection parameters database. Support your NSDB </ins>can <ins class="diffchange diffchange-inline">be contacted at ldap</ins>.<ins class="diffchange diffchange-inline">example</ins>.<ins class="diffchange diffchange-inline">net:389</ins>, <ins class="diffchange diffchange-inline">and the distinguished name of the NSDB Container Entry is "ou=</ins>fedfs<ins class="diffchange diffchange-inline">,dc=example,dc=net"</ins>. <ins class="diffchange diffchange-inline"> Then:</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>=<del class="diffchange diffchange-inline">== Pre</del>-<del class="diffchange diffchange-inline">packaged install </del>===</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> # nsdbparams update -D cn</ins>=<ins class="diffchange diffchange-inline">Manager </ins>-<ins class="diffchange diffchange-inline">e ou</ins>=<ins class="diffchange diffchange-inline">fedfs,dc</ins>=<ins class="diffchange diffchange-inline">example,dc</ins>=<ins class="diffchange diffchange-inline">net ldap.example.net</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">On Fedora 19 hosts where it is secure to run administrative commands</del>, <del class="diffchange diffchange-inline">install </del>the NSDB <del class="diffchange diffchange-inline">tools </del>with <del class="diffchange diffchange-inline">this command:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">The NSDB hostname and port are almost always a parameter of each NSDB admin tool. To save yourself some typing</ins>, <ins class="diffchange diffchange-inline">you can set up environment variables containing the hostname and port of </ins>the NSDB <ins class="diffchange diffchange-inline">you'll be working </ins>with<ins class="diffchange diffchange-inline">.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> <del class="diffchange diffchange-inline"># yum install fedfs-utils-admin</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> <ins class="diffchange diffchange-inline">$ export FEDFS_NSDB_HOST="ldap.example.net"</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">=== Build from scratch ===</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">By default, the standard LDAP port is assumed, so nothing else needs to be done. But if your NSDB uses port 636, for example, you could use something like this:</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">Unpack the fedfs-utils-0.9 tarball somewhere convenient, and build the package:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> $ export FEDFS_NSDB_PORT=636</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ cd fedfs-utils-0.9</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">Now, assuming you've already configured it, see if your NSDB is listening:</ins></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ ./configure</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ make</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">To install the NSDB admin tools:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> $ nsdb-nces</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> <del class="diffchange diffchange-inline"># (cd fedfs</del>-<del class="diffchange diffchange-inline">utils</del>-<del class="diffchange diffchange-inline">0</del>.<del class="diffchange diffchange-inline">9/src/nsdbc ; make install)</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">This command should tell you which naming contexts on your NSDB host an NSDB Container Entry. </ins> <ins class="diffchange diffchange-inline">You should see the NCE you may have created earlier with the nsdb</ins>-<ins class="diffchange diffchange-inline">simple</ins>-<ins class="diffchange diffchange-inline">nces command</ins>. <ins class="diffchange diffchange-inline"> There are probably no FedFS records yet, but you can confirm that with:</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">And install the nsdbparams command:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> $ nsdb-list</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # (cd fedfs-utils-0.9/src/nsdbparams ; make install)</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">== Resolving FSNs ==</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">== Initial NSDB configuration ==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">The "nsdb-list" command displays a list of Fileset Names (FSNs). These represent filesets. Each replica of a fileset is represented by the children FSLs also listed.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">This step is taken care of if you followed the directions for setting up a dedicated LDAP server </del>as an <del class="diffchange diffchange-inline">NSDB. However, if you want to set up a pre-existing LDAP server for use as an NSDB, you can follow these steps. Suppose the existing LDAP server is at ldap.example.net, and you'd like to keep FedFS data under </del>the <del class="diffchange diffchange-inline">DN </del>"<del class="diffchange diffchange-inline">ou=fedfs,dc=example,dc=net</del>" . <del class="diffchange diffchange-inline">You know the admin DN for this server (let's say it's cn=Manager, and the admin password.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">You can examine one FSN more closely by copying its UUID from this list and using it </ins>as an <ins class="diffchange diffchange-inline">argument of </ins>the "<ins class="diffchange diffchange-inline">nsdb-resolve-fsn</ins>" <ins class="diffchange diffchange-inline">command</ins>. <ins class="diffchange diffchange-inline">For example:</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">First, create an entry for the new NSDB in your admin host's NSDB connection parameters database:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> $ nsdb-resolve-fsn b0f5d578-1e13-11e2-a64a-000c296d4dd3</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # nsdbparams update -D cn=Manager -e ou=fedfs,dc=example,dc=net ldap.example.net</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>You can <ins class="diffchange diffchange-inline">adjust </ins>the <ins class="diffchange diffchange-inline">information in the children FSLs using </ins>the "nsdb-<ins class="diffchange diffchange-inline">update</ins>-<ins class="diffchange diffchange-inline">fsl" </ins>command. <ins class="diffchange diffchange-inline">See its man page for details</ins>.</div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">Now you are ready to create the NCE.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ nsdb-simple-nce -l ldap.example.net</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>You<del class="diffchange diffchange-inline">'ll be asked for the LDAP server's admin password.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">== Simple queries ==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The NSDB hostname is almost always a parameter of each NSDB admin tool. To save yourself some typing, you </del>can <del class="diffchange diffchange-inline">set up an environment variable containing </del>the <del class="diffchange diffchange-inline">name of </del>the <del class="diffchange diffchange-inline">NSDB you'll be working with.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ export FEDFS_NSDB_HOST=</del>"<del class="diffchange diffchange-inline">ldap.example.net"</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">Now, see if your </del>nsdb-<del class="diffchange diffchange-inline">simple</del>-<del class="diffchange diffchange-inline">nce </del>command <del class="diffchange diffchange-inline">worked:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ nsdb-nces</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">This command should tell you which naming contexts host an NCE</del>. <del class="diffchange diffchange-inline">You should see the NCE you created above</del>. <del class="diffchange diffchange-inline"> There should be no FedFS records yet, but you can confirm that with:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> $ nsdb-list</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
</table>Chuckleverhttp://wiki.linux-nfs.org/wiki/index.php?title=FedFsInstallNsdbAdministrator0.9&diff=5031&oldid=prevChucklever: Created page with "== Project: fedfs-utils == [ Project Home | News | Downloads | Docs | [[FedFsUtilsMailingList..."2012-10-19T23:16:41Z<p>Created page with "== Project: fedfs-utils == [ <a href="/wiki/index.php/FedFsUtilsProject" title="FedFsUtilsProject">Project Home</a> | <a href="/wiki/index.php/FedFsUtilsNews" title="FedFsUtilsNews">News</a> | <a href="/wiki/index.php/FedFsUtilsDownloads" title="FedFsUtilsDownloads">Downloads</a> | <a href="/wiki/index.php/FedFsUtilsDocs" title="FedFsUtilsDocs">Docs</a> | [[FedFsUtilsMailingList..."</p>
<p><b>New page</b></p><div>== Project: fedfs-utils == <br />
[<br />
[[FedFsUtilsProject|Project Home]] |<br />
[[FedFsUtilsNews|News]] |<br />
[[FedFsUtilsDownloads|Downloads]] |<br />
[[FedFsUtilsDocs|Docs]] |<br />
[[FedFsUtilsMailingLists|Mailing Lists]] |<br />
[[FedFsUtilsSourceControl|Source Control]] |<br />
[[FedFsUtilsIssues|Issues]]<br />
]<br />
----<br />
<br />
== Introduction ==<br />
<br />
A ''[[FedFsGlossary#Namespace_Database|Namespace Database]]'', or NSDB, is the repository for fileset location information in a ''[[FedFsGlossary#FedFs_Domain|FedFS domain]]''. At its core, an NSDB is simply an LDAP server with an NSDB Container Entry, or NCE, for short. FedFS data is stored as children of this entry.<br />
<br />
In this article, we introduce several simple command line tools that can be used to manage and troubleshoot an NSDB.<br />
<br />
== Install the NSDB admin tools ==<br />
<br />
If you are running Fedora 19, you can install a packaged version of fedfs-utils-0.9. On other distributions, build fedfs-utils from scratch. <br />
<br />
=== Pre-packaged install ===<br />
<br />
On Fedora 19 hosts where it is secure to run administrative commands, install the NSDB tools with this command:<br />
<br />
# yum install fedfs-utils-admin<br />
<br />
=== Build from scratch ===<br />
<br />
Unpack the fedfs-utils-0.9 tarball somewhere convenient, and build the package:<br />
<br />
$ cd fedfs-utils-0.9<br />
$ ./configure<br />
$ make<br />
<br />
To install the NSDB admin tools:<br />
<br />
# (cd fedfs-utils-0.9/src/nsdbc ; make install)<br />
<br />
And install the nsdbparams command:<br />
<br />
# (cd fedfs-utils-0.9/src/nsdbparams ; make install)<br />
<br />
== Initial NSDB configuration ==<br />
<br />
This step is taken care of if you followed the directions for setting up a dedicated LDAP server as an NSDB. However, if you want to set up a pre-existing LDAP server for use as an NSDB, you can follow these steps. Suppose the existing LDAP server is at ldap.example.net, and you'd like to keep FedFS data under the DN "ou=fedfs,dc=example,dc=net" . You know the admin DN for this server (let's say it's cn=Manager, and the admin password.<br />
<br />
First, create an entry for the new NSDB in your admin host's NSDB connection parameters database:<br />
<br />
# nsdbparams update -D cn=Manager -e ou=fedfs,dc=example,dc=net ldap.example.net<br />
<br />
Now you are ready to create the NCE.<br />
<br />
$ nsdb-simple-nce -l ldap.example.net<br />
<br />
You'll be asked for the LDAP server's admin password.<br />
<br />
== Simple queries ==<br />
<br />
The NSDB hostname is almost always a parameter of each NSDB admin tool. To save yourself some typing, you can set up an environment variable containing the name of the NSDB you'll be working with.<br />
<br />
$ export FEDFS_NSDB_HOST="ldap.example.net"<br />
<br />
Now, see if your nsdb-simple-nce command worked:<br />
<br />
$ nsdb-nces<br />
<br />
This command should tell you which naming contexts host an NCE. You should see the NCE you created above. There should be no FedFS records yet, but you can confirm that with:<br />
<br />
$ nsdb-list</div>Chucklever