copying lvm with the same name

Aldo Foot lunixer at gmail.com
Thu Mar 19 18:23:27 UTC 2009


On Thu, Mar 19, 2009 at 10:17 AM, Rick Stevens <ricks at nerd.com> wrote:
> Frank Cox wrote:
>>
>> On Wed, 18 Mar 2009 17:07:28 -0700
>> Rick Stevens wrote:
>>
>>> We have a serious conflict here.  The df command shows you as on sda,
>>> but LVM is reporting sdb.  My gut reaction is to have you do a:
>>>
>>>        vgreduce --test VolGroup00 /dev/sdb2
>>>
>>> and see if it would be successful.  If so, then remove the "--test" and
>>> cross your fingers.
>>
>> [root at mutt temp]# vgreduce --test VolGroup00 /dev/sdb2
>>  Test mode: Metadata will NOT be updated.
>>  Physical Volume "/dev/sdb2" not found in Volume Group "VolGroup00"
>>
>> This is consistent with the fact that the "active" Volume Group that I'm
>> using
>> is not on /dev/sdb2.  It's just the "lvdisplay -vm" command that shows it
>> as
>> being in use.
>
> This is truly screwey.  The pvscan shows sdb2 as part of VolGroup00,
> lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't
> part of the VG.  Hoo, boy.
>
> Frank, this is potentially dangerous, but you can try
>
>        # pvremove /dev/sdb2
>
> to wipe out sdb2's PV status.  Since you seem to be running on /dev/sda
> and vgreduce claims that /dev/sdb2 isn't part of the active VG, you
> should be able to do this without blowing things up.
>
> Damn this makes me nervous!

The pvremove man page does say whether the UUID can be used to remove
a PV. Using the UUID would've come very handy in this kind of situation.

~af




More information about the fedora-list mailing list