Skip to content

How to set up an NFS server on a node in a kind cluster with overlayfs? #3842

@ace0527

Description

@ace0527

I created a local kind cluster with two nodes on my macOS. I want to use one of the nodes (named as worker1) as an NFS server. On worker1, I installed the NFS-related components:

ii  libnfsidmap1:amd64            1:2.6.2-4+deb12u1              amd64        NFS idmapping library
ii  nfs-common                    1:2.6.2-4+deb12u1              amd64        NFS support files common to client and server
ii  nfs-kernel-server             1:2.6.2-4+deb12u1   

Then I exported the /mnt/nfs directory as an NFS directory:

# mkdir -p /mnt/nfs
# echo '/mnt/nfs *(rw,sync,no_subtree_check)' >> /etc/exports
# exportfs -a

However, I encountered an error when executing exportfs -a: the /mnt/nfs directory does not support NFS export.

exportfs: /mnt/nfs does not support NFS export

I found some information from internet indicating that NFS does not support the overlay file system, so I checked the file system type of the /mnt/nfs directory:

df -T /mnt/nfs
Filesystem     Type    1K-blocks     Used Available Use% Mounted on
overlay        overlay  61202244 23181440  34879480  40% /

It seems that the /mnt/nfs directory does not support NFS because its file system type is overlay.
So my questions are:

  1. I don't know why the file system type of the /mnt/nfs directory is overlay. Does this have something to do with Docker's mechanism or the fact that I am using macOS?
  2. As for the solution, is it enough to change the file system type of the /mnt/nfs directory to a type that NFS supports? How can I change the file system type of /mnt/nfs?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions