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

Robin Laing Robin.Laing at drdc-rddc.gc.ca
Wed Mar 12 15:27:14 UTC 2008


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




More information about the fedora-list mailing list