1 |
Robin H. Johnson posted on Sun, 11 Mar 2012 23:14:46 +0000 as excerpted: |
2 |
|
3 |
> On Sun, Mar 11, 2012 at 11:03:50PM +0000, Duncan wrote: |
4 |
>> Meanwhile, also note that there's PARTLABEL, PARTUUID and ID, that the |
5 |
>> mount manpage promises to honor. I've not used these myself, but there |
6 |
>> was a thread on the btrfs list discussing GPT format and users of its |
7 |
>> partition-labels (as opposed to filesystem labels), that pointed out |
8 |
>> that mount honors these, since it internally uses the udev symlinks |
9 |
>> mechanism to support (fs) labels, etc, so they get support for |
10 |
>> gpt-partition- labels, etc, essentially "for free". |
11 |
|
12 |
> What manpage are you reading? |
13 |
> # man 8 mount |grep PART # man 2 mount |grep PART Nada. |
14 |
> |
15 |
> When the blkid tool can read PARTUUID/PARTLABEL, then it will just work |
16 |
> with genkernel, as we use blkid for doing that. |
17 |
|
18 |
mount (8) under device indication: |
19 |
|
20 |
>>>>> |
21 |
|
22 |
Most devices are indicated by a file name (of a block special device), |
23 |
like /dev/sda1, but there are other possibilities. [...] It is possible |
24 |
to indicate a block special device using its volume LABEL or UUID (see |
25 |
the -L and -U options below). |
26 |
|
27 |
The recommended setup is to use LABEL=<label> or UUID=<uuid> tags rather |
28 |
than /dev/disk/by-{label,uuid} udev symlinks in the /etc/fstab file. The |
29 |
tags are more readable, robust and portable. The mount(8) command |
30 |
internally uses udev symlinks, so use the symlinks in /etc/fstab has no |
31 |
advantage over LABEL=/UUID=. For more details see libblkid(3). |
32 |
|
33 |
<<<<< |
34 |
|
35 |
As I said, it wasn't apparent to me until someone pointed it out to me on |
36 |
the btrfs list, but apparently, mount understands SOMETHING= as |
37 |
referencing /dev/disk/by-something, using those symlinks internally, so |
38 |
while the manpage doesn't specifically mention PARTLABEL, etc, according |
39 |
to that person, it "just works". Upon seeing that claim, I reread the |
40 |
manpage, and sure enough, that meaning can be seen "between the lines" if |
41 |
you already know to look for it. |
42 |
|
43 |
I had intended to try it, since I use gptfdisk and gpt partitions pretty |
44 |
much universally now, and referencing the PARTLABEL would have meant that |
45 |
I could for instance do a mkfs and redo my backup partitions without |
46 |
having to update fstab's labels because I could use the partlabels |
47 |
instead. Unfortunately, when I actually checked to see what symlinks |
48 |
udev was putting in /dev/disk/by-partlabel, while indeed the gpt |
49 |
partlabels for the physical disks were there, the partlabels for the |
50 |
gpt-partitioned md/raid devices were NOT, and that's what I actually |
51 |
needed, so unfortunately I couldn't try using partlabels after all. |
52 |
That's why I've yet to actually verify the claim. |
53 |
|
54 |
At some point I'll probably verify it with a USB attached external drive, |
55 |
as it's my last-resort backup, and/or on my netbook, with only one drive |
56 |
so no raid, but I've not gotten that far, yet. |
57 |
|
58 |
|
59 |
FWIW, the thread started with someone complaining that a btrfs label on a |
60 |
multi-device filesystem (since btrfs can do that) was attached to the |
61 |
filesystem, NOT the device/partition. Various people pointed out that |
62 |
it's a filesystem label and that btrfs thus had it correct. Meanwhile, |
63 |
on one subthread I pointed out gpt partition labels as an alternative, |
64 |
but said I didn't think Linux could actually do much with them yet. |
65 |
That's when someone else replied that it could do more than I thought, |
66 |
mount and fstab handled partlabel, and he thought the kernel root= |
67 |
parameter could take it as well. |
68 |
|
69 |
Here's his post on gmane: |
70 |
|
71 |
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/16023 |
72 |
|
73 |
As I said, after reading that, rereading the mount (8) manpage, it /did/ |
74 |
seem to hint that it should do so even if it doesn't outright say it, |
75 |
since it specifically mentions using udev's symlinks internally. |
76 |
|
77 |
But as I've not tried it yet I have only his post and my reparsing of |
78 |
that manpage based on it, to go on. Is it incorrect? |
79 |
|
80 |
-- |
81 |
Duncan - List replies preferred. No HTML msgs. |
82 |
"Every nonfree program has a lord, a master -- |
83 |
and if you use the program, he is your master." Richard Stallman |