All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] LVM says physical volumes are missing, but they are not
@ 2016-05-29 16:50 Phillip Susi
  2016-05-30  8:15 ` Zdenek Kabelac
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2016-05-29 16:50 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I upgraded last night to Ubuntu 16.04, and LVM has ( even when booting
back into 15.10 ) decided that two of my three physical volumes are
missing, but they are not:

psusi@faldara:~$ sudo pvs
  PV         VG      Fmt  Attr PSize   PFree
  /dev/md0   faldara lvm2 a-m  101.91g  58.91g
  /dev/md1   faldara lvm2 a-m    1.69t 264.86g
  /dev/sdb1  faldara lvm2 a--    1.82t   1.81t
psusi@faldara:~$ sudo vgchange -ay
  Refusing activation of partial LV faldara/Music.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/Videos.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/swap.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/trusty-old.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/vivid.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/pool0.  Use
'--activationmode partial' to override.
  Refusing activation of partial LV faldara/xenial.  Use
'--activationmode partial' to override.
  6 logical volume(s) in volume group "faldara" now active

If I use --activationmode partial, then all volumes are correctly
mapped, with no missing extents:

psusi@faldara:~$ sudo dmsetup table faldara-vivid
0 44040192 linear 9:1 2468358144
44040192 24969216 linear 9:1 2996840448
69009408 14876672 linear 8:17 2048
psusi@faldara:~$ sudo dmsetup table faldara-xenial
0 83886080 linear 9:0 98304

How can it claim the pvs are missing, and then go ahead and use them?
 Is there a way to manually clear the missing flag from the pv?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCgAGBQJXSx3JAAoJEBB5UWFcu6UWR2kIAKZIGGP3cM09FZqgtkj9VweH
upjc6Sw79jrPBVDbaZQICoFM5rrqra3ehWRge3nKNIZ78QRW9jKJoz9H1MJtFtCd
npfE4s/0URL/UTjChHzV4VR4RHU5bg8NzfeQjyb89k+yTPw6I0zEbmDDlk0H5LCD
9Uho3WILFHrrYE9C/PE1Kb7qx5y9gp/64PYEkRXsVKvvfOq6BPKLlMyjpplVYuxV
wZ7sLpwzOkC2iqex/OleqaiOPrroH2vasVwWtuHBpxFe4z1JsXTHdSSJ8HtrEdii
JnX9ff9fygl7OsOyldSkIZhfuYyPBXmae1qQwLa8SJyurnUE9vE18JFqZFHTGhg=
=Fn0J
-----END PGP SIGNATURE-----

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

* Re: [linux-lvm] LVM says physical volumes are missing, but they are not
  2016-05-29 16:50 [linux-lvm] LVM says physical volumes are missing, but they are not Phillip Susi
@ 2016-05-30  8:15 ` Zdenek Kabelac
  2016-05-30 19:53   ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Zdenek Kabelac @ 2016-05-30  8:15 UTC (permalink / raw)
  To: linux-lvm, Phillip Susi

On 29.5.2016 18:50, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> I upgraded last night to Ubuntu 16.04, and LVM has ( even when booting
> back into 15.10 ) decided that two of my three physical volumes are
> missing, but they are not:
>
> psusi@faldara:~$ sudo pvs
>   PV         VG      Fmt  Attr PSize   PFree
>   /dev/md0   faldara lvm2 a-m  101.91g  58.91g
>   /dev/md1   faldara lvm2 a-m    1.69t 264.86g
>   /dev/sdb1  faldara lvm2 a--    1.82t   1.81t
> psusi@faldara:~$ sudo vgchange -ay
>   Refusing activation of partial LV faldara/Music.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/Videos.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/swap.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/trusty-old.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/vivid.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/pool0.  Use
> '--activationmode partial' to override.
>   Refusing activation of partial LV faldara/xenial.  Use
> '--activationmode partial' to override.
>   6 logical volume(s) in volume group "faldara" now active
>
> If I use --activationmode partial, then all volumes are correctly
> mapped, with no missing extents:

Hi

Please provide full 'vgchage -ay -vvvv' trace of such activation command.

Also specify which version of lvm2 is in use by your distro.

Regards

Zdenek

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

* Re: [linux-lvm] LVM says physical volumes are missing, but they are not
  2016-05-30  8:15 ` Zdenek Kabelac
@ 2016-05-30 19:53   ` Phillip Susi
  2016-05-31  8:33     ` Zdenek Kabelac
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2016-05-30 19:53 UTC (permalink / raw)
  To: Zdenek Kabelac, linux-lvm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 05/30/2016 04:15 AM, Zdenek Kabelac wrote:
> Hi
> 
> Please provide full 'vgchage -ay -vvvv' trace of such activation
> command.
> 
> Also specify which version of lvm2 is in use by your distro.

2.02.133-1ubuntu10.  I ended up fixing it by doing a vgcfgbackup,
manually editing the text file to remove the MISSING flags, and then
vgcfgrestore.  My guess is that when I initially installed 16.04, I
forgot to install mdadm, and so the init scripts must have forced a
partial activation without the raid pvs present, and that set the
MISSING flag on those pvs in the metadata on the remaining drive.
Once set, there appears to be no way to remedy this other than what I
ended up doing.  It seems to me that having the volume actually
present should override the MISSING flag in the metadata, or at least
you should be able to clear the flag with pvchange.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCgAGBQJXTJooAAoJEBB5UWFcu6UWfoEH/iYx2giltU+WiJO382qWCzy7
g73itTdrC9oTsQVtYaMqHNtnZQfjxBIzCilpSMfMU7xpvmWGA8rCgNBpc6CNx/29
YB4T4nEEvFgklGPfq6PLDrBwxgOWkiBgwbDtjxwrFAC2mDerx/Y5SXZHYZmne08t
aKT6noyDAaepMlxxzFg3YpD0zI4brcvQZ2WPlZy0T2KxfxDriwwcD6U2pyRla6Gf
7KMO5orF6lSqzDXogfWb4AEjSgiFAkTYsgV49gouunWsyJIsur7BFVtV9MmrEgOP
3CQmAdhVowefe3K2OSxZ3luBLT0aWD4yGo285w+/IhfTzeAC3b9srmFC2eU9Szo=
=mNGi
-----END PGP SIGNATURE-----

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

* Re: [linux-lvm] LVM says physical volumes are missing, but they are not
  2016-05-30 19:53   ` Phillip Susi
@ 2016-05-31  8:33     ` Zdenek Kabelac
  0 siblings, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2016-05-31  8:33 UTC (permalink / raw)
  To: linux-lvm

Dne 30.5.2016 v 21:53 Phillip Susi napsal(a):
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 05/30/2016 04:15 AM, Zdenek Kabelac wrote:
>> Hi
>>
>> Please provide full 'vgchage -ay -vvvv' trace of such activation
>> command.
>>
>> Also specify which version of lvm2 is in use by your distro.
>
> 2.02.133-1ubuntu10.  I ended up fixing it by doing a vgcfgbackup,
> manually editing the text file to remove the MISSING flags, and then

Hi

Instead of doing manual 'edit' you should have used:

vgextend --restoremissing  /dev/your_restored_pv

If you do a manual edit - there is quite large probability the restored
device will cause data inconsistencies for raid/mirrors....


(And complementary command if you would have wanted to drop a missing PV:
vgreduce --removemissing)


Regards

Zdenek

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

end of thread, other threads:[~2016-05-31  8:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-29 16:50 [linux-lvm] LVM says physical volumes are missing, but they are not Phillip Susi
2016-05-30  8:15 ` Zdenek Kabelac
2016-05-30 19:53   ` Phillip Susi
2016-05-31  8:33     ` Zdenek Kabelac

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.