Here's the problem: I wanted to create a file share between my laptop and my pc at home so that I have access to my files from both machines. The laptop
is the server (as I might need the files when on the move) and the pc
is the client.
Here's my attempt at a solution: having linux (debian) on both machines, I decided to use NFS. Everything worked fine until I rebooted both machines and I ran into a catch-22. Ideally, I wanted the server to automatically mount the NFS, so I added a line in /etc/fstab
. Although, after rebooting the server, I noticed that I had to re-run exportfs -a
to re-load my /etc/exports
, which looks like this:
/nfs pc(rw,sync,no_subtree_check)
In order to do this, though, pc
had to be reachable, otherwise I got this error upon
exportfs: failed to resolve pc
So, if pc
had to be reachable before laptop
was on, it defies the point of having a /etc/fstab
for pc
, unless I expected very few re-boots of laptop
, which is not my case.
In short: pc
wants laptop
to be reachable to mount the NFS automatically via fstab, while laptop
wants pc
to be reachable in order to assign the correct permissions in exports. Is there a way to run exportfs -a
at startup for laptop
without having to have pc
on?