All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Big question ...
@ 2006-11-22 22:04 Martial Paupe
  2006-11-22 22:29 ` Bryn M. Reeves
  0 siblings, 1 reply; 5+ messages in thread
From: Martial Paupe @ 2006-11-22 22:04 UTC (permalink / raw)
  To: linux-lvm

Hello All,

I put un wrong PV in a Volume Group and now the VG are not available in the 
system.

Howto remove the wrong PV from a inactive VG ?

Best regards

Martial

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Big question ...
  2006-11-22 22:04 [linux-lvm] Big question Martial Paupe
@ 2006-11-22 22:29 ` Bryn M. Reeves
  2006-11-22 22:43   ` Martial Paupe
  0 siblings, 1 reply; 5+ messages in thread
From: Bryn M. Reeves @ 2006-11-22 22:29 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martial Paupe wrote:
> Hello All,
> 
> I put un wrong PV in a Volume Group and now the VG are not available in the 
> system.
> 
> Howto remove the wrong PV from a inactive VG ?
> 
> Best regards
> 
> Martial
> 

Hello Martial,

You should be able to remove a PV from a volume group with vgreduce even
when it is inactive, as long as the PV is still present on the system:

[root ~]# vgchange -an s0
  0 logical volume(s) in volume group "s0" now active
[root ~]# vgreduce s0 /dev/loop1
  Removed "/dev/loop1" from volume group "s0"

If the PV is no longer present, this won't work though:

[root ~]# losetup -d /dev/loop1
[root ~]# vgreduce s0 /dev/loop1
  Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
  Couldn't find all physical volumes for volume group s0.
  Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
  Couldn't find all physical volumes for volume group s0.
  Volume group "s0" doesn't exist

In this case, you can make the volume group consistent again with
"--removemissing":

[root ~]# vgreduce --removemissing s0
  Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
  Couldn't find all physical volumes for volume group s0.
  Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
  Couldn't find all physical volumes for volume group s0.
  Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
  Wrote out consistent volume group s0

Be aware though that if the PV you want to remove was actually in use
you risk loosing whatever data was stored on it by this method - if
possible get the PV back on the system and use the normal vgreduce.

If this doesn't help then it would be useful to know what versions of
LVM2 and device-mapper you are using and what distribution this is on.

Regards,

Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFZM8+6YSQoMYUY94RAp9pAKCgEdic3bWk9+kEefAifHaoTgTOswCfXlO4
txQM7flkwstodOJmp2Ni1ME=
=jwiV
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Big question ...
  2006-11-22 22:29 ` Bryn M. Reeves
@ 2006-11-22 22:43   ` Martial Paupe
  2006-11-22 23:10     ` Bryn M. Reeves
  0 siblings, 1 reply; 5+ messages in thread
From: Martial Paupe @ 2006-11-22 22:43 UTC (permalink / raw)
  To: LVM general discussion and development

Hello Bryn,

On Wednesday 22 November 2006 23:29, Bryn M. Reeves wrote:
I think that you speak about LVM2. I use RHES 3.5 and the version of lvm are 
lvm-1.0.8-14.


> Hello Martial,
>
> You should be able to remove a PV from a volume group with vgreduce even
> when it is inactive, as long as the PV is still present on the system:
>
> [root ~]# vgchange -an s0
> � 0 logical volume(s) in volume group "s0" now active
> [root ~]# vgreduce s0 /dev/loop1
> � Removed "/dev/loop1" from volume group "s0"

vgchange -an VG_vobs
vgchange -- volume group "VG_vobs" successfully deactivated

 vgreduce VG_vobs /dev/emcpowera1
vgreduce -- ERROR: volume group "VG_vobs" doesn't exist
>
> If the PV is no longer present, this won't work though:
>
> [root ~]# losetup -d /dev/loop1
> [root ~]# vgreduce s0 /dev/loop1
> � Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
> � Couldn't find all physical volumes for volume group s0.
> � Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
> � Couldn't find all physical volumes for volume group s0.
> � Volume group "s0" doesn't exist
>
> In this case, you can make the volume group consistent again with
> "--removemissing":
 I don't have this option. I can't do that

>
> [root ~]# vgreduce --removemissing s0
> � Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
> � Couldn't find all physical volumes for volume group s0.
> � Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
> � Couldn't find all physical volumes for volume group s0.
> � Couldn't find device with uuid 'Tzx4n9-iA60-yu3U-9oRe-R0jh-RBb4-Sw8EmF'.
> � Wrote out consistent volume group s0
>
> Be aware though that if the PV you want to remove was actually in use
> you risk loosing whatever data was stored on it by this method - if
> possible get the PV back on the system and use the normal vgreduce.
>
> If this doesn't help then it would be useful to know what versions of
> LVM2 and device-mapper you are using and what distribution this is on.
-- 
Martial Paupe
Kudelski Group
[D] +41 21 732 04 55
[E] martial.paupe<AT>nagra.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Big question ...
  2006-11-22 22:43   ` Martial Paupe
@ 2006-11-22 23:10     ` Bryn M. Reeves
  2006-11-22 23:48       ` Martial Paupe
  0 siblings, 1 reply; 5+ messages in thread
From: Bryn M. Reeves @ 2006-11-22 23:10 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martial Paupe wrote:
> Hello Bryn,
> 
> On Wednesday 22 November 2006 23:29, Bryn M. Reeves wrote:
> I think that you speak about LVM2. I use RHES 3.5 and the version of lvm are 
> lvm-1.0.8-14.
> 

Yes, I was referring to LVM2. LVM1 doesn't have the --removemissing flag
to vgreduce.

By default LVM1 should make a backup of the volume group metadata before
the vgextend command adds a new PV- it's worth checking /etc/lvmconf to
see if you can restore the old metadata.

Use vgcfgrestore -f <file> -n <vgname> -ll to see the physical & logical
volumes in the backups and restore from the last good one (only the
metadata is restored - data in the LVs remains unchanged).

See the man page for vgcfgbackup/vgcfgrestore for more details.

Regards,

Bryn.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFZNjM6YSQoMYUY94RAl+BAJ9Uk4x6vBPyd3t/yNRn5dsKF1+DSQCg1n4r
LV8bL4p55bumwzSbmQXunok=
=RPre
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Big question ...
  2006-11-22 23:10     ` Bryn M. Reeves
@ 2006-11-22 23:48       ` Martial Paupe
  0 siblings, 0 replies; 5+ messages in thread
From: Martial Paupe @ 2006-11-22 23:48 UTC (permalink / raw)
  To: LVM general discussion and development

Ok I'm in origin state no. I will sleep now and tomorow I will study my 
problem.

Many thanks for your help. Unluckly I can't offer to you a big beer ;-)

Best regards
Martial


On Thursday 23 November 2006 00:10, Bryn M. Reeves wrote:
> Martial Paupe wrote:
> > Hello Bryn,
> >
> > On Wednesday 22 November 2006 23:29, Bryn M. Reeves wrote:
> > I think that you speak about LVM2. I use RHES 3.5 and the version of lvm
> > are lvm-1.0.8-14.
>
> Yes, I was referring to LVM2. LVM1 doesn't have the --removemissing flag
> to vgreduce.
>
> By default LVM1 should make a backup of the volume group metadata before
> the vgextend command adds a new PV- it's worth checking /etc/lvmconf to
> see if you can restore the old metadata.
>
> Use vgcfgrestore -f <file> -n <vgname> -ll to see the physical & logical
> volumes in the backups and restore from the last good one (only the
> metadata is restored - data in the LVs remains unchanged).
>
> See the man page for vgcfgbackup/vgcfgrestore for more details.
>
> Regards,
>
> Bryn.
>
>
>
> _______________________________________________
> 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/
-- 
Martial Paupe
Kudelski Group
[D] +41 21 732 04 55
[E] martial.paupe<AT>nagra.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-22 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-22 22:04 [linux-lvm] Big question Martial Paupe
2006-11-22 22:29 ` Bryn M. Reeves
2006-11-22 22:43   ` Martial Paupe
2006-11-22 23:10     ` Bryn M. Reeves
2006-11-22 23:48       ` Martial Paupe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.