2

So I've got two systems, lucyvanpelt and schroeder.

lucyvanpelt's /home is exported read-write to schroeder via NFS. Its location on schroeder is /mnt/home/lucyvanpelt

I want to union-mount it with schroeder's home, so I do as follows:

mount -t aufs -o br:/mnt/home/lucyvanpelt:/home none /home

It works just fine, except:

mount: block device none is write-protected, mounting read-only

And I'm not sure what to do about this. Like I said, the NFS export from lucyvanpelt is read-write (I have triple-checked this, though I don't know if it'd be relevant if it weren't).

  • What does the dmesg say after you mount it ? – neuron Aug 12 '15 at 16:09
  • aufs au_wh_init:502:mount[840]: an error(-13) on the writable branch /(nfs) – Steely Dan Aug 12 '15 at 17:55
2

In an aufs union-mount, a branch and the mountpoint cannot be the same. Use this:

mount -t aufs -o dirs=/mnt/home/lucyvanpelt=rw:/home/schroeder=ro none /path/to/mountpoint

Normally if you want to merge 2 directories, you have to specify what should happen if something is written on it. As you can see, you can specify each branch with rw (readwrite) or ro (readonly).

In the example above, when you write something in /path/to/mountpoint, that will be written on the branch /mnt/home/lucyvanpelt, which is readwrite. This directory is overlays the other one.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.