Skip to contentSkip to conversation

how to change uuid of a PV?

linux-lvm HYUN-CHUL KIM 2 participants 2 messages Jun 23, 2005

lore
Share & tools
lore
#0 lore raw

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?

Sincerely,

Hyun-Chul Kim

Computational Cell Biology Laboratory Department of Biosystems
Korea Advanced Institute of Science and Technology Yusung-Gu, Taejon 305-333
Republic of Korea

#1 lore raw
Quoted 11 lines · HYUN-CHUL KIM

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.

Quoted 8 lines

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