Open hryamzik opened 10 years ago
Hi,
1. From the details you have provided, it is not sure if your cache was created after reboot.
As you said earlier that you have to manually insert the modules, could you please verify before running md5sum after reboot; if enhanceio modules were loaded and cache was created successfully.
Here I am assuming you have /storage/removeme file is on your /dev/sdb device which you are caching. Could you please share details of /etc/fstab entry to check file system details of your host?
I hope this will give some clue to debug it further. Thanks.
Sure, here's the lsmod output:
# lsmod |grep -i enhanceio
enhanceio_lru 12922 1
enhanceio_fifo 12809 0
enhanceio 162345 2 enhanceio_lru,enhanceio_fifo
And the fstab content:
# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=ed655083-cf57-495f-a071-85e7e9ad2430 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=3be0c2bd-940c-4ee9-8e67-1fd270d5a41a none swap sw 0 0
/dev/vg_big/storage /storage ext4 defaults 0 0
Modules are loaded as I've manually put them to /etc/modules
, this code is listed in the initial issue post.
PS: I've mostly played with 14.04 but this server is in production now. I've found out that udev rules are loaded way after filesystems are mount.
Hey,
Could you please as well give me output for "eio_cli info" command as well? B'coz even if modules are loaded, it does not mean cache is also created and active.
Absolutely.
root@enhanceio:~# eio_cli info
Cache Name : enhanceio0
Source Device : /dev/sdb
SSD Device : /dev/sdc
Policy : lru
Mode : Write Back
Block Size : 4096
Associativity : 256
State : normal
For more information look at /proc/enhanceio/<cache_name>/config
In fact I test this in a VM running in on external USB HDD with a disk attached from my internal ssd. It seems to be easy to reproduce.
Looks interesting! No clue till this point!! Hmm ... Good idea for me would be to reproduce it in house! Let me try and get back to you on this! Thanks for reporting though!
Have a happy weekend! :)
Thanks. Here're the commands I've used to configure the bare installation after attaching two disks (HDD and SSD):
sudo aptitude install lvm2
hdd=/dev/sdb
ssd=/dev/sdc
sudo vgcreate vg_big $hdd
sudo lvcreate -v -L2G -nstorage vg_big
sudo mkfs.ext4 /dev/vg_big/storage
sudo mkdir -vp /storage
grep "/dev/vg_big/storage" /etc/fstab || sudo tee -a /etc/fstab <<EOF
/dev/vg_big/storage /storage ext4 defaults 0 0
EOF
sudo mount -a
hi hryamzik,
If the problem was that the cache was not active before mount, I have proposed a patch some time ago to add a symlink in udev rules. (https://github.com/ksperis/EnhanceIO/commit/954e167fdb580d514747512ce2bd1c9c29a77418) This allow to be sure that cache (especially in wb) has been loaded before fstab mount: ie with something like this in fstab :
/dev/eio-enhanceio0 /storage ext4 defaults 0 0
I'll give it a try this week and will let you know. Thanks! UPD: cant check right now, blocked by #80.
I've just fixed this in eio_cli with some python code and udev and systemd fixes. I'll send patches soon.
Tried both on ubuntu 14.04 and 12.04.
Here's the install log:
For 12.04 I've had to manually add modules load:
And here's the test:
After reboot I check the md5:
And it turns out that files differ.
I've also tried to convert udev rules to a shell script and run it in init script:
Didn't get any luck. And it's not even a root device! Looks very confusing.