After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 576929 - partition label vs filesystem label
partition label vs filesystem label
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: Disks UI
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2009-03-27 05:15 UTC by Matthias Clasen
Modified: 2009-03-27 18:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2009-03-27 05:15:52 UTC
When I create a partition, I am asked for a label, and that label is what appears in the device tree.

When I select that list entry, I see a partition section with a Label: entry and a filesystem section with a Name: section. The Label field does not seem to affect the name shown in the device tree, but the Name field does. This is confusing (to me at least).
Comment 1 Matthias Clasen 2009-03-27 05:19:19 UTC
More on names:

- there seems to be no uniqueness guarantee for these labels (I just created two partitions named part1 and part1).

- several confirmation dialogs refer to partitions by number (e.g. 'partition 3')

I think this number needs to be displayed somewhere in the device tree.
Comment 2 David Zeuthen (not reading bugmail) 2009-03-27 15:37:22 UTC
(In reply to comment #0)
> When I create a partition, I am asked for a label, and that label is what
> appears in the device tree.

That is the label for the file system. And what will be show in the desktop shell to refer to the device.

> When I select that list entry, I see a partition section with a Label: entry
> and a filesystem section with a Name: section. The Label field does not seem to
> affect the name shown in the device tree, but the Name field does. This is
> confusing (to me at least).

Partition label and file system labels are different thing.

The former is a property of the partition (and only GUID partition table supports them, not MS DOS partition tables) and is independent on what you store on the partition.

The latter is a property of the file system or other structured data (such as swap) stored on the partition (and that stuff could be stored on a whole-disk device) too.

Partition labels are not really used by the system *right now*. Maybe when EFI systems are more prevalent it will appear in boot-loader UIs.

The only reason we display partitoin tables (and let the user edit them) is for completeness - e.g. there is already a clear need to edit other attributes of the partition meta-data, e.g. type (e.g. 0x0c, 0x82, 0x83) and flags (e.g. "is bootable") since that is needed for the BIOS on PCs to pick the partition to boot. So since we have the other attributes it is nice to show everything.

(In reply to comment #1)
> More on names:
> 
> - there seems to be no uniqueness guarantee for these labels (I just created
> two partitions named part1 and part1).

Of course not. Why would there be such a guarantee?

> - several confirmation dialogs refer to partitions by number (e.g. 'partition
> 3')

This is because the only useful identifier for a device is the pair (Disk/Drive name, partition number) - the alternative is the (arbitrarily assigned) unix device name (e.g. /dev/sda6). Thus, instead of showing "/dev/sdb6" we show "Partition 6 on Sandisk Cruzer XYZ" which is at least a little bit more useful.

And it is useful with precise identification. For example consider the case where you have three partitions and two of them are LUKS. Then it's useful to know that you are asked to enter the password for the first LUKS partition (partition 2) or the second LUKS partition (partition 3).

Keep in mind that partition numbers are just stuff made up by the running system; the partition numbers we use match the number the kernel assigns (e.g. /dev/sdb2 or /dev/sdb6) using whatever heuristic that is suitable for the partition table format (e.g. for MS DOS partition tables, logical partitions always start at 5 even when you only have 2 primary partitions).

> I think this number needs to be displayed somewhere in the device tree.

It is already displayed for a selected entry; for example I have

 <big>Boot (Stable)</big>
 526 MB / 502 MiB / 526,417,920 bytes
 Linux Ext3 (version 1.0) File System
 Partition 2 (Linux (0x83))
 /dev/sda2

and you can also infer it from the position in tree.
Comment 3 David Zeuthen (not reading bugmail) 2009-03-27 15:52:49 UTC
(In reply to comment #0)
> When I create a partition, I am asked for a label, and that label is what
> appears in the device tree.

I've changed "Label" to "Name" so now we use the term "Name" throughout when referring to file system labels and "Label" to refer to partition labels.

http://git.gnome.org/cgit/gnome-disk-utility/commit/?id=accb18717353ac32ea1e4e8cce279b59d021a1ea
Comment 4 Matthias Clasen 2009-03-27 17:03:28 UTC
> and you can also infer it from the position in tree.

Yeah, but that struck me as being a little unsatisfactory, given that we are talking about a message that essentially says:

"All data on partition 2 will be deleted. Continue ?"

Letting me count myself (and figuring out if extended partitions are included in the numbering or not) seems suboptimal for this...

Anyway I've attached a patch to another bug that adds the name shown in the device tree to the dialog, in addition to the partition number.


Wrt to partition name/filesystem label, here is why I think this is a bit confusing.

I am creating a partition, and while doing so, specify a name. After the partition has been created, I see two sections, one about the partition, and one about a filesystem. Both have a name field in them, but the one in the partition section is empty, while the one in the filesystem section has the string that I entered when creating the partition. Can you see that one might expect the string to show up in the partition section (given that the string was entered while creating a _partition_, not a filesystem). Anyway, not that important.
Comment 5 David Zeuthen (not reading bugmail) 2009-03-27 17:41:23 UTC
(In reply to comment #4)
> > and you can also infer it from the position in tree.
> 
> Yeah, but that struck me as being a little unsatisfactory, given that we are
> talking about a message that essentially says:
> 
> "All data on partition 2 will be deleted. Continue ?"
> 
> Letting me count myself (and figuring out if extended partitions are included
> in the numbering or not) seems suboptimal for this...

Presumably you get to this dialog by doing some clicking a button prompting a destructive operation on an already focused device. So I'm a bit baffled why you feel caught by surprise....

It would also be good if you could attach a screenshot or try to be more specific since we have a ton of UI in Palimpsest. And I'm not very good at the guessing game ;-)

> Anyway I've attached a patch to another bug that adds the name shown in the
> device tree to the dialog, in addition to the partition number.

(Referencing the bug number would be nice)

> Wrt to partition name/filesystem label, here is why I think this is a bit
> confusing.
> 
> I am creating a partition, and while doing so, specify a name. After the
> partition has been created, I see two sections, one about the partition, and
> one about a filesystem. Both have a name field in them, but the one in the
> partition section is empty, while the one in the filesystem section has the
> string that I entered when creating the partition. Can you see that one might
> expect the string to show up in the partition section (given that the string
> was entered while creating a _partition_, not a filesystem). Anyway, not that
> important.

I think your original complaint about "Label" being used for both fs labels and part labels made sense so I that ambiguity. As noted in commment 3 we now have a clear distinction: "Name" -> Filesystem Label.. and "Label" -> Partition Label... However your comment above seems to ignore that since you say "Both have a name field in them".

Anyway, maybe it would be better to just spell it out. E.g. use the term "Label" exclusively for file system labels ("Name" is a bit too overloaded) since that is the generally accepted upon term and use the term "Partition Label" for partitioning labels. I'll do that.
Comment 6 David Zeuthen (not reading bugmail) 2009-03-27 17:46:32 UTC
(In reply to comment #5)
> Anyway, maybe it would be better to just spell it out. E.g. use the term
> "Label" exclusively for file system labels ("Name" is a bit too overloaded)
> since that is the generally accepted upon term and use the term "Partition
> Label" for partitioning labels. I'll do that.

Proposed change

 http://people.freedesktop.org/~david/bgo576929-1.png
 http://people.freedesktop.org/~david/bgo576929-2.png
 http://people.freedesktop.org/~david/bgo576929-3.png

Does this look better? Thanks.
Comment 7 Matthias Clasen 2009-03-27 17:54:34 UTC
I was referring to bug 576431

> Presumably you get to this dialog by doing some clicking a button prompting a
> destructive operation on an already focused device. So I'm a bit baffled why
> you feel caught by surprise....

'caught by surprise' is a bit strong, I guess. It is more the subtle queasiness you get if you ask to delete something, and then you get a question back that states strongly that this is dangerous and you might loose data. And the question refers to something that is named differently than the thing that you selected in the list. So you get to count lines to make sure that it actually is the same thing...

> Partition labels are not really used by the system *right now*. Maybe when EFI
> systems are more prevalent it will appear in boot-loader UIs.

This is useful information that might be good to show somewhere, to explain what these labels are good for.

Anyway, 'Partition Label'/'Label' is better than 'Name'/'Label'. 
Comment 8 David Zeuthen (not reading bugmail) 2009-03-27 18:12:10 UTC
(In reply to comment #7)
> > Presumably you get to this dialog by doing some clicking a button prompting a
> > destructive operation on an already focused device. So I'm a bit baffled why
> > you feel caught by surprise....
> 
> 'caught by surprise' is a bit strong, I guess. It is more the subtle queasiness
> you get if you ask to delete something, and then you get a question back that
> states strongly that this is dangerous and you might loose data. And the
> question refers to something that is named differently than the thing that you
> selected in the list. So you get to count lines to make sure that it actually
> is the same thing...

OK, point taken. So we need to ensure that our dialogs are not ambiguous, easier to read and generally work. Let's deal with that in bug 576431 or maybe even another bug.

> > Partition labels are not really used by the system *right now*. Maybe when EFI
> > systems are more prevalent it will appear in boot-loader UIs.
> 
> This is useful information that might be good to show somewhere, to explain
> what these labels are good for.

I presume the help file is the right place for this... it's not written yet but all the infrastructure is set up. Maybe we just want to start with a terminology section before discussing how to do operations (since the UI is in flux).

> Anyway, 'Partition Label'/'Label' is better than 'Name'/'Label'. 

Committed

http://git.gnome.org/cgit/gnome-disk-utility/commit/?id=151f0f353577494f37e9753183f1335712dfd903

I've also added some more notes to HACKING about terminology.