* [linux-lvm] Conflicting vg names but can't rename one
@ 2010-12-17 17:27 Mauricio Tavares
2010-12-17 18:46 ` Alasdair G Kergon
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mauricio Tavares @ 2010-12-17 17:27 UTC (permalink / raw)
To: LVM general discussion and development
I took a drive from an ailing machine to suck the data out of it. This
drive used to be part of a single drive LVM. Now, when I connect it to
my machine, I realized I had named that vg the same name I had used in
the vg I have in my desktop associated with just one drive,
vgdisplay export
WARNING: Duplicate VG name export: Existing
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
--- Volume group ---
VG Name export
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.76 GiB
PE Size 4.00 MiB
Total PE 119234
Alloc PE / Size 102400 / 400.00 GiB
Free PE / Size 16834 / 65.76 GiB
VG UUID fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
We see that UUID fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB is the drive/vg
in use while UUID SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D is the extra
drive I just attached to my machine. So I thought on using vgrename to
change the name of the extra drive's vg so I can mount it:
vgrename SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D export1
WARNING: Duplicate VG name export: Existing
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
WARNING: Duplicate VG name export: Existing
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
WARNING: Duplicate VG name export:
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
Volume group "export" still has active LVs
What am I missing here? I thought if I told it to rename the vg with a
given uuid I would be golden. As you can see, that is not the case.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 17:27 [linux-lvm] Conflicting vg names but can't rename one Mauricio Tavares
@ 2010-12-17 18:46 ` Alasdair G Kergon
2010-12-17 19:38 ` Mauricio Tavares
2010-12-17 18:56 ` Richard Shaw
2010-12-17 21:37 ` chris procter
2 siblings, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2010-12-17 18:46 UTC (permalink / raw)
To: Mauricio Tavares; +Cc: LVM general discussion and development
What version of lvm2?
Try a newer one in case it's something we already fixed.
(An entry in 2.02.63 changelog might be relevant.)
If it still fails on the latest upstream, obtain output with
the -vvvv flags and post a link to it.
Alasdair
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 17:27 [linux-lvm] Conflicting vg names but can't rename one Mauricio Tavares
2010-12-17 18:46 ` Alasdair G Kergon
@ 2010-12-17 18:56 ` Richard Shaw
2010-12-17 20:29 ` Mauricio Tavares
2010-12-17 21:37 ` chris procter
2 siblings, 1 reply; 8+ messages in thread
From: Richard Shaw @ 2010-12-17 18:56 UTC (permalink / raw)
To: LVM general discussion and development
On Fri, Dec 17, 2010 at 11:27 AM, Mauricio Tavares <raubvogel@gmail.com> wrote:
> vgrename SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D export1
> �WARNING: Duplicate VG name export: Existing
> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �WARNING: Duplicate VG name export: Existing
> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �WARNING: Duplicate VG name export: fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
> (created here) takes precedence over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �Volume group "export" still has active LVs
>
> What am I missing here? I thought if I told it to rename the vg with a given
> uuid I would be golden. As you can see, that is not the case.
I think you need to make the vg unavailable before you can rename it:
vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
then your vgrename should work.
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 18:46 ` Alasdair G Kergon
@ 2010-12-17 19:38 ` Mauricio Tavares
0 siblings, 0 replies; 8+ messages in thread
From: Mauricio Tavares @ 2010-12-17 19:38 UTC (permalink / raw)
To: LVM general discussion and development
On 12/17/2010 01:46 PM, Alasdair G Kergon wrote:
> What version of lvm2?
>
> Try a newer one in case it's something we already fixed.
> (An entry in 2.02.63 changelog might be relevant.)
>
> If it still fails on the latest upstream, obtain output with
> the -vvvv flags and post a link to it.
>
> Alasdair
>
lvm version
WARNING: Running as a non-root user. Functionality may be unavailable.
LVM version: 2.02.54(1) (2009-10-26)
Library version: 1.02.39 (2009-10-26)
/dev/mapper/control: open failed: Permission denied
Failure to communicate with kernel device-mapper driver.
I do not know how ancient it is, but it seems that is the one that is
currently available as a package for ubuntu 10.10
(http://packages.ubuntu.com/maverick/lvm2-udeb). Am I missing anything?
The HD in question has a VG that is a few years old (and done in centos
4.7).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 18:56 ` Richard Shaw
@ 2010-12-17 20:29 ` Mauricio Tavares
2010-12-17 21:11 ` Stuart D Gathman
2010-12-17 21:37 ` Richard Shaw
0 siblings, 2 replies; 8+ messages in thread
From: Mauricio Tavares @ 2010-12-17 20:29 UTC (permalink / raw)
To: LVM general discussion and development
On 12/17/2010 01:56 PM, Richard Shaw wrote:
> On Fri, Dec 17, 2010 at 11:27 AM, Mauricio Tavares<raubvogel@gmail.com> wrote:
>> vgrename SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D export1
>> WARNING: Duplicate VG name export: Existing
>> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
>> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>> WARNING: Duplicate VG name export: Existing
>> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
>> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>> WARNING: Duplicate VG name export: fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
>> (created here) takes precedence over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>> Volume group "export" still has active LVs
>>
>> What am I missing here? I thought if I told it to rename the vg with a given
>> uuid I would be golden. As you can see, that is not the case.
>
> I think you need to make the vg unavailable before you can rename it:
>
> vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>
> then your vgrename should work.
>
> Richard
>
Do you think I need to persuade it some more?
raub@ubuntu:~$ sudo vgdisplay export
WARNING: Duplicate VG name export: Existing
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
--- Volume group ---
VG Name export
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.76 GiB
PE Size 4.00 MiB
Total PE 119234
Alloc PE / Size 102400 / 400.00 GiB
Free PE / Size 16834 / 65.76 GiB
VG UUID fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
raub@ubuntu:~$ sudo vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
WARNING: Duplicate VG name export: Existing
fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
Volume group "SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D" not found
raub@ubuntu:~$
Maybe I need to unmount/disconnect the hard drive with the vg being used
and then try to rename the other drive...
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 20:29 ` Mauricio Tavares
@ 2010-12-17 21:11 ` Stuart D Gathman
2010-12-17 21:37 ` Richard Shaw
1 sibling, 0 replies; 8+ messages in thread
From: Stuart D Gathman @ 2010-12-17 21:11 UTC (permalink / raw)
To: linux-lvm
On 12/17/2010 03:29 PM, Mauricio Tavares wrote:
>
> raub@ubuntu:~$ sudo vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> WARNING: Duplicate VG name export: Existing
> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
> over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> Volume group "SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D" not found
> raub@ubuntu:~$
>
> Maybe I need to unmount/disconnect the hard drive with the vg being
> used and then try to rename the other drive...
There is a vgimportclone script posted to this list, and added to recent
LVM sources, that handles the situation where the UUID is also identical
(due to hardware cloning). Since you have distinct UUIDs, there is
something we are all missing.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 17:27 [linux-lvm] Conflicting vg names but can't rename one Mauricio Tavares
2010-12-17 18:46 ` Alasdair G Kergon
2010-12-17 18:56 ` Richard Shaw
@ 2010-12-17 21:37 ` chris procter
2 siblings, 0 replies; 8+ messages in thread
From: chris procter @ 2010-12-17 21:37 UTC (permalink / raw)
To: LVM general discussion and development
You could try using vgimportclone, eg:
vgimportclone -n newvgname /dev/sdb
(replacing /dev/sdb with your new device name obviously)
vgimportclone works by setting up its own little lvm environment where only
/dev/sdb exists so it shouldn't get confused by the preexisting VG (which
presumably has the active LVs that are causing lvm to get confused)
Doesn't explain why it doesn't work in the first place though
chris
----- Original Message ----
> From: Mauricio Tavares <raubvogel@gmail.com>
> To: LVM general discussion and development <linux-lvm@redhat.com>
> Sent: Friday, 17 December, 2010 17:27:13
> Subject: [linux-lvm] Conflicting vg names but can't rename one
>
> I took a drive from an ailing machine to suck the data out of it. This
>drive used to be part of a single drive LVM. Now, when I connect it to my
>machine, I realized I had named that vg the same name I had used in the vg I
>have in my desktop associated with just one drive,
>
> vgdisplay export
> WARNING: Duplicate VG name export: Existing
>fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
>SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> --- Volume group ---
> VG Name export
> System ID
> Format lvm2
> Metadata Areas 1
> Metadata Sequence No 2
> VG Access read/write
> VG Status resizable
> MAX LV 0
> Cur LV 1
> Open LV 1
> Max PV 0
> Cur PV 1
> Act PV 1
> VG Size 465.76 GiB
> PE Size 4.00 MiB
> Total PE 119234
> Alloc PE / Size 102400 / 400.00 GiB
> Free PE / Size 16834 / 65.76 GiB
> VG UUID fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
>
> We see that UUID fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB is the drive/vg in
>use while UUID SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D is the extra drive I just
>attached to my machine. So I thought on using vgrename to change the name of
>the extra drive's vg so I can mount it:
>
> vgrename SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D export1
> WARNING: Duplicate VG name export: Existing
>fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
>SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> WARNING: Duplicate VG name export: Existing
>fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
>SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> WARNING: Duplicate VG name export: fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
>(created here) takes precedence over SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> Volume group "export" still has active LVs
>
> What am I missing here? I thought if I told it to rename the vg with a given
>uuid I would be golden. As you can see, that is not the case.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Conflicting vg names but can't rename one
2010-12-17 20:29 ` Mauricio Tavares
2010-12-17 21:11 ` Stuart D Gathman
@ 2010-12-17 21:37 ` Richard Shaw
1 sibling, 0 replies; 8+ messages in thread
From: Richard Shaw @ 2010-12-17 21:37 UTC (permalink / raw)
To: LVM general discussion and development
On Fri, Dec 17, 2010 at 2:29 PM, Mauricio Tavares <raubvogel@gmail.com> wrote:
> On 12/17/2010 01:56 PM, Richard Shaw wrote:
>>
>> On Fri, Dec 17, 2010 at 11:27 AM, Mauricio Tavares<raubvogel@gmail.com>
>> �wrote:
>>>
>>> vgrename SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D export1
>>> �WARNING: Duplicate VG name export: Existing
>>> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
>>> over
>>> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>>> �WARNING: Duplicate VG name export: Existing
>>> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence
>>> over
>>> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>>> �WARNING: Duplicate VG name export:
>>> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
>>> (created here) takes precedence over
>>> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>>> �Volume group "export" still has active LVs
>>>
>>> What am I missing here? I thought if I told it to rename the vg with a
>>> given
>>> uuid I would be golden. As you can see, that is not the case.
>>
>> I think you need to make the vg unavailable before you can rename it:
>>
>> vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
>>
>> then your vgrename should work.
>>
>> Richard
>>
> � � � �Do you think I need to persuade it some more?
>
> raub@ubuntu:~$ sudo vgdisplay export
> �WARNING: Duplicate VG name export: Existing
> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �--- Volume group ---
> �VG Name � � � � � � � export
> �System ID
> �Format � � � � � � � �lvm2
> �Metadata Areas � � � �1
> �Metadata Sequence No �2
> �VG Access � � � � � � read/write
> �VG Status � � � � � � resizable
> �MAX LV � � � � � � � �0
> �Cur LV � � � � � � � �1
> �Open LV � � � � � � � 1
> �Max PV � � � � � � � �0
> �Cur PV � � � � � � � �1
> �Act PV � � � � � � � �1
> �VG Size � � � � � � � 465.76 GiB
> �PE Size � � � � � � � 4.00 MiB
> �Total PE � � � � � � �119234
> �Alloc PE / Size � � � 102400 / 400.00 GiB
> �Free �PE / Size � � � 16834 / 65.76 GiB
> �VG UUID � � � � � � � fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB
>
> raub@ubuntu:~$ sudo vgchange -an SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �WARNING: Duplicate VG name export: Existing
> fjM9qy-aCEM-iluj-yTdQ-CwT5-Iijk-uOYXlB (created here) takes precedence over
> SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D
> �Volume group "SB3NfW-swQM-5rdw-xf5e-z6At-r5DM-dUwG7D" not found
> raub@ubuntu:~$
>
> Maybe I need to unmount/disconnect the hard drive with the vg being used and
> then try to rename the other drive...
When I run into things like this I go for the Live CD or Live USB
stick and boot to it. For your specific situation I would disconnect
the new drive and boot a live version of your disto (I'm not sure if
you've said what your running) or if that's not practical get a copy
of System Rescue CD[1] and boot it.
It will probably activate the volume groups by default so you'll have
to go through, "vgchange -an /dev/export" then do the "vgrename ..."
Richard
[1] http://www.sysresccd.org/Main_Page
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-17 21:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-17 17:27 [linux-lvm] Conflicting vg names but can't rename one Mauricio Tavares
2010-12-17 18:46 ` Alasdair G Kergon
2010-12-17 19:38 ` Mauricio Tavares
2010-12-17 18:56 ` Richard Shaw
2010-12-17 20:29 ` Mauricio Tavares
2010-12-17 21:11 ` Stuart D Gathman
2010-12-17 21:37 ` Richard Shaw
2010-12-17 21:37 ` chris procter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).