Messages in this thread | | | From | Neil Brown <> | Date | Mon, 21 Aug 2006 12:29:46 +1000 | Subject | Re: [NFS] NFS and partitioned md |
| |
On Thursday July 20, frankvm@frankvm.com wrote: > On Thu, Jul 20, 2006 at 10:30:01AM +1000, Neil Brown wrote: > > On Tuesday July 18, bugtraq@smoula.net wrote: > > > Hi, > > > > > > my solution was to use fsid parameter for exports... maybe some other > > > mechanism for selecting fsids could be created instead of fsid = device > > > minor > > > > Yes. Better management of fsid is on my wishlist for nfs-utils. > > Unfortunately I haven't had any really clever ideas yet. > > I'd like to "virtualize" exports such that it is possible to transplant > disks/partitions from one machine into another without having to bother > with device numbering. One step in that direction is to derive the fsid > from an IP address. The server machine needs an additional IP address > for every export entry. This IP address is determined by deriving > a hostname from the last pathname component of the export entry and > resolving it. E.g. something like: > > /etc/exports: > /exported/path/name *(rw,sync,no_root_squash,no_subtree_check,fsid="nfs-%s") > > This would set the fsid to the IP address of host "nfs-name".
(I'm catching up on only mail - seems I missed this...)
I think that is very specific to your particular setup, but there certainly is bits of a possibly usable idea in there.
As the fsid is limited in size, we really need some sort of lookup table somewhere to make between fsid and some arbitrary name for the filesystem. You are suggesting using the DNS for this lookup. Maybe that make sense..... maybe.
My leaning is to make it somebody-elses-problem by enabling a call-out.
i.e. we declare a program that will be used for mapping between fsid and mount point.
So: when parsing /etc/exports, if we find "fsid=??", we run the program passing the path get an fsid. When we get a filehandle with an unknown fsid, we pass it to the program which will return a pathname (possible auto-mounting something or whatever).
You could quite easily make a script that does the mapping you require.
Maybe one day...
NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |