Subject: Re: mounting by wedge name
To: Jeff Rizzo <>
From: Thor Lancelot Simon <>
List: tech-userlevel
Date: 12/22/2007 23:59:45
On Sat, Dec 22, 2007 at 06:55:57PM -0800, Jeff Rizzo wrote:
> I've been working on various things lately to improve the state of
> wedges and wedge-related things - one of the (valid) complaints is that
> there is no way to 'nail down' wedge configuration currently.  With the
> attached patch, however, one can specify the wedge's *name* to mount
> from.  With the current DKWEDGE_AUTODISCOVER options, the name is set
> according to the underlying disk-labelling method:
> DKWEDGE_METHOD_GPT:  copied from the user-supplied label if it exists,
> the partition GUID if not
> DKWEDGE_METHOD_BSDLABEL:  set to the BSD disklabel partition name (e.g.
> "wd0a", "sd1g")
> DKWEDGE_METHOD_MBR: set to a bsd-style partition name beginning with the
> 'e' partition - up to 4 per disk (e.g., "wd0e" through "wd0h")
> This is sufficient to ensure you're mounting the partition you
> *intended* to mount.  Currently, the kernel requires manual intervention
> if it tries to configure two wedges with the name wname.

Yet this is likely to occur with some disks' default partitioning:
sysinst makes an MBR partition for NetBSD, and if you have two NetBSD
filesystems, the second one gets disklabel partition 'e'.  I think it
would really be much better to not use bsd-style partition names for
MBR partitions.

The prior art in both Solaris (System V in general, I think, actually)
and FreeBSD is to name these diskNsM where M is the MBR partition

>     - with this patch, wedge:/foo does not refer to an nfs mount.  :)

I hate to tell you this but I worked somewhere once that had an NFS
server named "wedge".  They may still (it was a film production
company and the machines were named after Star Wars characters. :-/).

The code looks pretty good, actually.