Troubleshooting NFS Export Error: “exportfs: Warning: /home/user/share does not support NFS export” on Ubuntu 10.04 with ext4


2 views

When attempting to export a directory via NFS on Ubuntu 10.04 using the command exportfs -r, you encounter the warning:

exportfs: Warning: /home/user/share does not support NFS export

This occurs despite having a valid entry in /etc/exports:

/home/user/share 192.168.1.3(rw,no_subtree_check)

Several factors can cause this warning:

  • The filesystem type (ext4 in this case)
  • Mount options of the filesystem
  • NFS server configuration
  • Filesystem permissions

For ext4 filesystems, ensure proper mount options are set. Check current mount options:

mount | grep /home/user/share

If needed, remount with NFS-compatible options in /etc/fstab:

/dev/sdX /home/user/share ext4 defaults,nodev,nosuid 0 2

Ensure NFS services are properly configured and running:

sudo service nfs-kernel-server status
sudo service portmap status

Restart services if necessary:

sudo service portmap restart
sudo service nfs-kernel-server restart

Verify directory permissions and ownership:

ls -ld /home/user/share
ls -l /home/user/share

Adjust permissions if needed:

sudo chmod 755 /home/user/share
sudo chown user:user /home/user/share

If the issue persists, consider:

  1. Creating a dedicated partition for NFS exports
  2. Using a different filesystem (e.g., XFS or ext3) for shared directories
  3. Checking kernel NFS server support:
cat /proc/fs/nfsd/versions

Use verbose mode for more detailed error information:

exportfs -v -r

Check system logs for additional clues:

tail -f /var/log/syslog

After making changes, verify exports:

showmount -e localhost

And test the mount from client:

mount -t nfs server:/home/user/share /mnt/test

When attempting to export an ext4 filesystem directory via NFS on Ubuntu 10.04, many administrators encounter this frustrating warning:

exportfs: Warning: /home/user/share does not support NFS export

The error occurs despite having a properly formatted /etc/exports entry:

/home/user/share 192.168.1.3(rw,no_subtree_check)

While ext4 itself supports NFS exports, several factors can trigger this warning:

# Check filesystem features
sudo tune2fs -l /dev/sdX | grep features

Common problematic features include:

- ext_attr
- large_file
- huge_file
- dir_nlink
- extent

Try these troubleshooting steps in order:

# 1. Verify NFS server status
sudo service nfs-kernel-server status

# 2. Check kernel NFS support
cat /proc/filesystems | grep nfs

# 3. Remount with explicit NFS export flags
sudo mount -o remount,noload /home/user/share

For stubborn cases, modify your /etc/exports with additional parameters:

/home/user/share 192.168.1.3(rw,no_subtree_check,fsid=0,insecure)

Then force-reload the exports:

sudo exportfs -ra
sudo service nfs-kernel-server restart

When all else fails, consider these workarounds:

  1. Create a dedicated partition formatted with XFS (better NFS compatibility)
  2. Use bind mounts to expose the directory through a different path
# Bind mount example
sudo mkdir /export/share
sudo mount --bind /home/user/share /export/share