1

When I run the below command while setting up dm-cache on my CentOS system, I receive the error:

device-mapper: reload ioctl on cache1 failed: Device or resource busy
Command failed

Command is:

dmsetup create 'cache1' --table '0 195309568 cache /dev/sdb  /dev/sda  512 1 writethrough default 0'

Does anyone have idea about this error or have faced this error while setting up dm-cache?

My dmesg output is

[1907480.058991] device-mapper: table: 253:3: cache: Error opening metadata device
[1907480.058996] device-mapper: ioctl: error adding target to table
0

The cache target requires 3 devices, but you have only specified two. I believe the devices also must be dm devices, not a scsi disk.

  • well the cache is the name of the cache and /dev/sdb(cache device ,ssd) and /dev/sda(my hardisk ,source device) .Am i missing something here? – arpit joshi Apr 19 '16 at 0:00
  • @asj177, according to Documentation/device-mapper/cache.txt in the linux kernel sources, the cache target takes <metadata dev> <cache dev> <origin dev>. – psusi Apr 19 '16 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.