* [linux-lvm] Question about setting of UUID
@ 2011-03-07 13:12 sdrb
2011-03-07 13:28 ` Bryn M. Reeves
0 siblings, 1 reply; 2+ messages in thread
From: sdrb @ 2011-03-07 13:12 UTC (permalink / raw)
To: linux-lvm
Hello,
I have got question regarding setting of UUID for PV, VG and LV.
I'd like to ask if there are any plans to add possibility of manual
setting and changing UUIDs?
I mean if it could be possible to change UUID of PV just by typing:
# pvchange -s aaaaaaaabbbbbbbbccccccccdddddddd /dev/sdb
and analogous changes in lvchange and vgchange?
There are some situations when it could be very helpful.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] Question about setting of UUID
2011-03-07 13:12 [linux-lvm] Question about setting of UUID sdrb
@ 2011-03-07 13:28 ` Bryn M. Reeves
0 siblings, 0 replies; 2+ messages in thread
From: Bryn M. Reeves @ 2011-03-07 13:28 UTC (permalink / raw)
To: LVM general discussion and development
On 03/07/2011 01:12 PM, sdrb wrote:
>
> Hello,
>
> I have got question regarding setting of UUID for PV, VG and LV.
>
> I'd like to ask if there are any plans to add possibility of manual
> setting and changing UUIDs?
> I mean if it could be possible to change UUID of PV just by typing:
>
> # pvchange -s aaaaaaaabbbbbbbbccccccccdddddddd /dev/sdb
>
> and analogous changes in lvchange and vgchange?
The pvchange and vgchange commands can already generate a new random UUID for
PVs and VGs (man 8 pvchange/vgchange):
-u, --uuid
Generate new random UUID for specified Volume Groups.
And you can specify any UUID you like for PVs with pvcreate (man 8 pvcreate):
-u, --uuid uuid
Specify the uuid for the device. Without this option, pvcreate
generates a random uuid. All of your physical volumes must have
unique uuids. You need to use this option before restoring a
backup of LVM metadata onto a replacement device - see
vgcfgrestore(8).
You can also use pvcreate (with -ff/-y) to re-create an existing PV (without
modifying its data areas) with a UUID of your choosing. After doing this you can
restore VG metadata to the PV with vgcfgrestore (to ensure the newly re-created
PV is compatible with the intended VG layout you should also pass
--restorefile=/path/to/file to pvcreate when setting the UUID).
Afaik there's no --uuid option to lvchange but since all LV UUIDs are derived
from the respective VG UUID changing the VG should also change all the LVs it
contains.
Regards,
Bryn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-07 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 13:12 [linux-lvm] Question about setting of UUID sdrb
2011-03-07 13:28 ` Bryn M. Reeves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).