On Sat 30 Sep 2023 at 09:51:35 (-0400), gene heskett wrote: > On 9/30/23 07:27, Andy Smith wrote: > > On Sat, Sep 30, 2023 at 03:28:09AM -0400, gene heskett wrote: > > > On 9/29/23 20:05, Andy Smith wrote: > > > > As evidenced by this thread lots of people confuse partition > > > > names/labels for filesystem labels, even though they are distinct > > > > things, which was why I asked Gene if he really meant a partition > > > > label when he wrote that. > > > > > > > Yes I did Andy. > > > > In your earlier reply you said you actually meant filesystem label, > > and that your query was answered with e2label (which works with > > filesystem labels on ext* filesystems). > > > > So no, when you previously said "partition label" you actually meant > > "filesystem lanel". > > > I assume you meant "label", Andy ;o) > > Which leads to a question: > > I used gparted to apply the labels. > And I could only apply then if the partition was not mounted. > > So what is the proper definition of such a label that gparted applies? > filesystem or partition? > > Its seems to point (to me anyway) as two different methods, and > therefore is in different locations in the medium. If so, how is the > difference determined?
Partitions on GPT disks have Names≡Labels and UUIDs, sometimes referred to as PARTLABELs and PARTUUIDs. Filesystems have their own Labels and UUIDs, but what they're called may vary by the type of filesystem, and also by the programs you're using to manipulate or list them. But you also seem to use the names of those programs (like blkid) or their functionality (like gparted's) to refer to all these properties, which might be why you get them mixed up. You can see all the Names and Labels on your filesystems by typing: $ ls -lR /dev/disk/ where the partitions are under /dev/disk/by-partlabel and /dev/disk/by-partuuid, and the filesystems under /dev/disk/by-label and /dev/disk/by-uuid. These symlinks point to the kernel's device names. Note that filesystem LABELs on encrypted ext filesystems won't be seen unless they're unlocked, though the UUIDs are. BTW the inability of gparted to apply partition labels while their filesystems are mounted is self-inflicted. (Presumably, the fields are 'greyed out'.) They can be written/changed, but you may be left in a confusing state where the kernel and various programs are using different values, which may or may not matter. Rebooting will solve this, or you can run partprobe or kpartx, neither of which have I tried. (I'm not advising this, of course.) Cheers, David.