Quantcast

LVM: how do I change the UUID of a LV?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LVM: how do I change the UUID of a LV?

Timothy Selivanow
I know how to change the UUID of Physical Volumes and Volume Groups, but
when I try to do the same for a Logical Volume, lvchange complains that
"--uuid" is not an option.  Here is how I've been changing the others
(note that "--uuid" does not appear in the man pages for pvchange and
vgchange for lvm2-2.02.26-3.el5):

pvchange --uuid {pv dev}
vgchange --uuid {vg name}


Any suggestions? I'm pretty much open to any arcane/convoluted
procedure, but I refrain from copying the data to a temp place so I can
re-create the LV as that would add too much work and would kinda defeat
what I'm doing.  Thanks!


--Tim
 _________________________________________________________
/ Obviously I was either onto something, or on something. \
\              -- Larry Wall on the creation of Perl      /
 ---------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

--
fedora-list mailing list
[hidden email]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LVM: how do I change the UUID of a LV?

Alasdair G Kergon
On Tue, Mar 04, 2008 at 10:23:24AM -0800, Timothy Selivanow wrote:
> I know how to change the UUID of Physical Volumes and Volume Groups, but
> when I try to do the same for a Logical Volume, lvchange complains that
> "--uuid" is not an option.  

Nobody's yet made a case for adding that feature.
Why do you want it?

Alasdair
--
[hidden email]

--
fedora-list mailing list
[hidden email]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LVM: how do I change the UUID of a LV?

Robin Laing
Alasdair G Kergon wrote:
> On Tue, Mar 04, 2008 at 10:23:24AM -0800, Timothy Selivanow wrote:
>> I know how to change the UUID of Physical Volumes and Volume Groups, but
>> when I try to do the same for a Logical Volume, lvchange complains that
>> "--uuid" is not an option.  
>
> Nobody's yet made a case for adding that feature.
> Why do you want it?
>
> Alasdair

I can think of data recovery as one reason.

I am no expert in LVM and Google is my friend when playing with it.


If changing drives around while upgrading, then finding that you have to
mount the old drive, you now have issues as the UUID for the drive is
recognized as part of the "OLD" volume group.  I couldn't use any of the
recovery techniques that I could find on the WEB.

I ran into this late last year when I removed the 130Gig drives and
replaced them with 500Gig drives.  When I needed to mount the old drives
to recover some data that I forgot to backup (slap my wrists for being
in a rush and stupid) before the change.  I couldn't use any of the LVM
recovery techniques as LVM constantly wanted to remount the drive as
part of the LVM group it came from.

I fought for weeks on this and finally gave up and used normal forensic
tools to recover from an image of the drive.

I don't remember all the details and my notes are not with me but any
aspect of a LVM should be configurable to ensure that the drive can be
mounted outside it's group without causing headaches.  I may be
associating a different UUID ( I wish they had different designators)
than this thread but I think it could be the same issue.


--
Robin Laing

--
fedora-list mailing list
[hidden email]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LVM: how do I change the UUID of a LV?

Timothy Selivanow
In reply to this post by Alasdair G Kergon
On Wed, 2008-03-12 at 13:28 +0000, Alasdair G Kergon wrote:
> On Tue, Mar 04, 2008 at 10:23:24AM -0800, Timothy Selivanow wrote:
> > I know how to change the UUID of Physical Volumes and Volume Groups, but
> > when I try to do the same for a Logical Volume, lvchange complains that
> > "--uuid" is not an option.  
>
> Nobody's yet made a case for adding that feature.
> Why do you want it?
>
> Alasdair

Instead of installing a new guest in Xen everytime, I have one default
image that is a bare install, kept up-to-date.  When I want to provision
a new VM, I simply copy the disk image (file at the moment, evaluating
using a LV as a block device instead of tap:aio) then do a losetup,
kpartx, and change UUIDs of everything, mount the LVMs and ext3 boot
partition to change the hostname, IP, etc. of the system.  When that is
done, I just do a `xm create new-system` after I've setup the config
file in /etc/xen and I have a system that is up-to-date and ready to be
used for what-ever purposes that have been determined (I've also thought
about installing new software while I'm chroot'd in the new guest
image).


--Tim
 ______________________________________________________
/ It is sweet to let the mind unbend on occasion.      \
\                 -- Quintus Horatius Flaccus (Horace) /
 ------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

--
fedora-list mailing list
[hidden email]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LVM: how do I change the UUID of a LV?

Alasdair G Kergon
In reply to this post by Robin Laing
On Wed, Mar 12, 2008 at 09:27:14AM -0600, Robin Laing wrote:

> Alasdair G Kergon wrote:
> >On Tue, Mar 04, 2008 at 10:23:24AM -0800, Timothy Selivanow wrote:
> >>I know how to change the UUID of Physical Volumes and Volume Groups, but
> >>when I try to do the same for a Logical Volume, lvchange complains that
> >>"--uuid" is not an option.  
> >Nobody's yet made a case for adding that feature.
> >Why do you want it?
> If changing drives around while upgrading, then finding that you have to
> mount the old drive, you now have issues as the UUID for the drive is
> recognized as part of the "OLD" volume group.  

The ability to change lv uuid is not relevant here.
pvchange, vgchange, vgrename should suffice.

Alasdair
--
[hidden email]

--
fedora-list mailing list
[hidden email]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Loading...