How to create physical volume using UUIDs?
Code:
[user1@localhost dev]$ blkid Code:
[user1@localhost dev]$ sudo pvcreate --norestorefile -u 8aa209c9-8550-4e76-9d1c-878fc6f5b160 pv1 What did I missed? Thanks. |
Well, I don't do this too much, but it certainly appears that you're trying to assign the same UUID to two volumes.
Every volume must have a unique UUID. While you can use the -u option to specify the UUID that is to be assigned, instead of letting pvcreate coin one for you at random, the ID that is finally assigned must be unique. It must refer to one, and only one, volume. You do not need to specify a UUID unless you particularly want to ... |
You need to specify the physical device i.e.
Code:
sudo pvcreate --norestorefile -u 8aa209c9-8550-4e76-9d1c-878fc6f5b160 /dev/sda5 Backup any existing data on sda5 if necessary. |
I misunderstood the purpose of UUID in the command line.
I thought if I specify the UUID of the physical device, then pvcreate will look for the physical device and label it a physical volume. Instead, it is using the UUID provided in the command line as the new UUID for the newly created physical volume. Addendum: UUID for physical volume can be the same as its associated physical device. Thanks. |
Quote:
|
All times are GMT -5. The time now is 08:20 AM. |