On my headless NAS I have sdf1 (a flash-card) mounted as / while /home is mounted from lv00 (an LVM volume backed by a software RAID). To be able to access the machine when the RAID fails, I have a copy of my ssh public key, etc. in /home/foo/.ssh on the file-system from sdf1.
To update the files that are hidden by the mounted /home I normally remount lv00 in /mnt/home, do what I have to do, and then move lv00 back in place.
Is there a way to achieve this without unmounting /home?
|
|
||||
|
|
As long as you use |
|||||
|
|
You can move the mount to a new location without unmounting it, using
|
|||
|
|
I've tried to achieve something similar, but ephemient's answer didn't explain the semantics of the method. It failed for me and so I asked virtually the same question earlier here on unix.SE. After a comment I figured it out on my own and answered it. This is an edited version of my answer to fit into this context here. I removed my other question (and answer) in favor of this one. Here's what I was trying to do: Example caseMounts:
After mounting When it succeeds, how can I access the original contents of SolutionBased on a comment by Patrick's comment on my question and the solution by ephemient (accepted answer here), I came up with the following. It is apparently possible to
(i.e. mount the already bind-mounted locations elsewhere) I had to:
So this is what Patrick meant in his comment
As long as you have a parent folder to the bind-mounted location available, it'll work, albeit with one indirection as shown above. If you bind-mounted something over |
|||
|
|