69-bcache.rules Tries to Re-register bcache that is already registered and attached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bcache-tools |
New
|
Unknown
|
|||
bcache-tools (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have been using bcache for two drives (/dev/sda and /dev/sdb). The cache is registered correctly, but it looks like the UDEV rules in 69-bcache.rules need to be tweaked to identify if a bcache is already mounted when jumping to bcache_
/var/log/messages
Sep 15 10:29:15 HTPC-Xeon systemd-
Sep 15 10:29:15 HTPC-Xeon kernel: [132665.473836] bcache: register_bcache() error : device already registered
Sep 15 10:29:17 HTPC-Xeon systemd-
Sep 15 10:29:17 HTPC-Xeon kernel: [132668.109215] bcache: register_bcache() error : device already registered
Sep 15 10:29:18 HTPC-Xeon systemd-
Sep 15 10:29:18 HTPC-Xeon kernel: [132668.472411] bcache: register_bcache() error : device already registered
Sep 15 10:29:19 HTPC-Xeon systemd-
Sep 15 10:29:19 HTPC-Xeon systemd-
Sep 15 10:29:19 HTPC-Xeon kernel: [132669.919959] bcache: register_bcache() error : device already registered
Sep 15 10:29:19 HTPC-Xeon systemd-
Sep 15 10:29:19 HTPC-Xeon kernel: [132669.970662] bcache: register_bcache() error : device already registered
Sep 15 10:29:20 HTPC-Xeon systemd-
root@HTPC-Xeon:/# bcache-super-show /dev/sda
sb.magic ok
sb.first_sector 8 [match]
sb.csum 6AEA0E3D0A952CEF [match]
sb.version 4 [backing device]
dev.label NAS
dev.uuid 6b52e51f-
dev.sectors_
dev.sectors_
dev.data.
dev.data.cache_mode 1 [writeback]
dev.data.
cset.uuid e960d897-
root@HTPC-Xeon:/# bcache-super-show /dev/sdb
sb.magic ok
sb.first_sector 8 [match]
sb.csum D19F0AAACEBB036B [match]
sb.version 4 [backing device]
dev.label BACKUP
dev.uuid 6c18a7f6-
dev.sectors_
dev.sectors_
dev.data.
dev.data.cache_mode 1 [writeback]
dev.data.
cset.uuid e960d897-
root@HTPC-Xeon:/# bcache-status
--- bcache ---
Device /dev/sda (8:0)
UUID e960d897-
Block Size 0.50KiB
Bucket Size 512.00KiB
Congested? False
Read Congestion 2.0ms
Write Congestion 20.0ms
Total Cache Size 1.09TiB
Total Cache Used 1.09TiB (100%)
Total Cache Unused 0B (0%)
Dirty Data 0.50KiB (0%)
Evictable Cache 905.42GiB (81%)
Replacement Policy [lru] fifo random
Cache Mode writethrough [writeback] writearound none
Total Hits 1916371 (63%)
Total Misses 1117878
Total Bypass Hits 791703 (24%)
Total Bypass Misses 2470122
Total Bypassed 103.00GiB
root@HTPC-Xeon:/# apt-cache policy bcache-tools
bcache-tools:
Installed: 1.0.8-4ubuntu3
Candidate: 1.0.8-4ubuntu3
Version table:
*** 1.0.8-4ubuntu3 500
500 http://
100 /var/lib/
root@HTPC-Xeon:/# lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Changed in bcache-tools: | |
status: | Unknown → New |
If I add this line below after line 5 of /lib/udev/ rules.d/ 69-bcache. rules, the errors go away and when I reboot the bcache is correctly mounted/registered.
ACTION=="change", GOTO="bcache_end"
Is there any risk to adding this? Is there a better way to fix this problem? Thank you!