From: "Bryn M. Reeves" <bmr@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Question about setting of UUID
Date: Mon, 07 Mar 2011 13:28:30 +0000 [thread overview]
Message-ID: <4D74DD7E.2060006@redhat.com> (raw)
In-Reply-To: <4D74D9AC.4060800@onet.eu>
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.
prev parent reply other threads:[~2011-03-07 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 13:12 [linux-lvm] Question about setting of UUID sdrb
2011-03-07 13:28 ` Bryn M. Reeves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D74DD7E.2060006@redhat.com \
--to=bmr@redhat.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).