[linux-lvm] how to change uuid of a PV?

Sean Boyd sboyd at redhat.com
Thu Jun 23 22:49:43 UTC 2005


On Thu, 2005-06-23 at 22:52 +0900, HYUN-CHUL KIM wrote:
> How to change a PV uuid in LVM?
>  
> One among three hard disks constituting a LVM logical volume has
> failed.
> When trying boot without the broken hard disk, following error message
> come out.
> Couldn't find uuid with 'c3r7Sx-aTpd-JHFp-iT3c-FOiK-g7JC-uj10VK'
>  
> And I found another PV uuid '7I7F4S-pzze-dgjr-0HKP-ccX4-qG1d-SOu2ki'
> from a new hard disk.
>  
> I think the PV uuid is recorded in somewhere of LVM config so that we
> typed pvdisplay, it comes out.
> Now, I think if I can change the PV uuid from 'c3r7Sx-...' into
> '7I7F4S-...' in LVM, I can manage to boot and to recover data from the
> two still-healthy hard disks.
>  
> How can I change the PV uuid information recorded in the LVM? or Where
> are the PV uuids recorded?

The man pages explain what needs to be done.

You need to make sure you have a backup file of your VG config prior to
the disk failure. eg: /etc/lvm/backup/volGroup00

"vgdisplay --partial --verbose" to show the UUID's of PV's that are no
longer preset

"pvcreate --restorefile filename --uuid uuid <device>" to restore the
PV.

filename = /etc/lvm/backup/volGroup00
uuid = the uuid of the PV that failed

"vgcfgrestore --file filename <volGroupName>" to restore the VG metadata

--Sean








More information about the linux-lvm mailing list