Geom_label and multiple devices

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Mar 28 12:48:48 UTC 2007


On Wed, Mar 28, 2007 at 07:32:53AM -0500, Eric Anderson wrote:
> On 03/28/07 05:39, Ivan Voras wrote:
> >I've just thought of something - the situation where geom_label detects multiple "same" labels is actually very similar to that of geom_multipath. Obviously this doesn't 
> >apply 100% to UFS and other filesystems' labels (except if there's a way to identify different file systems by their superblock, for example timestamp of creation?), but 
> >in case of "manual" labels, if the unique ID matches and the label string matches, it's probably the same device.
> >Currently, geom_label discards "additional" devices with the same label, and I remember there was a discussion about if that should be changed (though I don't remember the 
> >conclusions). It would be useful if geom_label would work the same as geom_multipath in this case (i.e. failover to "next" device, add new devices with same label+id to 
> >the pool), or even if geom_multipath were merged in geom_label.
> >Comments?
> 
> 
> I think that the duplicate label case is not really the same as multipath.   I see your point, but the duplicate label issue is more of a cause from mistake rather than 
> intention.

Yeah. When I see duplicated labels, I don't want to show them both with
some random names that nobody expect. And think here about automatic
processing, not that administrator can take a look and find new name.
I can do two things:
1. Present one of those labels.
2. Stop the system (panic?), because it's just administrator fault
(misconfiguration).

I'd prefer 2, but it's too cruel. Administrators make mistakes and we
have some garbage to clean still (eg. 'c' partition). That's why I
decided to go with 1.

> Maybe it would be a good idea to allow a priority value in the geom_label meta data so that an admin could prioritize his labels.  For instance, on my laptop, I have 
> labeled my root partition /dev/label/root.  If I have a compact flash plugged in that I'm working on for a small embedded device, I also need it named /dev/label/root, even 
> though I'm already using that label.  I want to be able to reboot my laptop with the compact flash inserted still, without it possibly booting off the flash instead.  To 
> protect against that, I could prioritize my internal hd's 'root' labeled device to a priority of '1', which means 'nothing is higher priority than this device'.  A '0' 
> would mean no priority given, and any number greater than 0 is less priority.  That way admins could mark their labels and allow certain devices to be forced more important 
> than others.  Comments?

I like this idea, but it can only be used for glabel's native labels.
You can't use the same method for filesystem volume names, and those are
more often used than glabel's native labels.
Don't read me wrong, I still like your idea and would be glad to commit
something like this. Care to provide a patch?:)

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20070328/c8d21c34/attachment.pgp


More information about the freebsd-geom mailing list