81

When I create a new partition on my disk using GParted, I have the option to set both a name and a label. Some partitions I have already have both, some only a label. If I right-click on an existing partition, I can see separate options to set the partition's name and label.

But what is the difference between the name of a partition and the label of a filesystem? If I can set both and they seem to have a similar effect, does it even matter which one I choose?

1 Answers1

51

A partition name is a name given in the GPT; it's external to the partition itself. A partition label is a label stored inside the filesystem; for example with ext-family filesystems, this is the label you can manipulate with e2label.

You can then use filesystem labels or partition names to mount the filesystems, which helps avoid issues with disk name changes. mount(8) has more information on this (search for "label"). It probably makes sense for the name to match the label...

Stephen Kitt
  • 434,908
  • 1
    What's the point of a GPT name then? I want my name/label to be durable and am guessing the label is more important. – Sridhar Sarnobat Apr 27 '19 at 03:23
  • 3
    In your /etc/fstab you can use labels like this: LABEL=easystore0 /media/easystore0 ext4 defaults 0 0. – Teque5 Jan 09 '20 at 17:13
  • 2
    This mount LABEL is misleading (or gdisk's name is misleading): in your example, @Teque5, LABEL corresponds to gparted NAME, and PARTLABEL in fstab corresponds to LABEL in gparted (https://wiki.ubuntuusers.de/Labels/, sorry for a reference in German). – Yaroslav Nikitenko Apr 27 '23 at 09:46
  • Which is also curious, I can't set a label in parted (and I thought that gparted) is simply its graphical interface/wrapper. mklabel seems a different command, creating a new disklabel. – Yaroslav Nikitenko Apr 27 '23 at 09:50
  • 2
    @YaroslavNikitenko GParted wraps parted, but it also adds file system manipulation features; parted has the name command to set a partition name, but since it doesn’t know about file systems it doesn’t offer to set the label there. – Stephen Kitt Apr 27 '23 at 10:33