bcache não está armazenando em cache todas as unidades

1

Tenho 3 HDD e 1 SSD, montei com sucesso todas as unidades para bcache.

pavs@VAS:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       132G   35G   90G  28% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.9G  8.0K  3.9G   1% /dev
tmpfs           786M  2.3M  784M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.9G  152K  3.9G   1% /run/shm
none            100M   52K  100M   1% /run/user
/dev/bcache1    2.7T  2.1T  508G  81% /var/www/html/directlink/FTP1
/dev/bcache2    1.8T  614G  1.2T  36% /var/www/html/directlink/FTP2
/dev/bcache0    1.8T  188G  1.6T  11% /var/www/html/directlink/FTP3
/dev/sdf1       367G  284G   65G  82% /media/pavs/e93284df-e52e-4a5d-a9e1-323a388b332f

mas, de acordo com as estatísticas do bcache, duas das unidades estão em cache, mas a terceira não é (bcache1)

bcache0

pavs@VAS:~$ tail /sys/block/bcache0/bcache/stats_total/*
==> /sys/block/bcache0/bcache/stats_total/bypassed <==
161G

==> /sys/block/bcache0/bcache/stats_total/cache_bypass_hits <==
4440257

==> /sys/block/bcache0/bcache/stats_total/cache_bypass_misses <==
0

==> /sys/block/bcache0/bcache/stats_total/cache_hit_ratio <==
69

==> /sys/block/bcache0/bcache/stats_total/cache_hits <==
1360041

==> /sys/block/bcache0/bcache/stats_total/cache_miss_collisions <==
426

==> /sys/block/bcache0/bcache/stats_total/cache_misses <==
587356

==> /sys/block/bcache0/bcache/stats_total/cache_readaheads <==
0

bcache1

pavs@VAS:~$ tail /sys/block/bcache1/bcache/stats_total/*
==> /sys/block/bcache1/bcache/stats_total/bypassed <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_bypass_hits <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_bypass_misses <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_hit_ratio <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_hits <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_miss_collisions <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_misses <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_readaheads <==
0

bcache2

pavs@VAS:~$ tail /sys/block/bcache2/bcache/stats_total/*
==> /sys/block/bcache2/bcache/stats_total/bypassed <==
193G

==> /sys/block/bcache2/bcache/stats_total/cache_bypass_hits <==
4329693

==> /sys/block/bcache2/bcache/stats_total/cache_bypass_misses <==
0

==> /sys/block/bcache2/bcache/stats_total/cache_hit_ratio <==
74

==> /sys/block/bcache2/bcache/stats_total/cache_hits <==
1859198

==> /sys/block/bcache2/bcache/stats_total/cache_miss_collisions <==
232

==> /sys/block/bcache2/bcache/stats_total/cache_misses <==
650958

==> /sys/block/bcache2/bcache/stats_total/cache_readaheads <==
0

Eu sou novo no bcache, então eu obviamente perdi algo, o que eu senti falta e por favor me ajude a encontrar a solução. Deixe-me saber se você precisar de mais alguma informação.

    
por bran 12.09.2014 / 13:14

1 resposta

1

Encontrei a solução, aparentemente esqueci de anexar o dispositivo de cache assim:

echo UUID > /sys/block/bcache1/bcache/attach

Agora seu cache é bom:

pavs@VAS:/home/pavs$ tail /sys/block/bcache1/bcache/stats_total/*
==> /sys/block/bcache1/bcache/stats_total/bypassed <==
106M

==> /sys/block/bcache1/bcache/stats_total/cache_bypass_hits <==
1624

==> /sys/block/bcache1/bcache/stats_total/cache_bypass_misses <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_hit_ratio <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_hits <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_miss_collisions <==
0

==> /sys/block/bcache1/bcache/stats_total/cache_misses <==
345

==> /sys/block/bcache1/bcache/stats_total/cache_readaheads <==
0
    
por bran 12.09.2014 / 14:37