使用 fstab 在集群中的树莓派上通过 NFS 自动挂载 ext4 格式拇指驱动器在重新启动时失败

问题描述 投票:0回答:1

我正在尝试使用

fstab
将 NFS 拇指驱动器自动挂载(重新启动时)到集群中的另一个树莓派上。

我已经尝试了所有关于如何使用

fstab

在重新启动时自动挂载 NFS 驱动器的解决方案
  1. https://askubuntu.com/questions/1347996/rpi4-ubuntu-20-04-2-lts-nfs-drive-not-mounting-on-boot
  • systemctl enable NetworkManager-wait-online.service
  • x-systemd.automount
  • x-systemd.mount-timeout=5
  • x-systemd.device-timeout=5
  1. https://askubuntu.com/questions/1405231/unable-to-mount-nfs-on-ubuntu-22-04
  • auto,vers=3
  • _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min

但它们都不会在重启后自动挂载 nfs 驱动器。重启后我必须使用

mount -a

我在所有树莓派上使用以下发行版:

Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

当前

fstab
条目

rpi1:/home/pi/cloud /home/pi/cloud nfs noauto,x-systemd.automount,x-systemd.mount-timeout=5,_netdev 0 0

raspberry-pi debian mount nfs reboot
1个回答
0
投票

最简单且无麻烦的解决方案是在客户端上安装

nfs-common
包。

© www.soinside.com 2019 - 2024. All rights reserved.