ARCHIVE
Mac OS X Server 1.x: Managing NFS Exports
This article has been archived and is no longer updated by Apple.
The icon for adding an NFS export directory is dimmed in the NetworkManager's File Sharing application. How can I manage NFS exports?
Products Affected
Mac OS X Server
Note: This article pertains to Mac OS X Server versions 1.x, which were released prior to May 2001.
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.
Managing NFS Exports With NetInfoManager.app
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:
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.
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:
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.
Managing NFS Exports With NetInfoManager.app
- 1. Start the NetInfoManager.app application. It will open up the local NetInfo database; you can verify this by looking at the title of the window--it should start with "local@ yourhostname..."
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:
- su root
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.
- cp ~/exportfile ~/exportfile.bkup
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" );
}
)
}
- niload -r /exports . < ~/exportfile
5. If something goes drastically wrong, restore the original exports:
- niload -r /exports . < ~/exportfile.bkup
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:
- kill -HUP `cat /var/run/mountd.pid
Rate this article: