autofsd-probe - Linux


Overview

autofsd-probe is a utility for testing the accessibility of NFS mounts configured in /etc/auto.master and /etc/auto.mnt. It’s primarily used by the automount daemon to verify mount points before mapping them.

Syntax

autofsd-probe [-D] [-d <debug level>] [-m <mount point>] [-R] [-t <timeout>] [-s] <device path>

Options/Flags

  • -D: Disable daemon mode (used for testing purposes).
  • -d : Set debug level (0-9, default: 1).
  • -m : Probe a specific mount point from /etc/auto.master.
  • -R: Probe in a recursive manner, i.e., descend into automount subdirectories.
  • -t : Set timeout for mount probe in seconds (default: 3).
  • -s: Print list of configured NFS mounts and exit.

Examples

Simple Probe:

autofsd-probe /net/server/shared

Probe a Specific Mount Point:

autofsd-probe -m /my/mountpoint

Recursive Probe with Debug:

autofsd-probe -R -d 5

Common Issues

  • Mount point not found: Ensure the mount point exists and is properly configured in /etc/auto.master.
  • NFS server not responding: Verify network connectivity and the NFS server is running.
  • Timeout exceeded: Increase the timeout using the -t option or check for network issues.

Integration

autofsd-probe can be used within scripts or command chains to automate mount point checks. For example, the following script:

#!/bin/bash

mount_points="/etc/auto.master"
for mount_point in $(cat "$mount_points"); do
  result=$(autofsd-probe -m "$mount_point")
  if [ "$result" != "0" ]; then
    echo "Mount point $mount_point not accessible!"
  fi
done

Related Commands

  • automount: The automount daemon responsible for managing auto-mounted NFS shares.
  • autofs: The Filesystem Hierarchy Standard (FHS) mount point for automounted filesystems.
  • nfsstat: A tool for displaying NFS statistics and monitoring NFS connections.