diff options
author | Brian Behlendorf <behlendorf1@llnl.gov> | 2016-04-13 14:50:16 -0700 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2016-04-25 11:13:09 -0700 |
commit | 5b4136bd499a892f65c86af8fd39fa21e05c9148 (patch) | |
tree | 4d5c98bcb02ec3de13683370be5e62fbe2046cd4 /cmd | |
parent | a5a370227eb0a3daf8992a38920d54eb3b7b3c25 (diff) |
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
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zpool/zpool_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index c9b600650..d6b9f4914 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -6055,6 +6055,7 @@ main(int argc, char **argv) (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); + srand(time(NULL)); dprintf_setup(&argc, argv); |