Skip to contentSkip to conversation

Accidental relabeling of LVM PV

linux-lvm Shawn Hood 2 participants 3 messages Feb 6, 2009 – Feb 8, 2009

lore
Share & tools
lore

Shawn Hood

author
#0 lore raw

I mistakenly ran parted mklabel on an LVM PV (/dev/sdg1). Presumably, this damaged the metadata area of the PV. Will pvcreate --restorefile <backup> --uuid <old_uuid> /dev/sdg1 solve my problems if it executes successfully, or have I damaged? I've tried running it but receive the following error:

Couldn't find device with uuid '6LivE9-tYvi-H8Tm-yQbP-f7tE-OlDO-Nn5jJH'. Can't open /dev/sdg1 exclusively. Mounted filesystem?

/dev/sdg1 is not mounted. I assume a reboot may take care of this problem, but I'm afraid I won't be able to remount the filesystem that exists in the LV on this partition.

Signature · 1 line
Shawn Hood
author
#1 lore raw

"...or have I damaged it worse than I am imagining."

Quoted 2 lines

if it executes successfully, or have I damaged? I've tried running it but receive the following error:

Signature · 1 line
Shawn Hood
#2 lore raw
In reply to Shawn Hood
Quoted 3 lines · Shawn Hood

I mistakenly ran parted mklabel on an LVM PV (/dev/sdg1). Presumably, this damaged the metadata area of the PV. Will pvcreate --restorefile <backup> --uuid <old_uuid> /dev/sdg1 solve my problems

Yep, should do.

--Dave