NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/57348: dk(4) wedges should always be referenceable by uuid



>Number:         57348
>Category:       kern
>Synopsis:       dk(4) wedges should always be referenceable by uuid
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 13 09:00:00 +0000 2023
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD Wedgeation
>Environment:
*sizzle*
>Description:
dk(4) wedges have two namespaces:

- autoconf device number, which is unreliable and may depend on stochastic scheduling reordering;
- name, which must be unique, and for partitioning schemes with both names and uuids is chosen to be name if unique or uuid on name collision.

This means that, even if partitions have unique uuids, they can't be both named and referred to in fstab(5) or similar with uuid.


>How-To-Repeat:
Insert two disks with the same name, like `netbsd-boot', one of which is an internal SSD and the other of which is an external USB flash drive, with an fstab(5) entry to mount it.  Watch their fstab(5) files confuse the partitions.
>Fix:
Create a third namespace by which wedges can be referenced by uuid.  Of course, this can have collisions too, but in practical terms collisions are less likely to happen and this allows us to put human-meaningful names on partitions without also breaking machine-readable references to them.



Home | Main Index | Thread Index | Old Index