eio and loop devices
Opened this issue · 1 comments
Any idea how I can use eio_cli for caching utilizing a loop device like ramdisk? udev rules creation fails during the driver construction.
Any hint will be greatly appreciated,
Hello Mehryari,
The problem with loop-device is, they do not have UID associated with them. Hence cache created using loop device will not be persistent across reboot. So as you create cache using them, it does not fail, it fails to create corresponding udev rule file.
Here are sequence of steps for your reference which will allow you to create cache however I would not recommend you to do so. Thanks.
- losetup /dev/loop0 /mnt2/mydev
Creates loop device for file /mnt2/mydev. - [root@eiodev-01 mnt2]# eio_cli create -d /dev/loop0 -s /dev/sdc1 -p fifo -m wt -b 4096 -c c1
Cache Name : c1
Source Device : /dev/loop0
SSD Device : /dev/sdc1
Policy : fifo
Mode : Write Through
Block Size : 4096
Associativity : 256
None
ENV{ID_SERIAL}=="36d4ae520b3482a001acd3e290b901ace", ATTR{partition}=="1"
Creation of udev rules file failed
expected a character buffer object
Cache created successfully
- [root@eiodev-01 mnt2]# eio_cli info
Cache Name : c1
Source Device : /dev/loop0
SSD Device : /dev/sdc1
Policy : fifo
Mode : Write Through
Block Size : 4096
Associativity : 256
State : normal
You may perform I/O as well; however after reboot this cache will not persist!
Hope this helps!
~Akhil