Search code examples
linuxmountnfs

Export rootfs or tmpfs


Is it possible to export (for nfs mounting) tmpfs or rootfs directories? I have many linux nodes which are booted into a ram based filesystem with just rootfs and tmpfs. I want each node to see some files in the other nodes, so I am trying to export some directory and trying to mount on another node. I see the following error in /var/log/messages of the nfs server - rpc.mountd: getfh failed: No such file or directory

I have read that one cannot export tmpfs. Is the same true for rootfs? What options do I have?


Solution

  • rootfs is ramfs or tmpfs, depending on kernel version and configuration.

    ramfs can't be exported over NFS. However, exporting tmpfs over NFS works for me, and should: it's been in mainline for years. 91828a405ae454a9503c41a7744f6ff877a80714.