TOPIC The icon for adding an NFS export directory is dimmed in the NetworkManager's File Sharing application. How can I manage NFS exports? DISCUSSION
Here are two ways to manually manage NFS exports without running NetworkManager. Both involve directly storing values into the /exports directory of your local NetInfo database.
2. In the directory browser area, click on the exports directory. This should display the current exports, if any, in the rightmost column. 3. To add a new export, select the "New Subdirectory" command under the Directory menu. It will create a directory named " new_directory ". You may be prompted for root password here. 4. Rename the " new_directory " to the path of the UFS directory you want to export. To do this, double-click on the "Value(s)" field corresponding to the "name" property, and type in the new path. 5. Add a "clients" property. To do this, select an existing property and select the "New Property" command under the Directory menu. Give it a name of "clients", and give it a name of "clients", and give it a list of values of client machine you want to export the directory to by selecting the "New value" from the Directory menu. 6. Add an "opts" property. For details on the values, see the man page for exports(5). 7. Do a save from NetinfoManager.app. 8. Restart the server. (Alternatively, if you feel lucky, use Terminal.app to start 'mountd' if it's not running, or send it a SIGHUP if it is by typing the following command: kill -HUP `cat /var/run/mountd.pid Managing NFS Exports using nidump/niload To manually add a new exported directory, you can use the 'nidump' and 'niload' command line utilities as follows: 1. Start the Terminal application; all this will be done as root. 2. Dump the existing exports, if any, to a file. Start the Terminal application. Type the following commands at the prompt:
nidump -r /exports . > ~/exportfile This places a list of all the existing exports in a file, using a property-list notation. 3. Edit the file to add new exports or modify existing exports.
open ~/exportfile
"name" = ( "exports" ); CHILDREN = ( { "clients" = ( "17.221.1.2", "hosta", "hostb" ); "name" = ( "/exportdir1" ); "opts" = ( "maproot=root" ); }, { "clients" = ( "17.221.1.2", "hosta", "hostb" ); "name" = ( "/exportdir2" ); "opts" = ( "ro", "maproot=root" ); } ) }
5. If something goes drastically wrong, restore the original exports:
6. Restart the server. (Alternatively, if you feel lucky, use Terminal.app to start 'mountd' if it's not running, or send it a SIGHUP if it is by typing the following command:
|
Document Information | |
Product Area: | Mac OS System Software |
Category: | Mac OS X Server |
Sub Category: | Apple File Services |
Copyright © 2000 Apple Computer, Inc. All rights reserved.