Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2281  / 1 Year ago, tue, may 23, 2023, 12:54:55

I have set up /dev/sda3 on my SSD to cache /dev/sdb3 on my HDD as /dev/bcache0 using bcache in Ubuntu 13.10 (kernel 3.11.0-14-generic). I have formatted it as ext4.



I currently mount / (on my SSD) and /home (bcache) using these fstab options



# / (root) -> /dev/sda2 (SSD)
UUID={uuid for /dev/sda2} / ext4 discard,noatime,nodiratime,errors=remount-ro 0 1

# /home -> { /dev/bcache0 -> { /dev/sda3 -> /dev/sdb3 } }
UUID={uuid for /dev/bcache0} /home ext4 defaults 0 2


What I am wondering is if any mount options (e.g. discard (TRIM), noatime, etc) are useful when mounting bcache, or if bcache its self takes care of optimising the filesystem for the SSD and HDD partitions.



Please let me know if I have not made my question clear, thanks.


More From » mount

 Answers
5

discard is a special case: bcache will (I think) make use of it to discard sectors, but won't pass it down the stack unless you have explicitly asked it to (echo 1 |sudo tee -a /sys/block/*/bcache/discard, which will be remembered across reboots). The best case for performance is that your filesystem sends discards (which means you need to put the flag in /etc/fstab) and bcache passes them down if and only if your SSD is SATA 3.1 (queued TRIM support).



Your filesystem is able to detect bcache as something like an SSD (rotational=0 in sysfs), which it may use to tune itself a bit differently. Aside from discard and noatime, I don't think there's a real need to stray from ext4 defaults.


[#27767] Wednesday, May 24, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainsbeave

Total Points: 280
Total Questions: 98
Total Answers: 105

Location: Faroe Islands
Member since Sat, Aug 20, 2022
2 Years ago
;