Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

device-mapper: reload ioctl failed: Invalid argument #64

Closed
sneuwirth opened this Issue · 8 comments

3 participants

@sneuwirth

Hi there,

I'm trying to create a cache volume on /dev/sdb by typing:
flashcache_create -p thru cachedev /dev/sda /dev/sdb

The command fails with the following error message:
device-mapper: reload ioctl failed: Invalid argument

Is there anyone who has an idea what's going wrong?

Looking forward to your help.

Thanks, Sarah

@sneuwirth

So, I checked the kernel log and got this information:
device-mapper: table: 251:2: flashcache: flashcache: Disk device lookup failed
device-mapper: ioctl: error adding target to table

/dev/sdb is not mounted. Don't know what's going on here.

@mohans
Collaborator
@sneuwirth

Hi mohans,

thank you for your response!

Well, my cache device is a SSD with device file /dev/sda. The lookup is ok. I'm trying to cache a disk that is not mounted (/dev/sdc). When I try to create a cache, the command fails with the error mentoined above. So, I'm kind of confused.

@mohans
Collaborator
@sneuwirth

The SSD isn't mounted. The disk (/dev/sdc) neither. When I try
flashcache_create -p thru -s 1g cachedev /dev/sda /dev/sdc
I get the following:

cachedev testcache, ssd_devname /dev/sda, disk_devname /dev/sdc cache mode WRITE_THROUGH
block_size 8, cache_size 2097152
Killed
echo 0 976773168 flashcache /dev/sdc /dev/sda testcache 2 2 8 2097152 512 8 | dmsetup create testcache failed

The kernel log provides this:
[ 4435.391459] device-mapper: flashcache: Allocate 8192KB (32B per) mem for 262144-entry cache(capacity:1024MB, associativity:512, bl$
[ 4435.415362] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 4435.416005] IP: [] flashcache_ctr+0x3f2/0xd40 [flashcache]
[ 4435.416005] PGD 1175c7067 PUD 11822b067 PMD 0
[ 4435.416005] Oops: 0000 [#2] SMP
[ 4435.416005] CPU 4
[ 4435.416005] Modules linked in: joydev st flashcache xt_multiport iptable_filter ip_tables x_tables radeon ttm drm_kms_helper nv_tc$
[ 4435.416005]
[ 4435.416005] Pid: 1665, comm: dmsetup Tainted: G D 3.0.0-17-server #30-Ubuntu Supermicro H8DMU/H8DMU
[ 4435.416005] RIP: 0010:[] [] flashcache_ctr+0x3f2/0xd40 [flashcache]
[ 4435.416005] RSP: 0018:ffff8801175c5d08 EFLAGS: 00010286
[ 4435.416005] RAX: ffffc900112c2000 RBX: ffff8801150d6000 RCX: ffffc900112c2000
[ 4435.416005] RDX: ffff8801182e1c80 RSI: ffffc900112c6000 RDI: ffffffff81c35040
[ 4435.416005] RBP: ffff8801175c5d68 R08: ffff8801182e1c00 R09: ffff8801175c5bc4
[ 4435.416005] R10: ffff88011f020448 R11: ffffc90000000000 R12: ffffc900112aa040
[ 4435.416005] R13: 0000000000800000 R14: ffff880114af3a00 R15: ffffc900112a5169
[ 4435.416005] FS: 00007f8ecfeed7c0(0000) GS:ffff88011fd00000(0000) knlGS:0000000000000000
[ 4435.416005] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4435.416005] CR2: 0000000000000000 CR3: 0000000116b69000 CR4: 00000000000006e0
[ 4435.416005] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4435.416005] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 4435.416005] Process dmsetup (pid: 1665, threadinfo ffff8801175c4000, task ffff8800b587dc80)
[ 4435.416005] Stack:
[ 4435.416005] ffff880100000008 ffffffff00000004 00000000000002d0 0000000014af3a00
[ 4435.416005] ffffc900112aa040 00000002112a9000 000000003a386030 ffff880114af2e00
[ 4435.416005] ffffc900112aa040 0000000000000000 000000003a386030 0000000000000000
[ 4435.416005] Call Trace:
[ 4435.416005] [] dm_table_add_target+0x141/0x310

At first, I tried to create a cache device on /dev/sdb. But the disk is mounted and my root partition.

@mohans
Collaborator
@softapd

Hi there,

I am using linux kernel (64 bit) 2.6.38 and having same error message "device-mapper: reload ioctl failed: Invalid argument" with following command.
flashcache_create -p thru cachedev /dev/sdb /dev/sda
Where /dev/sdb is my SSD Device and /dev/sda is my root partition which is of-course mounted at the boot time.
I am trying to use flashcache to cache the root partition. Is it possible. Has anybody tried it. Any pointers or suggestion (or steps on how to do it) is highly appreciated.

Thanks in Advance.

@mohans
Collaborator
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.