exportd - Linux


Overview

exportd is a command-line utility designed to manage NFS exports on Linux systems. It allows administrators to configure, manage, and troubleshoot NFS exports, ensuring secure and efficient access to shared file systems over the network.

Syntax

exportd [options] [nfs-path]...

Options/Flags

  • -a, –add: Append new export entries to the NFS exports file.
  • -d, –delete: Delete existing export entries from the NFS exports file.
  • -m, –modify: Modify existing export entries in the NFS exports file.
  • -l, –list: List all current NFS exports.
  • -o, –options: Specify options for the export entry (e.g., ro, rw, all_squash).
  • -f, –file: Specify a custom NFS exports file to use.
  • -s, –status: Display the status of all active NFS exports.
  • -h, –help: Display this help message.

Examples

Add a new export entry:

exportd -a /share rw,sync,no_root_squash,fsid=1

Modify an existing export entry:

exportd -m /share -o rw,sync

Delete an export entry:

exportd -d /share

List all current exports:

exportd -l

Display status of active exports:

exportd -s

Common Issues

  • Permission denied: Ensure the user running exportd has sufficient permissions to modify the NFS exports file.
  • File system not found: Verify that the specified file system exists and is exported in /etc/exports.
  • Syntax error: Check the syntax of the export entry for any errors or typos.

Integration

Combining with NFS:

mkdir /share
mount <NFS_server>:/nfs_export /share
exportd -a /share rw,sync,no_root_squash,fsid=1

Using with awk:

exportd -l | awk '{print $1}'

Related Commands

  • nfsd: NFS server daemon
  • showmount: Display mounted NFS file systems
  • nfsstat: Display NFS server statistics