Thanks for the reply Zdenek!

I use LVM2 from apt repo for debian
ii  liblvm2cmd2.02:amd64           2.02.111-2.2                 amd64        
LVM2 command library
ii  lvm2                           2.02.111-2.2                 amd64        
Linux Logical Volume Manager

And, for creating the cache volume, I used lvcreate to do it in a single 
command, something like this

lvcreate -n tmachine_cache --type cache-pool --cachemode writeback -l 100%FREE 
blackhole <fast_device_to_use_as_cache>

And… I just had a look at the redhat repository and… yeah, this version of LVM2 
running on Debian seems to be dated back on September 2014.

Is this version of LVM2 too old for using lvmcache?

Thanks! ^_^

> El 22 mar 2016, a las 2:09, Zdenek Kabelac <[email protected]> escribió:
> 
> Dne 21.3.2016 v 14:30 Manuel Bernal Llinares napsal(a):
>> Hi guys,
>> 
>> I’m trying to set up lvmcache for a backup volume I use for time machine.
>> 
>> I’ve seen there is quite a lot of very good documentation about this, but 
>> also out of sync between different linux systems, e.g. I can’t get those 
>> cache* attributes when running lvs on debian 8.
>> 
>> As you can see under this lines, “tmachine” is a cached LVM volume
>> # lvs -a
>>   LV                     VG          Attr       LSize   Pool           
>> Origin           Data%  Meta%  Move Log Cpy%Sync Convert
>>   backups                blackhole   -wi-ao----   5,00t
>>   clasificador           blackhole   -wi-ao----   1,00t
>>   [lvol0_pmspare]        blackhole   ewi------- 592,00m
>>   nfs_home               blackhole   -wi-ao----   1,00t
>>   tmachine               blackhole   Cwi-aoC---   3,00t tmachine_cache 
>> [tmachine_corig]
>>   tmachine_cache         blackhole   Cwi---C--- 231,67g
>>   [tmachine_cache_cdata] blackhole   Cwi-ao---- 231,67g
>> [tmachine_cache_cmeta] blackhole   ewi-ao---- 592,00m
>>   [tmachine_corig]       blackhole   owi-aoC---   3,00t
>> 
>> Even with a couple of mac computers sending its time machine data for a 
>> while, the cache seems to not be working.
>> 
>> This are the parameters described by “dmsetup status” when run on that 
>> volume:
>> 
>> # dmsetup status /dev/blackhole/tmachine
>> 0 6442450944 cache 8 12849/151552 128 11886/3795648 17772 177033 2798405 
>> 1620326 0 3856 1 1 writeback 2 migration_threshold 2048 mq 10 
>> random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 
>> read_promote_adjustment 4 write_promote_adjustment 8
>> 
>> I’ve tested another cache alternative (flashcache) before, and the parameter 
>> "sequential_threshold” sounds familiar to me, I suspect it is the one making 
>> the cache flag the data transfer as “sequential”, passing it through to the 
>> backend (slow) device, instead of using the cache to absorb the writing 
>> traffic, and clean dirty blocks later, behavior I saw when using flashcache.
>> 
>> “sequential_threshold” is configured, by default, with a value of 512, but I 
>> haven’t been able to find what’s that 512, maybe extents, bytes, kb, mb? 
>> Unfortunately, I haven’t been able to find a way, at least in Debian, to 
>> change those parameters, neither creating the cache nor once it’s already 
>> been created.
>> 
>> Any ideas?
> 
> 
> 'mq' policy is rather obsoleted.
> 
> Now it's suggested to use  'smq' which should be better in all aspects.
> So please try usage of new 'smq' first (which happens to have no 
> configurables ATM - it's auto-tunning and consumes less memory).
> 
> You also need relatively new lvm2 to show all cache settings via lvm2 'lvs' 
> attrs.
> 
> Regards
> 
> Zdenek
> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

--------
Manuel Bernal Llinares
[email protected]
M.Sc. in Computer Science




_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Reply via email to