linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
@ 2013-01-23 20:56 Joschi Brauchle
  2013-01-24  5:25 ` Marian Csontos
  2013-01-24  5:50 ` mohammad azimi
  0 siblings, 2 replies; 6+ messages in thread
From: Joschi Brauchle @ 2013-01-23 20:56 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

Hello,

I get the following error with lvm2.02.98:
-----------
#/sbin/vgdisplay --units k -v 'system'

   --- Volume group ---
   VG Name               system
   System ID
   Format                lvm2
   Metadata Areas        1
   Metadata Sequence No  13
   VG Access             read/write
   VG Status             resizable
   MAX LV                0
   Cur LV                0
   Open LV               0
   Max PV                0
   Cur PV                1
   Act PV                1
   VG Size               104669184.00 KiB
   PE Size               4096.00 KiB
   Total PE              25554
   Alloc PE / Size       0 / 0 KiB
   Free  PE / Size       25554 / 104669184.00 KiB
   VG UUID               Qs0uaZ-L88n-tC7T-fZQj-sgJY-2yRX-Dlt2Cr

   --- Physical volumes ---
   PV Name               /dev/sda3
   PV UUID               wzGjXi-F2lT-d2d4-l5a6-EmfM-W838-YxaFIh
   PV Status             allocatable
   Total PE / Free PE    25554 / 25554
-----------

VG system is empty, but still:
-----------
# /sbin/vgremove 'system'
-----------
failes with status code 5, which means 'can't remove volume group 
containing logical volumes' (from man page).

Looks like a bug in vgremove?

Best regards,
J Brauchle


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4607 bytes --]

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

* Re: [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
  2013-01-23 20:56 [linux-lvm] vgremove fails to remove empty VG (v2.02.98) Joschi Brauchle
@ 2013-01-24  5:25 ` Marian Csontos
  2013-01-24  8:09   ` Joschi Brauchle
  2013-01-24  5:50 ` mohammad azimi
  1 sibling, 1 reply; 6+ messages in thread
From: Marian Csontos @ 2013-01-24  5:25 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Joschi Brauchle

On 01/23/2013 09:56 PM, Joschi Brauchle wrote:
> Hello,

Hello!

>
> I get the following error with lvm2.02.98:
> -----------
> #/sbin/vgdisplay --units k -v 'system'
>
> --- Volume group ---
> VG Name system
> System ID
> Format lvm2
> Metadata Areas 1
> Metadata Sequence No 13
> VG Access read/write
> VG Status resizable
> MAX LV 0
> Cur LV 0
> Open LV 0
> Max PV 0
> Cur PV 1
> Act PV 1
> VG Size 104669184.00 KiB
> PE Size 4096.00 KiB
> Total PE 25554
> Alloc PE / Size 0 / 0 KiB
> Free PE / Size 25554 / 104669184.00 KiB
> VG UUID Qs0uaZ-L88n-tC7T-fZQj-sgJY-2yRX-Dlt2Cr
>
> --- Physical volumes ---
> PV Name /dev/sda3
> PV UUID wzGjXi-F2lT-d2d4-l5a6-EmfM-W838-YxaFIh
> PV Status allocatable
> Total PE / Free PE 25554 / 25554
> -----------
>
> VG system is empty, but still:
> -----------
> # /sbin/vgremove 'system'
> -----------
> failes with status code 5, which means 'can't remove volume group
> containing logical volumes' (from man page).
>


> Looks like a bug in vgremove?

Possibly. Could you fill in these gaps in the puzzle:

0. Which distro?

1. Do a lvmdump for bug report:

     lvmdump -ma

2. Try with verbose

     vgremove -vvvv &> vgremove-dirty.out

3. Check if lvmetad is running:

     ps aux | grep lvmetad

3.1 if so, the issue is likely to go away after restarting it. If you 
`gcore` or `kill -SEGV` it to get a core dump it may help us.

3.2 do another lvmdump here, to get "updated" data after lvmdump restart

3.3 retry vgremove

     vgremove -vvvv &> vgremove-reloaded.out

4. pastebin the vgremove-dirty.out and we will be able to tell more then.

>
> Best regards,
> J Brauchle
>
>
>
> _______________________________________________
> 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] 6+ messages in thread

* Re: [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
  2013-01-23 20:56 [linux-lvm] vgremove fails to remove empty VG (v2.02.98) Joschi Brauchle
  2013-01-24  5:25 ` Marian Csontos
@ 2013-01-24  5:50 ` mohammad azimi
  2013-01-24 10:28   ` Joschi Brauchle
  1 sibling, 1 reply; 6+ messages in thread
From: mohammad azimi @ 2013-01-24  5:50 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

Hi

Did you used vgreduce to release free the disk?
 On Jan 24, 2013 8:02 AM, "Joschi Brauchle" <joschi.brauchle@tum.de> wrote:

> Hello,
>
> I get the following error with lvm2.02.98:
> -----------
> #/sbin/vgdisplay --units k -v 'system'
>
>   --- Volume group ---
>   VG Name               system
>   System ID
>   Format                lvm2
>   Metadata Areas        1
>   Metadata Sequence No  13
>   VG Access             read/write
>   VG Status             resizable
>   MAX LV                0
>   Cur LV                0
>   Open LV               0
>   Max PV                0
>   Cur PV                1
>   Act PV                1
>   VG Size               104669184.00 KiB
>   PE Size               4096.00 KiB
>   Total PE              25554
>   Alloc PE / Size       0 / 0 KiB
>   Free  PE / Size       25554 / 104669184.00 KiB
>   VG UUID               Qs0uaZ-L88n-tC7T-fZQj-sgJY-**2yRX-Dlt2Cr
>
>   --- Physical volumes ---
>   PV Name               /dev/sda3
>   PV UUID               wzGjXi-F2lT-d2d4-l5a6-EmfM-**W838-YxaFIh
>   PV Status             allocatable
>   Total PE / Free PE    25554 / 25554
> -----------
>
> VG system is empty, but still:
> -----------
> # /sbin/vgremove 'system'
> -----------
> failes with status code 5, which means 'can't remove volume group
> containing logical volumes' (from man page).
>
> Looks like a bug in vgremove?
>
> Best regards,
> J Brauchle
>
>
> _______________________________________________
> 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/
>

[-- Attachment #2: Type: text/html, Size: 2249 bytes --]

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

* Re: [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
  2013-01-24  5:25 ` Marian Csontos
@ 2013-01-24  8:09   ` Joschi Brauchle
  2013-01-24 10:44     ` Marian Csontos
  0 siblings, 1 reply; 6+ messages in thread
From: Joschi Brauchle @ 2013-01-24  8:09 UTC (permalink / raw)
  To: Marian Csontos; +Cc: LVM general discussion and development


[-- Attachment #1.1: Type: text/plain, Size: 1744 bytes --]

Thanks for the detailed instructions, here are (some of) the missing 
gaps :-)

>> I get the following error with lvm2.02.98:
>> -----------
>> #/sbin/vgdisplay --units k -v 'system'
>>
>> --- Volume group ---
>> VG Name system
>> System ID
>> Format lvm2
>> Metadata Areas 1
>> Metadata Sequence No 13
>> VG Access read/write
>> VG Status resizable
>> MAX LV 0
>> Cur LV 0
>> Open LV 0
>> Max PV 0
>> Cur PV 1
>> Act PV 1
>> VG Size 104669184.00 KiB
>> PE Size 4096.00 KiB
>> Total PE 25554
>> Alloc PE / Size 0 / 0 KiB
>> Free PE / Size 25554 / 104669184.00 KiB
>> VG UUID Qs0uaZ-L88n-tC7T-fZQj-sgJY-2yRX-Dlt2Cr
>>
>> --- Physical volumes ---
>> PV Name /dev/sda3
>> PV UUID wzGjXi-F2lT-d2d4-l5a6-EmfM-W838-YxaFIh
>> PV Status allocatable
>> Total PE / Free PE 25554 / 25554
>> -----------
>>
>> VG system is empty, but still:
>> -----------
>> # /sbin/vgremove 'system'
>> -----------
>> failes with status code 5, which means 'can't remove volume group
>> containing logical volumes' (from man page).
>>
> 0. Which distro?
openSUSE 12.3 Beta 1 - Problem happens during installation, where an 
existing VGroup shall be removed.
>
> 1. lvmdump -ma
attached (hope that's ok)

> 2. vgremove -vvvv &> vgremove-dirty.out
http://pastebin.com/cmek1bYi

> 3. ps aux | grep lvmetad
Not running, no processes found. Skipping the remaining steps...
>
> 3.1 if so, the issue is likely to go away after restarting it. If you
> `gcore` or `kill -SEGV` it to get a core dump it may help us.
> 3.2 do another lvmdump here, to get "updated" data after lvmdump restart
> 3.3 retry 'vgremove -vvvv &> vgremove-reloaded.out'
> 4. pastebin the vgremove-dirty.out and we will be able to tell more then.

[-- Attachment #1.2: lvmdump-st-test-pxeinstall-2013012475030.tgz --]
[-- Type: application/x-compressed-tar, Size: 21316 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4607 bytes --]

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

* Re: [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
  2013-01-24  5:50 ` mohammad azimi
@ 2013-01-24 10:28   ` Joschi Brauchle
  0 siblings, 0 replies; 6+ messages in thread
From: Joschi Brauchle @ 2013-01-24 10:28 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 3629 bytes --]

On 01/24/2013 06:50 AM, mohammad azimi wrote:
> Did you used vgreduce to release free the disk?
Well, no.

Actually, I am not performing those commands manually.
It is the openSUSE 12.3 installer (YaST2), that performs a sequence of 
commands during installation. It is told to create a new VG on an 
existing LVM partition. Hence, it first removes all LVs in the existing 
VG, then tries to remove the existing, empty VG using 'vgremove system'.

I tried to strip the series of commands from the YaST2 logs:
-------------
"/sbin/lvremove -f -A n  '/dev/system/var_log'"
"/sbin/lvremove -f -A n  '/dev/system/var'"
"/sbin/lvremove -f -A n  '/dev/system/usr'"
"/sbin/lvremove -f -A n  '/dev/system/tmp'"
"/sbin/lvremove -f -A n  '/dev/system/slash'"
"/sbin/lvremove -f -A n  '/dev/system/nobackup'"
"/sbin/vgremove 'system'"
-------------
=> Fails with exit code 5

openSUSE 12.3 is using
   LVM version:     2.02.98(2) (2012-10-15)
   Library version: 1.02.77 (2012-10-15)
   Driver version:  4.23.0


Note that the EXACTLY same sequence of commands works OK for openSUSE 
12.2 using
   LVM version:     2.02.84(2) (2011-02-09)
   Library version: 1.02.63 (2011-02-09)
   Driver version:  4.22.0


> On Jan 24, 2013 8:02 AM, "Joschi Brauchle" <joschi.brauchle@tum.de
> <mailto:joschi.brauchle@tum.de>> wrote:
>
>     Hello,
>
>     I get the following error with lvm2.02.98:
>     -----------
>     #/sbin/vgdisplay --units k -v 'system'
>
>        --- Volume group ---
>        VG Name               system
>        System ID
>        Format                lvm2
>        Metadata Areas        1
>        Metadata Sequence No  13
>        VG Access             read/write
>        VG Status             resizable
>        MAX LV                0
>        Cur LV                0
>        Open LV               0
>        Max PV                0
>        Cur PV                1
>        Act PV                1
>        VG Size               104669184.00 KiB
>        PE Size               4096.00 KiB
>        Total PE              25554
>        Alloc PE / Size       0 / 0 KiB
>        Free  PE / Size       25554 / 104669184.00 KiB
>        VG UUID               Qs0uaZ-L88n-tC7T-fZQj-sgJY-__2yRX-Dlt2Cr
>
>        --- Physical volumes ---
>        PV Name               /dev/sda3
>        PV UUID               wzGjXi-F2lT-d2d4-l5a6-EmfM-__W838-YxaFIh
>        PV Status             allocatable
>        Total PE / Free PE    25554 / 25554
>     -----------
>
>     VG system is empty, but still:
>     -----------
>     # /sbin/vgremove 'system'
>     -----------
>     failes with status code 5, which means 'can't remove volume group
>     containing logical volumes' (from man page).
>
>     Looks like a bug in vgremove?
>
>     Best regards,
>     J Brauchle
>
>
>     _______________________________________________
>     linux-lvm mailing list
>     linux-lvm@redhat.com <mailto:linux-lvm@redhat.com>
>     https://www.redhat.com/mailman/listinfo/linux-lvm
>     read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
>
> _______________________________________________
> 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/
>

-- 
Dipl.-Ing. Joschi Brauchle, M.S.

Institute for Communications Engineering (LNT)
Technische Universitaet Muenchen (TUM)
80290 Munich, Germany

Tel (work): +49 89 289-23474
Fax (work): +49 89 289-23490
E-mail: joschi.brauchle@tum.de
Web: http://www.lnt.ei.tum.de/


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4607 bytes --]

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

* Re: [linux-lvm] vgremove fails to remove empty VG (v2.02.98)
  2013-01-24  8:09   ` Joschi Brauchle
@ 2013-01-24 10:44     ` Marian Csontos
  0 siblings, 0 replies; 6+ messages in thread
From: Marian Csontos @ 2013-01-24 10:44 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Joschi Brauchle

On 01/24/2013 09:09 AM, Joschi Brauchle wrote:
> Thanks for the detailed instructions, here are (some of) the missing
> gaps :-)
>
>>> I get the following error with lvm2.02.98:
>>> -----------
>>> #/sbin/vgdisplay --units k -v 'system'
>>>
>>> --- Volume group ---
>>> VG Name system
>>> System ID
>>> Format lvm2
>>> Metadata Areas 1
>>> Metadata Sequence No 13
>>> VG Access read/write
>>> VG Status resizable
>>> MAX LV 0
>>> Cur LV 0
>>> Open LV 0
>>> Max PV 0
>>> Cur PV 1
>>> Act PV 1
>>> VG Size 104669184.00 KiB
>>> PE Size 4096.00 KiB
>>> Total PE 25554
>>> Alloc PE / Size 0 / 0 KiB
>>> Free PE / Size 25554 / 104669184.00 KiB
>>> VG UUID Qs0uaZ-L88n-tC7T-fZQj-sgJY-2yRX-Dlt2Cr
>>>
>>> --- Physical volumes ---
>>> PV Name /dev/sda3
>>> PV UUID wzGjXi-F2lT-d2d4-l5a6-EmfM-W838-YxaFIh
>>> PV Status allocatable
>>> Total PE / Free PE 25554 / 25554
>>> -----------
>>>
>>> VG system is empty, but still:
>>> -----------
>>> # /sbin/vgremove 'system'
>>> -----------
>>> failes with status code 5, which means 'can't remove volume group
>>> containing logical volumes' (from man page).
>>>
>> 0. Which distro?
> openSUSE 12.3 Beta 1 - Problem happens during installation, where an
> existing VGroup shall be removed.
>>
>> 1. lvmdump -ma
> attached (hope that's ok)
>
>> 2. vgremove -vvvv &> vgremove-dirty.out
> http://pastebin.com/cmek1bYi
>
>> 3. ps aux | grep lvmetad
> Not running, no processes found. Skipping the remaining steps...
>>
>> 3.1 if so, the issue is likely to go away after restarting it. If you
>> `gcore` or `kill -SEGV` it to get a core dump it may help us.
>> 3.2 do another lvmdump here, to get "updated" data after lvmdump restart
>> 3.3 retry 'vgremove -vvvv &> vgremove-reloaded.out'
>> 4. pastebin the vgremove-dirty.out and we will be able to tell more then.

Any chance the FS containing /etc/lvm is mounted read-only?

If so it may fail. There is a bug as no error is reported in that 
situation. See backup section of lvm.conf - set backup and archive to 
point to a writable FS.

If not, could you send a tarball with /etc/lvm: `tar czf lvmdump-etc 
/etc/lvm/`

Joining us on IRC: #lvm @ freenode guarantees faster answers.

-- Marian

>
>
> _______________________________________________
> 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] 6+ messages in thread

end of thread, other threads:[~2013-01-24 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 20:56 [linux-lvm] vgremove fails to remove empty VG (v2.02.98) Joschi Brauchle
2013-01-24  5:25 ` Marian Csontos
2013-01-24  8:09   ` Joschi Brauchle
2013-01-24 10:44     ` Marian Csontos
2013-01-24  5:50 ` mohammad azimi
2013-01-24 10:28   ` Joschi Brauchle

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