All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-13 18:02 ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-13 18:01 UTC (permalink / raw)
  To: lkml, lvm-devel, dm-devel

It seems one of these commits in
8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
(LVM2.2.02.72) to fail.

Previously good logical volumes cannot be mounted anymore, and new one
cannot be created. All failed with the error ...

"device-mapper: version ioctl failed: Inappropriate ioctl for device"


Is there a new LVM2 for this new dm ioctl or the dm is not right?


Thanks,
Jeff.

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

* linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-13 18:02 ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-13 18:02 UTC (permalink / raw)
  To: lvm-devel

It seems one of these commits in
8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
(LVM2.2.02.72) to fail.

Previously good logical volumes cannot be mounted anymore, and new one
cannot be created. All failed with the error ...

"device-mapper: version ioctl failed: Inappropriate ioctl for device"


Is there a new LVM2 for this new dm ioctl or the dm is not right?


Thanks,
Jeff.



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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-13 18:02 ` Jeff Chua
@ 2010-08-14 15:54   ` Alasdair G Kergon
  -1 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-14 15:54 UTC (permalink / raw)
  To: Jeff Chua; +Cc: device-mapper development, lkml, lvm-devel

On Sat, Aug 14, 2010 at 02:01:47AM +0800, Jeff Chua wrote:
> It seems one of these commits in
> 8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
> (LVM2.2.02.72) to fail.

Did you (partially) bisect that or are you just guessing?
The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

> Previously good logical volumes cannot be mounted anymore, and new one
> cannot be created. All failed with the error ...
> "device-mapper: version ioctl failed: Inappropriate ioctl for device"

What distribution?  What version of udev package?
'lvm version' output?
Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
Add -vvvv to your lvm command for better clues.

> Is there a new LVM2 for this new dm ioctl or the dm is not right?
There's no new dm ioctl.
 
Alasdair


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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-14 15:54   ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-14 15:54 UTC (permalink / raw)
  To: lvm-devel

On Sat, Aug 14, 2010 at 02:01:47AM +0800, Jeff Chua wrote:
> It seems one of these commits in
> 8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
> (LVM2.2.02.72) to fail.

Did you (partially) bisect that or are you just guessing?
The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

> Previously good logical volumes cannot be mounted anymore, and new one
> cannot be created. All failed with the error ...
> "device-mapper: version ioctl failed: Inappropriate ioctl for device"

What distribution?  What version of udev package?
'lvm version' output?
Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
Add -vvvv to your lvm command for better clues.

> Is there a new LVM2 for this new dm ioctl or the dm is not right?
There's no new dm ioctl.
 
Alasdair



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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-14 15:54   ` Alasdair G Kergon
@ 2010-08-14 16:16     ` Alasdair G Kergon
  -1 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-14 16:16 UTC (permalink / raw)
  To: Jeff Chua; +Cc: device-mapper development, lkml, lvm-devel

On Sat, Aug 14, 2010 at 04:54:01PM +0100, Alasdair G Kergon wrote:
> The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

I'm guessing you could have a configuration not covered by the latest userspace
libdevmapper - not handling some combination of kernel+userspace+initrd packages
correctly.  We already dealt with one udev+initrd combination that failed last
week.
 
Alasdair


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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-14 16:16     ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-14 16:16 UTC (permalink / raw)
  To: lvm-devel

On Sat, Aug 14, 2010 at 04:54:01PM +0100, Alasdair G Kergon wrote:
> The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

I'm guessing you could have a configuration not covered by the latest userspace
libdevmapper - not handling some combination of kernel+userspace+initrd packages
correctly.  We already dealt with one udev+initrd combination that failed last
week.
 
Alasdair



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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-14 15:54   ` Alasdair G Kergon
@ 2010-08-15  5:24     ` Jeff Chua
  -1 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-15  5:23 UTC (permalink / raw)
  To: Jeff Chua, device-mapper development, lkml, lvm-devel

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

On Sat, Aug 14, 2010 at 11:54 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Sat, Aug 14, 2010 at 02:01:47AM +0800, Jeff Chua wrote:
>> It seems one of these commits in
>> 8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
>> (LVM2.2.02.72) to fail.
>
> Did you (partially) bisect that or are you just guessing?
> The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

Guessing only. Not bisecting yet. Prior to the git pull, everything
was working fine. And double confirmed by going to prior to the pull,
everything still worked.


>> Previously good logical volumes cannot be mounted anymore, and new one
>> cannot be created. All failed with the error ...
>> "device-mapper: version ioctl failed: Inappropriate ioctl for device"
>
> What distribution?  What version of udev package?

Just a vanilla linux. No udev.


> 'lvm version' output?

  LVM version:     2.02.72(2) (2010-07-28)
  Library version: 1.02.53 (2010-07-28)
  Driver version:  4.17.0


> Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
> Add -vvvv to your lvm command for better clues.

Attached. good.vg01 is from prior to the patch. bad.vg01 is the bad one.

>> Is there a new LVM2 for this new dm ioctl or the dm is not right?
> There's no new dm ioctl.

> I'm guessing you could have a configuration not covered by the latest userspace
> libdevmapper - not handling some combination of kernel+userspace+initrd
> packages correctly.  We already dealt with one udev+initrd combination that
> failed last week.

Could be. Please help.

Thanks,
Jeff

[-- Attachment #2: vg01.good --]
[-- Type: application/octet-stream, Size: 12486 bytes --]

#lvmcmdline.c:1060         Processing: vgchange -ay -vvvv vg01
#lvmcmdline.c:1063         O_DIRECT will be used
#config/config.c:987       Setting global/locking_type to 1
#config/config.c:987       Setting global/wait_for_locks to 1
#locking/locking.c:240       File-based locking selected.
#config/config.c:964       Setting global/locking_dir to /var/lock/lvm
#toollib.c:526     Using volume group(s) on command line
#toollib.c:466     Finding volume group "vg01"
#locking/file_locking.c:235       Locking /var/lock/lvm/V_vg01 RB
#locking/file_locking.c:141         _do_flock /var/lock/lvm/V_vg01:aux WB
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/V_vg01:aux
#locking/file_locking.c:141         _do_flock /var/lock/lvm/V_vg01 RB
#device/dev-io.c:487         Opened /dev/sda15 RO O_DIRECT
#device/dev-io.c:134         /dev/sda15: block size is 512 bytes
#label/label.c:160       /dev/sda15: lvm2 label detected
#cache/lvmcache.c:1136         lvmcache: /dev/sda15: now in VG #orphans_lvm2 (#orphans_lvm2)
#format_text/format-text.c:1180         /dev/sda15: Found metadata at 13824 size 2141 (in area at 4096 size 192512) for vg01 (LPJWM7-4hrp-9bMn-A6Gd-LTc1-COT6-8QZOOI)
#cache/lvmcache.c:1136         lvmcache: /dev/sda15: now in VG vg01 with 1 mdas
#cache/lvmcache.c:923         lvmcache: /dev/sda15: setting vg01 VGID to LPJWM74hrp9bMnA6GdLTc1COT68QZOOI
#cache/lvmcache.c:1173         lvmcache: /dev/sda15: VG vg01: Set creation host to usb.
#label/label.c:270         Using cached label for /dev/sda15
#label/label.c:270         Using cached label for /dev/sda15
#format_text/format-text.c:525         Read vg01 metadata (7) from /dev/sda15 at 13824 size 2141
#cache/lvmcache.c:119         Metadata cache: VG vg01 (LPJWM7-4hrp-9bMn-A6Gd-LTc1-COT6-8QZOOI) stored (2162 bytes).
#metadata/pv_manip.c:296         /dev/sda15 0:      0   4608: lv01(0:0)
#metadata/pv_manip.c:296         /dev/sda15 1:   4608   7168: lv02(0:0)
#metadata/pv_manip.c:296         /dev/sda15 2:  11776   4608: lv03(0:0)
#metadata/pv_manip.c:296         /dev/sda15 3:  16384   2048: lv04(0:0)
#metadata/pv_manip.c:296         /dev/sda15 4:  18432   9728: lv05(0:0)
#metadata/pv_manip.c:296         /dev/sda15 5:  28160  27384: lv06(0:0)
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#ioctl/libdm-iface.c:1890         dm version   OF   [16384]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 NF   [16384]
#vgchange.c:220     6 logical volume(s) in volume group "vg01" already active
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 NF   [16384]
#vgchange.c:226     6 existing logical volume(s) in volume group "vg01" monitored
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv01
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM NF   [16384]
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv02
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl NF   [16384]
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv03
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm NF   [16384]
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv04
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr NF   [16384]
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv05
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA NF   [16384]
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv06
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 NF   [16384]
#vgchange.c:156     Activated 6 logical volumes in volume group vg01
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA NF   [16384]
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#ioctl/libdm-iface.c:1890         dm info  LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 NF   [16384]
#cache/lvmcache.c:85         Metadata cache: VG vg01 wiped.
#locking/file_locking.c:74       Unlocking /var/lock/lvm/V_vg01
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/V_vg01
#device/dev-io.c:533         Closed /dev/sda15
  6 logical volume(s) in volume group "vg01" now active

[-- Attachment #3: vg01.bad --]
[-- Type: application/octet-stream, Size: 14373 bytes --]

#lvmcmdline.c:1060         Processing: vgchange -a y -vvvv vg01
#lvmcmdline.c:1063         O_DIRECT will be used
#config/config.c:987       Setting global/locking_type to 1
#config/config.c:987       Setting global/wait_for_locks to 1
#locking/locking.c:240       File-based locking selected.
#config/config.c:964       Setting global/locking_dir to /var/lock/lvm
#toollib.c:526     Using volume group(s) on command line
#toollib.c:466     Finding volume group "vg01"
#locking/file_locking.c:235       Locking /var/lock/lvm/V_vg01 RB
#locking/file_locking.c:141         _do_flock /var/lock/lvm/V_vg01:aux WB
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/V_vg01:aux
#locking/file_locking.c:141         _do_flock /var/lock/lvm/V_vg01 RB
#device/dev-io.c:487         Opened /dev/sda15 RO O_DIRECT
#device/dev-io.c:134         /dev/sda15: block size is 512 bytes
#label/label.c:160       /dev/sda15: lvm2 label detected
#cache/lvmcache.c:1136         lvmcache: /dev/sda15: now in VG #orphans_lvm2 (#orphans_lvm2)
#format_text/format-text.c:1180         /dev/sda15: Found metadata at 13824 size 2141 (in area at 4096 size 192512) for vg01 (LPJWM7-4hrp-9bMn-A6Gd-LTc1-COT6-8QZOOI)
#cache/lvmcache.c:1136         lvmcache: /dev/sda15: now in VG vg01 with 1 mdas
#cache/lvmcache.c:923         lvmcache: /dev/sda15: setting vg01 VGID to LPJWM74hrp9bMnA6GdLTc1COT68QZOOI
#cache/lvmcache.c:1173         lvmcache: /dev/sda15: VG vg01: Set creation host to usb.
#label/label.c:270         Using cached label for /dev/sda15
#label/label.c:270         Using cached label for /dev/sda15
#format_text/format-text.c:525         Read vg01 metadata (7) from /dev/sda15 at 13824 size 2141
#cache/lvmcache.c:119         Metadata cache: VG vg01 (LPJWM7-4hrp-9bMn-A6Gd-LTc1-COT6-8QZOOI) stored (2163 bytes).
#metadata/pv_manip.c:296         /dev/sda15 0:      0   4608: lv01(0:0)
#metadata/pv_manip.c:296         /dev/sda15 1:   4608   7168: lv02(0:0)
#metadata/pv_manip.c:296         /dev/sda15 2:  11776   4608: lv03(0:0)
#metadata/pv_manip.c:296         /dev/sda15 3:  16384   2048: lv04(0:0)
#metadata/pv_manip.c:296         /dev/sda15 4:  18432   9728: lv05(0:0)
#metadata/pv_manip.c:296         /dev/sda15 5:  28160  27384: lv06(0:0)
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#ioctl/libdm-iface.c:1890         dm version   OF   [16384]
#ioctl/libdm-iface.c:1907   device-mapper: version ioctl failed: Inappropriate ioctl for device
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv01
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv02
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv03
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv04
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv05
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#locking/file_locking.c:291       Locking LV LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3 (R)
#metadata/metadata.c:3401       Finding volume group for uuid LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3
#label/label.c:270         Using cached label for /dev/sda15
#cache/lvmcache.c:651         Using cached metadata for VG vg01.
#metadata/metadata.c:3407     Found volume group "vg01"
#activate/activate.c:267     activation/volume_list configuration setting not defined, checking only host tags for vg01/lv06
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:1162         <backtrace>
#activate/activate.c:1208         <backtrace>
#locking/locking.c:389         <backtrace>
#vgchange.c:141         <backtrace>
#vgchange.c:156     Activated 0 logical volumes in volume group vg01
#activate/dev_manager.c:236         Getting device info for vg01-lv01 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIfoRXJdmPaXe2FscWCw9nb9IrkQKiaxXM]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv02 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIwNvveOlSIfbVrtRkeV3P8wwHtZw0GIkl]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv03 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOI6onEPZ3MNfg5P56yVKfwavhQj6CFaUVm]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv04 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIOlPD0O2R7L5DMfU23vCMyDrZIXuAfkJr]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv05 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOILCctZ9G3Q4dILPskoW1iqIcr3SjIrTUA]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#activate/dev_manager.c:236         Getting device info for vg01-lv06 [LVM-LPJWM74hrp9bMnA6GdLTc1COT68QZOOIigf9RZiBVuZMasAs82a4g9ZHyDhcXZh3]
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/dev_manager.c:76         <backtrace>
#activate/dev_manager.c:104         <backtrace>
#activate/activate.c:463         <backtrace>
#activate/activate.c:579         <backtrace>
#cache/lvmcache.c:85         Metadata cache: VG vg01 wiped.
#locking/file_locking.c:74       Unlocking /var/lock/lvm/V_vg01
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/V_vg01
#device/dev-io.c:533         Closed /dev/sda15
  0 logical volume(s) in volume group "vg01" now active

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-15  5:24     ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-15  5:24 UTC (permalink / raw)
  To: lvm-devel

On Sat, Aug 14, 2010 at 11:54 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Sat, Aug 14, 2010 at 02:01:47AM +0800, Jeff Chua wrote:
>> It seems one of these commits in
>> 8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 is causing LVM2
>> (LVM2.2.02.72) to fail.
>
> Did you (partially) bisect that or are you just guessing?
> The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

Guessing only. Not bisecting yet. Prior to the git pull, everything
was working fine. And double confirmed by going to prior to the pull,
everything still worked.


>> Previously good logical volumes cannot be mounted anymore, and new one
>> cannot be created. All failed with the error ...
>> "device-mapper: version ioctl failed: Inappropriate ioctl for device"
>
> What distribution? ?What version of udev package?

Just a vanilla linux. No udev.


> 'lvm version' output?

  LVM version:     2.02.72(2) (2010-07-28)
  Library version: 1.02.53 (2010-07-28)
  Driver version:  4.17.0


> Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
> Add -vvvv to your lvm command for better clues.

Attached. good.vg01 is from prior to the patch. bad.vg01 is the bad one.

>> Is there a new LVM2 for this new dm ioctl or the dm is not right?
> There's no new dm ioctl.

> I'm guessing you could have a configuration not covered by the latest userspace
> libdevmapper - not handling some combination of kernel+userspace+initrd
> packages correctly.  We already dealt with one udev+initrd combination that
> failed last week.

Could be. Please help.

Thanks,
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vg01.good
Type: application/octet-stream
Size: 12486 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100815/1fd79fb4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vg01.bad
Type: application/octet-stream
Size: 14373 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100815/1fd79fb4/attachment-0001.obj>

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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-15  5:24     ` Jeff Chua
  (?)
@ 2010-08-15 13:03       ` Alasdair G Kergon
  -1 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-15 13:03 UTC (permalink / raw)
  To: Jeff Chua; +Cc: device-mapper development, lkml, lvm-devel

> Just a vanilla linux. No udev.

So likely a userspace problem where udev is now assumed to be present.
 
> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.

You can do that by running:
  ls -l /dev/mapper /dev/vg01

Also:
  cat /proc/devices
  cat /proc/misc

Alasdair


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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-15 13:03       ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-15 13:03 UTC (permalink / raw)
  To: Jeff Chua; +Cc: device-mapper development, lkml, lvm-devel

> Just a vanilla linux. No udev.

So likely a userspace problem where udev is now assumed to be present.
 
> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.

You can do that by running:
  ls -l /dev/mapper /dev/vg01

Also:
  cat /proc/devices
  cat /proc/misc

Alasdair

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-15 13:03       ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-15 13:03 UTC (permalink / raw)
  To: lvm-devel

> Just a vanilla linux. No udev.

So likely a userspace problem where udev is now assumed to be present.
 
> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.

You can do that by running:
  ls -l /dev/mapper /dev/vg01

Also:
  cat /proc/devices
  cat /proc/misc

Alasdair



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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-15 13:03       ` Alasdair G Kergon
  (?)
@ 2010-08-15 14:13         ` Jeff Chua
  -1 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-15 14:13 UTC (permalink / raw)
  To: Jeff Chua, device-mapper development, lkml, lvm-devel

On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>> Just a vanilla linux. No udev.
>
> So likely a userspace problem where udev is now assumed to be present.
>
>> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>
> You can do that by running:
>  ls -l /dev/mapper /dev/vg01
> Also:
>  cat /proc/devices

253 device-mapper

>  cat /proc/misc

236 device-mapper <== was at 60 before the new kernel


Got it! Sorry, it's me being _dumb_!!!

With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

So I fix it by recreating the control file with "mknod
/var/mapper/control c 10 253".

I got this "internal error" when I activate/deactivate the volume
group, but it seems ok. I could mount the volumes and so far it's all
good.

# vgchange -a n vg01
  Internal error: Maps lock 14217216 < unlock 14221312
  Internal error: Maps lock 14221312 < unlock 14225408
  Internal error: Maps lock 14225408 < unlock 14229504
  Internal error: Maps lock 14229504 < unlock 14233600
  Internal error: Maps lock 14233600 < unlock 14237696
  Internal error: Maps lock 14237696 < unlock 14241792
  0 logical volume(s) in volume group "vg01" now active

# vgchange -a y vg01
  Internal error: Maps lock 14192640 < unlock 14196736
  Internal error: Maps lock 14196736 < unlock 14200832
  Internal error: Maps lock 14200832 < unlock 14204928
  Internal error: Maps lock 14204928 < unlock 14209024
  Internal error: Maps lock 14209024 < unlock 14213120
  Internal error: Maps lock 14213120 < unlock 14217216
  6 logical volume(s) in volume group "vg01" now active

Hopefully those errors above means no harm.

Thanks,
Jeff

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

* Re: linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-15 14:13         ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-15 14:13 UTC (permalink / raw)
  To: Jeff Chua, device-mapper development, lkml, lvm-devel

On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>> Just a vanilla linux. No udev.
>
> So likely a userspace problem where udev is now assumed to be present.
>
>> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>
> You can do that by running:
>  ls -l /dev/mapper /dev/vg01
> Also:
>  cat /proc/devices

253 device-mapper

>  cat /proc/misc

236 device-mapper <== was at 60 before the new kernel


Got it! Sorry, it's me being _dumb_!!!

With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

So I fix it by recreating the control file with "mknod
/var/mapper/control c 10 253".

I got this "internal error" when I activate/deactivate the volume
group, but it seems ok. I could mount the volumes and so far it's all
good.

# vgchange -a n vg01
  Internal error: Maps lock 14217216 < unlock 14221312
  Internal error: Maps lock 14221312 < unlock 14225408
  Internal error: Maps lock 14225408 < unlock 14229504
  Internal error: Maps lock 14229504 < unlock 14233600
  Internal error: Maps lock 14233600 < unlock 14237696
  Internal error: Maps lock 14237696 < unlock 14241792
  0 logical volume(s) in volume group "vg01" now active

# vgchange -a y vg01
  Internal error: Maps lock 14192640 < unlock 14196736
  Internal error: Maps lock 14196736 < unlock 14200832
  Internal error: Maps lock 14200832 < unlock 14204928
  Internal error: Maps lock 14204928 < unlock 14209024
  Internal error: Maps lock 14209024 < unlock 14213120
  Internal error: Maps lock 14213120 < unlock 14217216
  6 logical volume(s) in volume group "vg01" now active

Hopefully those errors above means no harm.

Thanks,
Jeff

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-15 14:13         ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-15 14:14 UTC (permalink / raw)
  To: lvm-devel

On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>> Just a vanilla linux. No udev.
>
> So likely a userspace problem where udev is now assumed to be present.
>
>> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>
> You can do that by running:
> ?ls -l /dev/mapper /dev/vg01
> Also:
> ?cat /proc/devices

253 device-mapper

> ?cat /proc/misc

236 device-mapper <== was@60 before the new kernel


Got it! Sorry, it's me being _dumb_!!!

With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

So I fix it by recreating the control file with "mknod
/var/mapper/control c 10 253".

I got this "internal error" when I activate/deactivate the volume
group, but it seems ok. I could mount the volumes and so far it's all
good.

# vgchange -a n vg01
  Internal error: Maps lock 14217216 < unlock 14221312
  Internal error: Maps lock 14221312 < unlock 14225408
  Internal error: Maps lock 14225408 < unlock 14229504
  Internal error: Maps lock 14229504 < unlock 14233600
  Internal error: Maps lock 14233600 < unlock 14237696
  Internal error: Maps lock 14237696 < unlock 14241792
  0 logical volume(s) in volume group "vg01" now active

# vgchange -a y vg01
  Internal error: Maps lock 14192640 < unlock 14196736
  Internal error: Maps lock 14196736 < unlock 14200832
  Internal error: Maps lock 14200832 < unlock 14204928
  Internal error: Maps lock 14204928 < unlock 14209024
  Internal error: Maps lock 14209024 < unlock 14213120
  Internal error: Maps lock 14213120 < unlock 14217216
  6 logical volume(s) in volume group "vg01" now active

Hopefully those errors above means no harm.

Thanks,
Jeff



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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-15 14:13         ` Jeff Chua
  (?)
@ 2010-08-16 13:56           ` Zdenek Kabelac
  -1 siblings, 0 replies; 28+ messages in thread
From: Zdenek Kabelac @ 2010-08-16 13:56 UTC (permalink / raw)
  To: device-mapper development; +Cc: Jeff Chua, lkml, lvm-devel

Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>>> Just a vanilla linux. No udev.
>>
>> So likely a userspace problem where udev is now assumed to be present.
>>
>>>> Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>>
>> You can do that by running:
>>  ls -l /dev/mapper /dev/vg01
>> Also:
>>  cat /proc/devices
> 
> 253 device-mapper
> 
>>  cat /proc/misc
> 
> 236 device-mapper <== was at 60 before the new kernel
> 
> 
> Got it! Sorry, it's me being _dumb_!!!
> 
> With 2.6.35++, /dev/mapper/control has moved from 60 to 236!
> 
> So I fix it by recreating the control file with "mknod
> /var/mapper/control c 10 253".
> 
> I got this "internal error" when I activate/deactivate the volume
> group, but it seems ok. I could mount the volumes and so far it's all
> good.
> 
> # vgchange -a n vg01
>   Internal error: Maps lock 14217216 < unlock 14221312
>   Internal error: Maps lock 14221312 < unlock 14225408
>   Internal error: Maps lock 14225408 < unlock 14229504
>   Internal error: Maps lock 14229504 < unlock 14233600
>   Internal error: Maps lock 14233600 < unlock 14237696
>   Internal error: Maps lock 14237696 < unlock 14241792
>   0 logical volume(s) in volume group "vg01" now active
> 
> # vgchange -a y vg01
>   Internal error: Maps lock 14192640 < unlock 14196736
>   Internal error: Maps lock 14196736 < unlock 14200832
>   Internal error: Maps lock 14200832 < unlock 14204928
>   Internal error: Maps lock 14204928 < unlock 14209024
>   Internal error: Maps lock 14209024 < unlock 14213120
>   Internal error: Maps lock 14213120 < unlock 14217216
>   6 logical volume(s) in volume group "vg01" now active
> 
> Hopefully those errors above means no harm.
> 

Well error is usually error - so some harm under certain circumstances could
happen (low memory situation)...

But in this case I assume it's related to this kernel commit  which should fix
this problem ?

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

Zdenek

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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 13:56           ` Zdenek Kabelac
  0 siblings, 0 replies; 28+ messages in thread
From: Zdenek Kabelac @ 2010-08-16 13:56 UTC (permalink / raw)
  To: device-mapper development; +Cc: lkml, Jeff Chua, lvm-devel

Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>>> Just a vanilla linux. No udev.
>>
>> So likely a userspace problem where udev is now assumed to be present.
>>
>>>> Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>>
>> You can do that by running:
>>  ls -l /dev/mapper /dev/vg01
>> Also:
>>  cat /proc/devices
> 
> 253 device-mapper
> 
>>  cat /proc/misc
> 
> 236 device-mapper <== was at 60 before the new kernel
> 
> 
> Got it! Sorry, it's me being _dumb_!!!
> 
> With 2.6.35++, /dev/mapper/control has moved from 60 to 236!
> 
> So I fix it by recreating the control file with "mknod
> /var/mapper/control c 10 253".
> 
> I got this "internal error" when I activate/deactivate the volume
> group, but it seems ok. I could mount the volumes and so far it's all
> good.
> 
> # vgchange -a n vg01
>   Internal error: Maps lock 14217216 < unlock 14221312
>   Internal error: Maps lock 14221312 < unlock 14225408
>   Internal error: Maps lock 14225408 < unlock 14229504
>   Internal error: Maps lock 14229504 < unlock 14233600
>   Internal error: Maps lock 14233600 < unlock 14237696
>   Internal error: Maps lock 14237696 < unlock 14241792
>   0 logical volume(s) in volume group "vg01" now active
> 
> # vgchange -a y vg01
>   Internal error: Maps lock 14192640 < unlock 14196736
>   Internal error: Maps lock 14196736 < unlock 14200832
>   Internal error: Maps lock 14200832 < unlock 14204928
>   Internal error: Maps lock 14204928 < unlock 14209024
>   Internal error: Maps lock 14209024 < unlock 14213120
>   Internal error: Maps lock 14213120 < unlock 14217216
>   6 logical volume(s) in volume group "vg01" now active
> 
> Hopefully those errors above means no harm.
> 

Well error is usually error - so some harm under certain circumstances could
happen (low memory situation)...

But in this case I assume it's related to this kernel commit  which should fix
this problem ?

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

Zdenek

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 13:56           ` Zdenek Kabelac
  0 siblings, 0 replies; 28+ messages in thread
From: Zdenek Kabelac @ 2010-08-16 13:56 UTC (permalink / raw)
  To: lvm-devel

Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> On Sun, Aug 15, 2010 at 9:03 PM, Alasdair G Kergon <agk@redhat.com> wrote:
>>> Just a vanilla linux. No udev.
>>
>> So likely a userspace problem where udev is now assumed to be present.
>>
>>>> Provide long listing of /dev/mapper and any dm/lvm devices in /dev.
>>
>> You can do that by running:
>>  ls -l /dev/mapper /dev/vg01
>> Also:
>>  cat /proc/devices
> 
> 253 device-mapper
> 
>>  cat /proc/misc
> 
> 236 device-mapper <== was@60 before the new kernel
> 
> 
> Got it! Sorry, it's me being _dumb_!!!
> 
> With 2.6.35++, /dev/mapper/control has moved from 60 to 236!
> 
> So I fix it by recreating the control file with "mknod
> /var/mapper/control c 10 253".
> 
> I got this "internal error" when I activate/deactivate the volume
> group, but it seems ok. I could mount the volumes and so far it's all
> good.
> 
> # vgchange -a n vg01
>   Internal error: Maps lock 14217216 < unlock 14221312
>   Internal error: Maps lock 14221312 < unlock 14225408
>   Internal error: Maps lock 14225408 < unlock 14229504
>   Internal error: Maps lock 14229504 < unlock 14233600
>   Internal error: Maps lock 14233600 < unlock 14237696
>   Internal error: Maps lock 14237696 < unlock 14241792
>   0 logical volume(s) in volume group "vg01" now active
> 
> # vgchange -a y vg01
>   Internal error: Maps lock 14192640 < unlock 14196736
>   Internal error: Maps lock 14196736 < unlock 14200832
>   Internal error: Maps lock 14200832 < unlock 14204928
>   Internal error: Maps lock 14204928 < unlock 14209024
>   Internal error: Maps lock 14209024 < unlock 14213120
>   Internal error: Maps lock 14213120 < unlock 14217216
>   6 logical volume(s) in volume group "vg01" now active
> 
> Hopefully those errors above means no harm.
> 

Well error is usually error - so some harm under certain circumstances could
happen (low memory situation)...

But in this case I assume it's related to this kernel commit  which should fix
this problem ?

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

Zdenek



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

* Re: [lvm-devel] [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-16 13:56           ` Zdenek Kabelac
  (?)
@ 2010-08-16 14:22             ` Alasdair G Kergon
  -1 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 14:22 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: device-mapper development, lkml, Jeff Chua, lvm-devel

On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

The latest LVM package made an assumption that it would be set up
correctly by udev (or manually in your case).  We are updating
the userspace libdevmapper code to handle your circumstances
automatically.

> > # vgchange -a n vg01
> >   Internal error: Maps lock 14217216 < unlock 14221312
> >   Internal error: Maps lock 14221312 < unlock 14225408
> >   Internal error: Maps lock 14225408 < unlock 14229504
> >   Internal error: Maps lock 14229504 < unlock 14233600
> >   Internal error: Maps lock 14233600 < unlock 14237696
> >   Internal error: Maps lock 14237696 < unlock 14241792
> >   0 logical volume(s) in volume group "vg01" now active

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

For those interested, originally we used mlockall() but in non-C locales
on some distributions glibc is configured to map 80MB+ of locale data
into memory without offering any way to unmap it.  We don't need
that data locked and it increased the minimum memory required to install
a distribution as well as slowing down the LVM tools!  So we had to
write a customised version that tries to skip locking unnecessary pages
like those.
 
Alasdair


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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 14:22             ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 14:22 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: device-mapper development, lkml, Jeff Chua, lvm-devel

On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

The latest LVM package made an assumption that it would be set up
correctly by udev (or manually in your case).  We are updating
the userspace libdevmapper code to handle your circumstances
automatically.

> > # vgchange -a n vg01
> >   Internal error: Maps lock 14217216 < unlock 14221312
> >   Internal error: Maps lock 14221312 < unlock 14225408
> >   Internal error: Maps lock 14225408 < unlock 14229504
> >   Internal error: Maps lock 14229504 < unlock 14233600
> >   Internal error: Maps lock 14233600 < unlock 14237696
> >   Internal error: Maps lock 14237696 < unlock 14241792
> >   0 logical volume(s) in volume group "vg01" now active

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

For those interested, originally we used mlockall() but in non-C locales
on some distributions glibc is configured to map 80MB+ of locale data
into memory without offering any way to unmap it.  We don't need
that data locked and it increased the minimum memory required to install
a distribution as well as slowing down the LVM tools!  So we had to
write a customised version that tries to skip locking unnecessary pages
like those.
 
Alasdair

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 14:22             ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 14:22 UTC (permalink / raw)
  To: lvm-devel

On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

The latest LVM package made an assumption that it would be set up
correctly by udev (or manually in your case).  We are updating
the userspace libdevmapper code to handle your circumstances
automatically.

> > # vgchange -a n vg01
> >   Internal error: Maps lock 14217216 < unlock 14221312
> >   Internal error: Maps lock 14221312 < unlock 14225408
> >   Internal error: Maps lock 14225408 < unlock 14229504
> >   Internal error: Maps lock 14229504 < unlock 14233600
> >   Internal error: Maps lock 14233600 < unlock 14237696
> >   Internal error: Maps lock 14237696 < unlock 14241792
> >   0 logical volume(s) in volume group "vg01" now active

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a

For those interested, originally we used mlockall() but in non-C locales
on some distributions glibc is configured to map 80MB+ of locale data
into memory without offering any way to unmap it.  We don't need
that data locked and it increased the minimum memory required to install
a distribution as well as slowing down the LVM tools!  So we had to
write a customised version that tries to skip locking unnecessary pages
like those.
 
Alasdair



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

* Re: [lvm-devel] [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-16 14:22             ` Alasdair G Kergon
@ 2010-08-16 15:32               ` Jeff Chua
  -1 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-16 15:32 UTC (permalink / raw)
  To: Zdenek Kabelac, device-mapper development, lkml, Jeff Chua, lvm-devel

On Mon, Aug 16, 2010 at 10:22 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
>> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
>> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!
>
> The latest LVM package made an assumption that it would be set up
> correctly by udev (or manually in your case).  We are updating
> the userspace libdevmapper code to handle your circumstances
> automatically.

It'll be nice if lvm returns a more meanful message like "ioctl
failed. Check /proc/misc to ensure the device is mapped correctly."

To take care of it automatically with udev, I'm doing this in rc.S

if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
then
        NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
        rm -f /dev/mapper/control
        mknod /dev/mapper/control c ${NODE/:/ }
fi


>> > # vgchange -a n vg01
>> >   Internal error: Maps lock 14217216 < unlock 14221312
>> >   Internal error: Maps lock 14221312 < unlock 14225408
>> >   Internal error: Maps lock 14225408 < unlock 14229504
>> >   Internal error: Maps lock 14229504 < unlock 14233600
>> >   Internal error: Maps lock 14233600 < unlock 14237696
>> >   Internal error: Maps lock 14237696 < unlock 14241792
>> >   0 logical volume(s) in volume group "vg01" now active
>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a
>
> For those interested, originally we used mlockall() but in non-C locales
> on some distributions glibc is configured to map 80MB+ of locale data
> into memory without offering any way to unmap it.  We don't need
> that data locked and it increased the minimum memory required to install
> a distribution as well as slowing down the LVM tools!  So we had to
> write a customised version that tries to skip locking unnecessary pages
> like those.

I see that now it's fixed with that commit.

Thanks,
Jeff

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 15:32               ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-16 15:32 UTC (permalink / raw)
  To: lvm-devel

On Mon, Aug 16, 2010 at 10:22 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
>> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
>> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!
>
> The latest LVM package made an assumption that it would be set up
> correctly by udev (or manually in your case). ?We are updating
> the userspace libdevmapper code to handle your circumstances
> automatically.

It'll be nice if lvm returns a more meanful message like "ioctl
failed. Check /proc/misc to ensure the device is mapped correctly."

To take care of it automatically with udev, I'm doing this in rc.S

if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
then
        NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
        rm -f /dev/mapper/control
        mknod /dev/mapper/control c ${NODE/:/ }
fi


>> > # vgchange -a n vg01
>> > ? Internal error: Maps lock 14217216 < unlock 14221312
>> > ? Internal error: Maps lock 14221312 < unlock 14225408
>> > ? Internal error: Maps lock 14225408 < unlock 14229504
>> > ? Internal error: Maps lock 14229504 < unlock 14233600
>> > ? Internal error: Maps lock 14233600 < unlock 14237696
>> > ? Internal error: Maps lock 14237696 < unlock 14241792
>> > ? 0 logical volume(s) in volume group "vg01" now active
>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce64fb0a4fde24a
>
> For those interested, originally we used mlockall() but in non-C locales
> on some distributions glibc is configured to map 80MB+ of locale data
> into memory without offering any way to unmap it. ?We don't need
> that data locked and it increased the minimum memory required to install
> a distribution as well as slowing down the LVM tools! ?So we had to
> write a customised version that tries to skip locking unnecessary pages
> like those.

I see that now it's fixed with that commit.

Thanks,
Jeff



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

* Re: [dm-devel] [lvm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-16 15:32               ` Jeff Chua
  (?)
@ 2010-08-16 15:55                 ` Alasdair G Kergon
  -1 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 15:55 UTC (permalink / raw)
  To: Jeff Chua; +Cc: Zdenek Kabelac, device-mapper development, lkml, lvm-devel

On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
> It'll be nice if lvm returns a more meanful message like "ioctl
> failed. Check /proc/misc to ensure the device is mapped correctly."
 
No need - LVM should be quite capable of detecting/dealing with the problem.

> To take care of it automatically with udev, I'm doing this in rc.S
> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
> then
>         NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>         rm -f /dev/mapper/control
>         mknod /dev/mapper/control c ${NODE/:/ }

The whole point of this change was to trigger the loading of dm-mod
automatically for people using it as a module, based on using a known
major/minor number instead of a dynamic one only known after the module
has been loaded.  That needs to happen regardless of whether someone is
using udev or not.  

This can all be fixed easily enough in userspace.

Alasdair


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

* Re: [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 15:55                 ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 15:55 UTC (permalink / raw)
  To: Jeff Chua; +Cc: device-mapper development, lvm-devel, lkml, Zdenek Kabelac

On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
> It'll be nice if lvm returns a more meanful message like "ioctl
> failed. Check /proc/misc to ensure the device is mapped correctly."
 
No need - LVM should be quite capable of detecting/dealing with the problem.

> To take care of it automatically with udev, I'm doing this in rc.S
> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
> then
>         NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>         rm -f /dev/mapper/control
>         mknod /dev/mapper/control c ${NODE/:/ }

The whole point of this change was to trigger the loading of dm-mod
automatically for people using it as a module, based on using a known
major/minor number instead of a dynamic one only known after the module
has been loaded.  That needs to happen regardless of whether someone is
using udev or not.  

This can all be fixed easily enough in userspace.

Alasdair

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 15:55                 ` Alasdair G Kergon
  0 siblings, 0 replies; 28+ messages in thread
From: Alasdair G Kergon @ 2010-08-16 15:55 UTC (permalink / raw)
  To: lvm-devel

On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
> It'll be nice if lvm returns a more meanful message like "ioctl
> failed. Check /proc/misc to ensure the device is mapped correctly."
 
No need - LVM should be quite capable of detecting/dealing with the problem.

> To take care of it automatically with udev, I'm doing this in rc.S
> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
> then
>         NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>         rm -f /dev/mapper/control
>         mknod /dev/mapper/control c ${NODE/:/ }

The whole point of this change was to trigger the loading of dm-mod
automatically for people using it as a module, based on using a known
major/minor number instead of a dynamic one only known after the module
has been loaded.  That needs to happen regardless of whether someone is
using udev or not.  

This can all be fixed easily enough in userspace.

Alasdair



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

* Re: [dm-devel] [lvm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
  2010-08-16 15:55                 ` Alasdair G Kergon
  (?)
@ 2010-08-16 16:10                   ` Jeff Chua
  -1 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-16 16:10 UTC (permalink / raw)
  To: Jeff Chua, Zdenek Kabelac, device-mapper development, lkml, lvm-devel

On Mon, Aug 16, 2010 at 11:55 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
>> It'll be nice if lvm returns a more meanful message like "ioctl
>> failed. Check /proc/misc to ensure the device is mapped correctly."
>
> No need - LVM should be quite capable of detecting/dealing with the problem.

Ok, cool.

>> To take care of it automatically with udev, I'm doing this in rc.S
>> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
>> then
>>         NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>>         rm -f /dev/mapper/control
>>         mknod /dev/mapper/control c ${NODE/:/ }
>
> The whole point of this change was to trigger the loading of dm-mod
> automatically for people using it as a module, based on using a known
> major/minor number instead of a dynamic one only known after the module
> has been loaded.  That needs to happen regardless of whether someone is
> using udev or not.
>
> This can all be fixed easily enough in userspace.

I'm not using module. It's all built-in to the kernel. Hopefully this
would be taken care of as well. That's why I had it in rc.S just
before the lvm filesystems are mounted.

Thanks,
Jeff.

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

* Re: [lvm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 16:10                   ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-16 16:10 UTC (permalink / raw)
  To: Jeff Chua, Zdenek Kabelac, device-mapper development, lkml

On Mon, Aug 16, 2010 at 11:55 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
>> It'll be nice if lvm returns a more meanful message like "ioctl
>> failed. Check /proc/misc to ensure the device is mapped correctly."
>
> No need - LVM should be quite capable of detecting/dealing with the problem.

Ok, cool.

>> To take care of it automatically with udev, I'm doing this in rc.S
>> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
>> then
>>         NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>>         rm -f /dev/mapper/control
>>         mknod /dev/mapper/control c ${NODE/:/ }
>
> The whole point of this change was to trigger the loading of dm-mod
> automatically for people using it as a module, based on using a known
> major/minor number instead of a dynamic one only known after the module
> has been loaded.  That needs to happen regardless of whether someone is
> using udev or not.
>
> This can all be fixed easily enough in userspace.

I'm not using module. It's all built-in to the kernel. Hopefully this
would be taken care of as well. That's why I had it in rc.S just
before the lvm filesystems are mounted.

Thanks,
Jeff.

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

* [dm-devel] linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"
@ 2010-08-16 16:10                   ` Jeff Chua
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Chua @ 2010-08-16 16:11 UTC (permalink / raw)
  To: lvm-devel

On Mon, Aug 16, 2010 at 11:55 PM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
>> It'll be nice if lvm returns a more meanful message like "ioctl
>> failed. Check /proc/misc to ensure the device is mapped correctly."
>
> No need - LVM should be quite capable of detecting/dealing with the problem.

Ok, cool.

>> To take care of it automatically with udev, I'm doing this in rc.S
>> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
>> then
>> ? ? ? ? NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
>> ? ? ? ? rm -f /dev/mapper/control
>> ? ? ? ? mknod /dev/mapper/control c ${NODE/:/ }
>
> The whole point of this change was to trigger the loading of dm-mod
> automatically for people using it as a module, based on using a known
> major/minor number instead of a dynamic one only known after the module
> has been loaded. ?That needs to happen regardless of whether someone is
> using udev or not.
>
> This can all be fixed easily enough in userspace.

I'm not using module. It's all built-in to the kernel. Hopefully this
would be taken care of as well. That's why I had it in rc.S just
before the lvm filesystems are mounted.

Thanks,
Jeff.



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

end of thread, other threads:[~2010-08-16 16:18 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13 18:01 linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device" Jeff Chua
2010-08-13 18:02 ` Jeff Chua
2010-08-14 15:54 ` [dm-devel] " Alasdair G Kergon
2010-08-14 15:54   ` Alasdair G Kergon
2010-08-14 16:16   ` Alasdair G Kergon
2010-08-14 16:16     ` Alasdair G Kergon
2010-08-15  5:23   ` Jeff Chua
2010-08-15  5:24     ` Jeff Chua
2010-08-15 13:03     ` Alasdair G Kergon
2010-08-15 13:03       ` Alasdair G Kergon
2010-08-15 13:03       ` Alasdair G Kergon
2010-08-15 14:13       ` Jeff Chua
2010-08-15 14:14         ` Jeff Chua
2010-08-15 14:13         ` Jeff Chua
2010-08-16 13:56         ` [dm-devel] " Zdenek Kabelac
2010-08-16 13:56           ` Zdenek Kabelac
2010-08-16 13:56           ` Zdenek Kabelac
2010-08-16 14:22           ` [lvm-devel] " Alasdair G Kergon
2010-08-16 14:22             ` Alasdair G Kergon
2010-08-16 14:22             ` Alasdair G Kergon
2010-08-16 15:32             ` [lvm-devel] " Jeff Chua
2010-08-16 15:32               ` Jeff Chua
2010-08-16 15:55               ` [dm-devel] [lvm-devel] " Alasdair G Kergon
2010-08-16 15:55                 ` [dm-devel] " Alasdair G Kergon
2010-08-16 15:55                 ` Alasdair G Kergon
2010-08-16 16:10                 ` [dm-devel] [lvm-devel] " Jeff Chua
2010-08-16 16:11                   ` [dm-devel] " Jeff Chua
2010-08-16 16:10                   ` [lvm-devel] " Jeff Chua

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.