dm-cache issue:unable to create cache

756 views
Skip to first unread message

Nitin Kshirsagar

unread,
Jan 24, 2013, 7:46:51 AM1/24/13
to dm-c...@googlegroups.com, thor...@redhat.com, Amit Kale, Sanoj Unnikrishnan
Hello Joe,

I have setup dm-cache and tried to create cache but it fails with error message "device-mapper: reload ioctl failed".

Issue:Create cache fails
--------------------------------------------------------------------------------------------------------
Steps:
1.Check list of devices
[root@localhost dm-cache]# blockdev --report
RO RA SSZ BSZ StartSec Size Device
rw 256 512 4096 0 42949672960 /dev/sda
rw 256 512 1024 2048 209715200 /dev/sda1
rw 256 512 4096 411648 2147483648 /dev/sda2
rw 256 512 4096 4605952 40591425536 /dev/sda3
rw 256 512 4096 0 17179869184 /dev/sdb
rw 256 512 4096 0 10737418240 /dev/sdc
rw 256 512 4096 0 10737418240 /dev/sdd
rw 256 512 4096 0 21474836480 /dev/sde
rw 256 512 4096 0 10737418240 /dev/sdf
rw 256 512 4096 0 16106127360 /dev/sdg

2. Try to create cache
[root@localhost dm-cache]# ./dmc-setup.pl -o /dev/sdb -c /dev/sdc -n c1
Operator or semicolon missing before &__inline at (eval 104) line 1.
Ambiguous use of & resolved as operator & at (eval 104) line 1.
echo 0 33554432 cache /dev/sdb /dev/sdc 0 8 65536 16 0 | dmsetup create c1
device-mapper: reload ioctl failed: No such file or directory
Command failed
[root@localhost dm-cache]# echo $?
1
[root@localhost dm-cache]# lsmod | grep dm
dm_cache 32666 0
dm_bio_prison 6617 1 dm_cache
dm_persistent_data 54713 1 dm_cache
dm_bufio 19555 1 dm_persistent_data
dm_mod 83573 3 dm_cache,dm_persistent_data,dm_bufio

[root@localhost dm-cache]# dmesg
device-mapper: table: 253:0: cache: Error opening origin device
device-mapper: ioctl: error adding target to table
device-mapper: table: 253:0: cache: Error opening origin device
device-mapper: ioctl: error adding target to table


--
Thanks & Regards

Nitin Kshirsagar
Software Engr, QA
Cell 997.566.3985

STEC india private Limited, Pune | The SSD Company TM
NASDAQ STEC • Web www.stec-inc.com

PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain confidential, proprietary and/or legally privileged information. The information is intended only for use by the recipient named above. If you received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of information received in error is strictly prohibited, and violators will be pursued legally.

thor...@redhat.com

unread,
Jan 24, 2013, 8:37:36 AM1/24/13
to Nitin Kshirsagar, dm-c...@googlegroups.com, Amit Kale, Sanoj Unnikrishnan
Hi Nitin,

On Thu, Jan 24, 2013 at 08:46:51PM +0800, Nitin Kshirsagar wrote:
> Hello Joe,
>
> I have setup dm-cache and tried to create cache but it fails with error message "device-mapper: reload ioctl failed".
>
> 2. Try to create cache
> [root@localhost dm-cache]# ./dmc-setup.pl -o /dev/sdb -c /dev/sdc -n c1
> Operator or semicolon missing before &__inline at (eval 104) line 1.
> Ambiguous use of & resolved as operator & at (eval 104) line 1.

what are these errors?

> echo 0 33554432 cache /dev/sdb /dev/sdc 0 8 65536 16 0 | dmsetup create c1

That line is just wrong, you're giving '0' as the origin for a start.
Here's a table from one of my test scripts:

0 4194304 cache /dev/mapper/test-dev-844037 /dev/mapper/test-dev-858816 /dev/mapper/test-dev-3453 512 0 mq 0

And here's a summary of the target line:

/*
* Construct a cache device mapping.
*
* cache <metadata dev> <cache dev> <origin dev> <block size>
* <#feature_args> [<arg>]* <policy> <#policy_args> [<arg>]*
*
* metadata dev : fast device holding the persistent metadata
* cache dev : fast device holding cached data blocks
* origin dev : slow device holding original data blocks
* block size : cache unit size in sectors
* #feature args [<arg>]* : number of feature arguments followed by
* optional arguments * cache dev
* policy : the replacement policy to use
* #policy_args [<arg>]* : number of policy arguments followed by optional
* arguments; see policy plugin for instances
* (key value pairs count as 2; delimiter is space)
*
* Optional feature arguments are:
* writeback: write back cache allowing cache block contents to
* differ from origin blocks for performance reasons
* writethrough: write through caching prohibiting cache block
* content from being distinct from origin block content
*/


Hope that helps,

- Joe
Reply all
Reply to author
Forward
Message has been deleted
0 new messages