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
- Identify the Mount Entry
sudo nano /etc/fstab
- Open the
/etc/fstabfile in a text editor: - Locate the line corresponding to the slow-mounting volume (e.g., an NFS share, LVM volume, or external drive).
- 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
- 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
systemdfor mount management. To ensure proper handling, usex-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.
- Test the Changes
sudo mount -a
- Run a dry test to check for syntax errors:
- If no errors appear, the configuration is valid.
- 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:
- 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
nofailif 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.automountfor on-demand mounting (only mounts when accessed):
Final Notes
sudo cp /etc/fstab /etc/fstab.backup
- Always back up
/etc/fstabbefore editing: - If the system fails to boot due to a slow mount, use
emergencymode 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.
