stec-inc / EnhanceIO

EnhanceIO Open Source for Linux
Other
420 stars 177 forks source link

udev rule template invokes "eio_cli enable", which is invalid #6

Closed dbt816 closed 11 years ago

dbt816 commented 11 years ago

In the EIO_SETUP section of the 94-Enhanceio.template file, it calls eio_cli with the enable option to setup a cache, but the enable option is invalid.

RUN+="/sbin/eio_cli enable -d /dev/$env{disk_name} -s /dev/$env{ssd_name} "

usage: eio_cli [-h] {delete,edit,info,clean,create} ... eio_cli: error: invalid choice: 'enable' (choose from 'delete', 'edit', 'info', 'clean', 'create')

sanoj-stec commented 11 years ago

The eio_cli enable command has been added. work in progress

dbt816 commented 11 years ago

Just for informational purposes since this is "work in progress": I changed my udev rule back to "enable" and the driver throws an error when I reboot:

[ 13.632559] enhanceio: Cache creation failed: get_device for source device failed.

So a question: when I reboot and the udev rule runs with "create" instead of "enable", does the driver actually recognize that a cache already exists on the SSD and it essentially does an enable anyway? I browsed the driver source code and I want to say yes, it does, but I'm not 100% certain.

sanoj-stec commented 11 years ago

Fixed in the commit a9302475bf9aba7b1de28a0cd08420525ec48620 The driver detects previously created cache. On reboot the driver detects if any dirty blocks exist and reloads the cache with the dirty data.