]> granicus.if.org Git - zfs/commit - lib/libzfs/libzfs_pool.c
Create unique partition labels
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Apr 2016 21:50:16 +0000 (14:50 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 25 Apr 2016 18:13:09 +0000 (11:13 -0700)
commit5b4136bd499a892f65c86af8fd39fa21e05c9148
tree4d5c98bcb02ec3de13683370be5e62fbe2046cd4
parenta5a370227eb0a3daf8992a38920d54eb3b7b3c25
Create unique partition labels

When partitioning a device a name may be specified for each partition.
Internally zfs doesn't use this partition name for anything so it
has always just been set to "zfs".

However this isn't optimal because udev will create symlinks using
this name in /dev/disk/by-partlabel/.  If the name isn't unique
then all the links cannot be created.

Therefore a random 64-bit value has been added to the partition
label, i.e "zfs-1234567890abcdef".  Additional information could
be encoded here but since partitions may be reused that might
result in confusion and it was decided against.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
Closes #4517
cmd/zpool/zpool_main.c
lib/libzfs/libzfs_pool.c