[dm-devel] Unable to deactivate lv, pehaps due to semaphore problem...

Gianluca Cecchi gianluca.cecchi at gmail.com
Thu Nov 27 15:56:13 UTC 2014


On Thu, Nov 27, 2014 at 4:43 PM, Zdenek Kabelac <zkabelac at redhat.com> wrote:

>
>> Thanks!
>> here it is:
>> https://drive.google.com/file/d/0BwoPbcrMv8mvellaS1FtVXpqU2c/
>> view?usp=sharing
>>
>>
>>
> Well yes - it shows the device is being held open - lvm2 retries to
> several times if the device does not get close - but it doesn't so it
> refuses o deactivate.
>
> So if you are sure there is no user - then maybe you have some kpartx
> partition this device ?
>

No, the PV is the whole disk and the VG is composed only of this LV that
uses all the PEs

[root at orapr2 ~]# pvs /dev/mapper/360a9800037543544465d424130533177
  PV                                            VG          Fmt  Attr PSize
   PFree
  /dev/mapper/360a9800037543544465d424130533177 VG_AAA_TEMP lvm2 a--
 1020.00m    0

[root at orapr2 ~]# fdisk -l /dev/mapper/360a9800037543544465d424130533177

Disk /dev/mapper/360a9800037543544465d424130533177: 1073 MB, 1073741824
bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000

[root at orapr2 ~]# vgdisplay -v VG_AAA_TEMP
    Using volume group(s) on command line
    Finding volume group "VG_AAA_TEMP"
  --- Volume group ---
  VG Name               VG_AAA_TEMP
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  56
  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               1020.00 MiB
  PE Size               4.00 MiB
  Total PE              255
  Alloc PE / Size       255 / 1020.00 MiB
  Free  PE / Size       0 / 0
  VG UUID               3sItFO-bvAo-FINS-R6Mj-Fcl7-4kF2-gmzY4M

  --- Logical volume ---
  LV Path                /dev/VG_AAA_TEMP/LV_AAA_TEMP
  LV Name                LV_AAA_TEMP
  VG Name                VG_AAA_TEMP
  LV UUID                azFNtf-L1CY-3rdz-OQLA-7oF4-3rMX-uWfXpH
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 1
  LV Size                1020.00 MiB
  Current LE             255
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:49

  --- Physical volumes ---
  PV Name               /dev/mapper/360a9800037543544465d424130533177
  PV UUID               LnsWgD-XfYe-axfJ-nBgC-Gew5-jBH3-oXpiIO
  PV Status             allocatable
  Total PE / Free PE    255 / 0




>
> I'd probably need to see your whole 'dmsetup table'
> (at least do a grep for VG_AAA_TEMP/LV_AAA_TEMP minor)



[root at orapr2 ~]# dmsetup table | egrep
"AAA_TEMP|360a9800037543544465d424130533177|253:4"
VG_AAA_TEMP-LV_AAA_TEMP: 0 2088960 linear 253:4 384
360a9800037543544465d424130533177: 0 2097152 multipath 4 queue_if_no_path
pg_init_retries 50 retain_attached_hw_handler 1 alua 2 1 round-robin 0 4 1
66:160 1 69:192 1 133:224 1 8:288 1 round-robin 0 4 1 8:96 1 68:48 1 129:32
1 130:128 1

It seems no sempahores to be cleaned...
[root at orapr2 ~]# dmsetup udevcomplete_all 1
This operation will destroy all semaphores older than 1 minutes with keys
that have a prefix 3405 (0xd4d).
Do you really want to continue? [y/n]: y
0 semaphores with keys prefixed by 3405 (0xd4d) destroyed. 0 skipped.

and still
[root at orapr2 ~]# lvchange -an VG_AAA_TEMP/LV_AAA_TEMP
  Logical volume VG_AAA_TEMP/LV_AAA_TEMP in use.

;-(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20141127/8d38c1cb/attachment.htm>


More information about the dm-devel mailing list