I'm creating a kubernetes cluster with 1 desktop pc and 3 raspberry pi4.

The desktop PC is set as master node and NFS server.

Each RPi4 has two USB keys:

  • Ubuntu 21.04 Server on 32GB key
  • Storage on 256 GB key

I want to mount a NFS directory on boot on the 256GB

My /etc/fstab file looks like this

LABEL=writable                                  /               ext4    discard,errors=remount-ro   0    1
LABEL=system-boot                               /boot/firmware  vfat    defaults                    0    1
UUID=2867ec74-ba7c-490c-87ed-096e029f2147       /storage        ext4    defaults                    0    2                 /storage        nfs     defaults                    0    0

Each node has its own directory node1, node2, node3.

The problem here is the mounting of NFS works if I set local path to /mnt but doesn't work on start when I set it to /storage

This command works sudo mount /storage but the directory is not mounted on boot.

My theory is on startup, it doesn't have time to mount NFS because the USB storage is not mounted when command is executed.

Can someone confirm ? If so, does someone have a solution ?

I tried to mount it using cron but it doesn't work.

  • You appear to be attempting to mount 2 devices at the same mount point - which is impossible. – Milliways May 21 at 22:59
  • It works when I do it manually sudo mount /storage – T00rk May 21 at 23:07
  • Another question. Let's say my NFS directory is 500GB, what happens if I mount it on a 32GB USB Key ? – T00rk May 21 at 23:09
  • nothing unusual happens ... you still can't mount two devices to the same mount point - which device do you expect to see in your setup - hint: it'll be the first one – Jaromanda X May 21 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.