All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bryn M. Reeves" <breeves@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Big question ...
Date: Wed, 22 Nov 2006 22:29:19 +0000	[thread overview]
Message-ID: <4564CF3F.1060009@redhat.com> (raw)
In-Reply-To: <200611222304.28368.martial.paupe@nagra.com>

-----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-----

  reply	other threads:[~2006-11-22 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22 22:04 [linux-lvm] Big question Martial Paupe
2006-11-22 22:29 ` Bryn M. Reeves [this message]
2006-11-22 22:43   ` Martial Paupe
2006-11-22 23:10     ` Bryn M. Reeves
2006-11-22 23:48       ` Martial Paupe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4564CF3F.1060009@redhat.com \
    --to=breeves@redhat.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.