bcache не кэширует все диски

У меня есть 3 HDD и 1 SSD, я успешно подключил все диски к bcache.

[email protected]:~$ 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

но согласно статистике bcache два диска кешируются, а третий нет (bcache1)

bcache0

[email protected]:~$ 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

[email protected]:~$ 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

[email protected]:~$ 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

Я новичок в bcache, поэтому я явно что-то упустил, что я упустил, и, пожалуйста, помогите мне найти решение. Дайте мне знать, если вам нужна дополнительная информация.

1 ответ

Решение

Нашел решение, видимо я забыл прикрепить кеш устройства вот так:

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

Теперь его кеширование нормально

[email protected]:/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
Другие вопросы по тегам