Subject: Re: RPC/mountd problems
To: None <tech-net@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/07/2004 12:52:47
>> Access checking is per-mountpoint on the server; you simply can't
>> get different access properties for different directory trees within
>> the same server-side mount point.
> Ugh-ugh.. Ok, i got it.  But what should i do if i need to host many
> projects on some server and export them with NFS ?  As minimum,
> different projects have different access rules.  Assigning one mount
> point per project isn't too good.  I can reach the limit of disklabel
> too fast, not mentioning the administrative nightmare..

NetBSD may not be the right choice for your NFS server, then.

If you still want to use it...well, the administrative nightmare I
can't speak to.  But there is a technical solution that allows you to
assign one mount point per project even if there are more than the
disklabel can handle.

Instead of assigning (say) a 30M partition to project A and 40M
partition to project B, make one partition to hold all the projects.
Then make a 30M file in it for project A and vnconfig vnd0 to that
file.  Give vnd0 a disklabel that makes one partition cover the whole
disk (or just use its c partition, or d on i386).  newfs it and mount
it; there's project A.  Repeat with a 40M file and vnd1 for project B.

You'll need a kernel with lots of vnds, and you'll lose a little disk
space to filesystem overhead (though this can be reduced by using a
high bytes-per-inode figure on the real disk's filesystem).  You'll
also need to organize your startup script carefully to get everything
done in the right order.  But it'll give you one mount point per
project, even if there are dozens of them.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B