Filesystem Label Ambiguity

Brandon J. Wandersee brandon.wandersee at gmail.com
Sun Oct 16 15:25:30 UTC 2016


Jason C. Wells writes:

> On 10/15/2016 4:16 PM, Brandon J. Wandersee wrote:
>> Jason C. Wells writes:
>>
>>> Let's say I have three disks and each of them has a partition labelled
>>> "volume3" i.e.  /dev/ufs/volume3.
>>>
>>> How can I determine which of those is currently mounted?
>>>
>>> How does the system determine which of those to mount at boot time?
>> Short answer: Don't do this.
>
> OK. So the device renumbering problem has been traded for a naming 
> ambiguity problem. I didn't realize this when I first came upon my 
> naming convention for filesystems.  I'll start keeping track of my 
> "volumeX" names and make them unique. I just got lucky that I didn't 
> mount the wrong disks over the course of the last few weeks.
>
> Maybe I'll just use UUIDs everywhere. Those are easy to remember. :)

You can do whichever works for you, of course, but if you wanted to use
labels you wouldn't have to drastically change your naming scheme. Just
add some extra identifier. The ZFS pools on my file/media server, for
example, consist of "/dev/gpt/system00" and "/dev/gpt/system01" for the
OS pool, and "/dev/gpt/data00" and "/dev/gpt/data01" for the data
pool. You just need a naming convention that identifies a filesystem as
"third filesystem on *this* disk" rather than "third filesystem on some
disk somewhere."


-- 
::  Brandon J. Wandersee
::  brandon.wandersee at gmail.com
::  --------------------------------------------------
::  'The best design is as little design as possible.'
::  --- Dieter Rams ----------------------------------


More information about the freebsd-questions mailing list