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