On 12/3/11 11:04 AM, CyberLeo Kitsana wrote:
To answer your question, though: You cannot combine GPT with glabel (or
any other geom class that writes data to the first or last 34 sectors of
a disk, like gmirror) due to layout conflicts. MBR and BSD schemes can
be used, since they occupy only the first sectors of the device, and
their monikers will be appended to the label. Thus, labeling a
single-slice MBR disk (/dev/ada0) with 'test' would produce /dev/ada0,
/dev/ada0s1, /dev/label/test, and /dev/label/tests1; nesting a BSD table
within s1 would add /dev/ada0s1a and /dev/label/tests1a as well.

Do gpt labels work the same as glabel, ie provide a static device name that can be acted upon with /etc/fstab, zfs, gmirror, etc?

The other option seems to be to use tunefs or a partitioning tool to
label each partition, which is even more ugly imo.

Ugly how? Labels appear a lot more semantically elegant than the opaque
'ada4s1a' moniker.

Ugly in that the driver has created a situation where we need workarounds to perform the tasks we need. *nix systems have always relied upon static device nodes, and using dynamic names without updating the relating tools/methods is ugly. The workarounds also could fail if someone forgets to perform them (specifically labels), since it's not necessary on just about any other *nix system. It's perfectly within reason to assume people will forget to apply a label when replacing a disk.

Case in point. I have a system with 15 drives in it. I decided I wanted to install on the 2nd device instead of the 1st, but I partitioned all the other 14 drives. I completed installation and when to boot the system and it failed. Stupid me, the GPT boot loader found disk1 with a partitioning scheme but no fs. So, I popped out disk 1 and when to boot again. Hey, now it starts to boot only to fail to find the root fs because it's looking on ada1 and the fs is on ada0. That is a mess.

This is not necessarily common, but also not uncommon. More likely is the case where you add a drive to the system and the above scenario plays out because the device names get re-ordered. I'm not sure the problem the dynamic device nodes intends to solve, but it's certainly caused all sorts of pain and the need for the 2 (that I know of) workarounds.

I dislike the idea of having to use labels to get static functionality (increases the likelihood of something going wrong for a disk replace operation if I forget to label), but I'll give gpt labels a try.

Rob
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to