# Do you need disklabels when using gpt layout?



## hk7 (Jan 9, 2018)

It seems disklabels are primarily used for overcoming the restriction of MBR partition scheme. So do you need disklabels when disk layout is gpt?


----------



## SirDice (Jan 9, 2018)

hk7 said:


> So do you need disklabels when disk layout is gpt?


Short and simple answer, no.


----------



## phoenix (Jan 10, 2018)

glabel(8) labels can be used with pretty much everything, and can be useful if you are mixing different partitioning schemes and disk types and what not, and want to use consistent /dev/label/labelname names for things.  The downside to doing this is that the label is stored in the last sector of whatever is being labelled, so if that sector gets erased/overwritten somehow, then the label is gone.  It doesn't always play nicely with other things (like GPT) that want to stick their own things in the last sector.

However, gpart(8) includes label support directly for each partition (*-l* option), which makes them available as /dev/gpt/labelname.  This, IMO, is a much cleaner, as it's part of the partition table, and gets backed up (alternate GPT on disk).  If you only have GPT partitioned disks, using the GPT label is better.


----------



## ralphbsz (Jan 11, 2018)

To preserve your sanity, it helps to put easily understandable and text-based names on partitions.  This is important to help debug later (usually in the middle of the night, with the system half dead).  It also makes the disk self-describing; no need to a yellow sticky note on the cubicle wall, or comments in the /etc/fstab file.  As phoenix said, using the names that are directly stored in the GPT table itself is the easiest and cleanest way to do that, because the text names are stored right where the partition information is stored, and backed up with it.

Now, to directly answer your question: Do you need to preserve your sanity?  That's up to you.


----------



## SirDice (Jan 11, 2018)

phoenix said:


> glabel(8) labels can be used with pretty much everything


I think the OP is referring to bsdlabel(8), not so much filesystem labels.


----------



## phoenix (Jan 11, 2018)

SirDice said:


> I think the OP is referring to bsdlabel(8), not so much filesystem labels.



Oh, you could be right.


----------



## hk7 (Jan 23, 2018)

Thank you, guys.


----------

