md device backing files on nfs mounts?
freebsd-questions-local at be-well.ilk.org
Thu Oct 6 10:18:56 PDT 2005
"Chad Leigh -- Shire.Net LLC" <chad at shire.net> writes:
> On Oct 6, 2005, at 10:51 AM, Lowell Gilbert wrote:
> > "Chad Leigh -- Shire.Net LLC" <chad at shire.net> writes:
> >> Can the files that back an md device be resident on an nfs mount?
> >> I run some jails with each having its own root based on an md
> >> device.
> >> I am thinking of having a backend nfs server have all the storage
> >> and
> >> serve it to various front end servers. If one front end server went
> >> down I could easily bring it up on another one. Kind of poor-man's
> >> redundancy
> > How do you get the NFS mount before you have a root?
> Just the jails would be on md devices on the nfs mounted filesystem.
> Ie, main computer boots normally, mounts nfs filesystem, then mounts
> md devices backed by files on the nfs fielsystem
Yes, okay, that seems obvious now. Maybe I need more caffeine.
I just tried it without the jails and was able to mount and use the
filesystem. The permissions *are* a little tricky, because root is
(as usual) mapped to nobody on my NFS mounts, and needs write access
on the backing file.
I did the procedure from the last example in the mdconfig(8) manual,
and it worked just like on a local disk. There might have been some
anomalies with the output of ls(1), but I can't reproduce those now.
You might want to try measuring performance if you implement this; it
could have some strange interactions with VM and buffering.
Clever idea, by the way.
> > Also, I suspect the permissions might be a little tricky...
> > Some kind of netbooting might work.
Lowell Gilbert, embedded/networking software engineer, Boston area
More information about the freebsd-questions