Frequently Asked Question

Slow Mounts
Last Updated 20 days ago

Slow Mounts

To resolve slow mounts in Proxmox or similar Linux systems, you can modify the /etc/fstab file to increase the timeout for mounting filesystems. This is particularly useful when dealing with network-attached storage (NFS), slow disks, or devices that take longer than the default 30 seconds to become available.

Step-by-step: Modify /etc/fstab to Extend Mount Time

  1. Identify the Mount Entry
     sudo nano /etc/fstab
  • Open the /etc/fstab file in a text editor:
  • Locate the line corresponding to the slow-mounting volume (e.g., an NFS share, LVM volume, or external drive).
  1. Add or Modify Mount Options
  • The key options to adjust are:
  • timeout= – sets the time (in seconds) to wait before giving up on a mount.
  • retry= – specifies how many times to retry mounting.
  • x-systemd.requires= – ensures the mount is only attempted after dependencies are ready.
  • x-systemd.mount-timeout= – sets a timeout for systemd to complete the mount.

Example entry with extended timeout:

   /dev/sdb1 /mnt/data ext4 defaults,timeout=60,retry=5 0 0

Or for NFS:

   192.168.1.10:/share /mnt/nfs nfs defaults,timeout=60,retry=5 0 0
  1. Use systemd-specific Options (Recommended for Proxmox)
     /dev/sdb1 /mnt/data ext4 defaults,x-systemd.mount-timeout=60,x-systemd.requires=network.target 0 0
  • Proxmox uses systemd for mount management. To ensure proper handling, use x-systemd. options:
  • This tells systemd to wait up to 60 seconds for the device to be ready and ensures network is up before attempting the mount.
  1. Test the Changes
     sudo mount -a
  • Run a dry test to check for syntax errors:
  • If no errors appear, the configuration is valid.
  1. Reboot or Remount
     sudo reboot
     sudo umount /mnt/data
     sudo mount /mnt/data
  • Reboot the system to test the new mount behavior:
  • Alternatively, remount the volume:
  1. Verify Mount Behavior
     mount | grep data
     journalctl -u systemd-fsck-root.service | tail -20
  • Check the status of the mount:
  • Monitor logs for any mount delays:

Additional Tips

  /dev/sdb1 /mnt/data ext4 defaults,nofail,x-systemd.mount-timeout=60 0 0
  x-systemd.requires=network.target
  /dev/sdb1 /mnt/data ext4 defaults,x-systemd.automount,x-systemd.mount-timeout=60 0 0
  • Use nofail if the device is optional and you don’t want boot to fail if it’s unavailable:
  • Check for network delays if using NFS or iSCSI. Ensure the network interface is up before mounting:
  • Use x-systemd.automount for on-demand mounting (only mounts when accessed):

Final Notes

  sudo cp /etc/fstab /etc/fstab.backup
  • Always back up /etc/fstab before editing:
  • If the system fails to boot due to a slow mount, use emergency mode or boot into a live environment to fix the file.

These changes ensure that your system waits longer for slow storage devices to become available, reducing the risk of boot failures or unresponsive services.

This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...