Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcache: doc: update Documentation/admin-guide/bcache.rst

bcache.rst is from the original bcache.txt which was merged in mainline
kernel v3.10. There are a few things changed in the past 7 years. This
patch updates bache.rst documents in following content,
- Update bcache-tools git repo to,
https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/
- Update bcache kernel tree to mainline kernel tree,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
- make-bcache util is replaced by the unified bcache util,
`make-bcache` now can be performed by `bcache make`

Signed-off-by: Coly Li <colyli@suse.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Link: https://lore.kernel.org/r/20200821151354.16727-1-colyli@suse.de
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Coly Li and committed by
Jonathan Corbet
27c8700b bb84bc51

+19 -12
+19 -12
Documentation/admin-guide/bcache.rst
··· 5 5 Say you've got a big slow raid 6, and an ssd or three. Wouldn't it be 6 6 nice if you could use them as cache... Hence bcache. 7 7 8 - Wiki and git repositories are at: 8 + The bcache wiki can be found at: 9 + https://bcache.evilpiepirate.org 9 10 10 - - https://bcache.evilpiepirate.org 11 - - http://evilpiepirate.org/git/linux-bcache.git 12 - - https://evilpiepirate.org/git/bcache-tools.git 11 + This is the git repository of bcache-tools: 12 + https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/ 13 + 14 + The latest bcache kernel code can be found from mainline Linux kernel: 15 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 13 16 14 17 It's designed around the performance characteristics of SSDs - it only allocates 15 18 in erase block sized buckets, and it uses a hybrid btree/log to track cached ··· 44 41 to be flushed. 45 42 46 43 Getting started: 47 - You'll need make-bcache from the bcache-tools repository. Both the cache device 44 + You'll need bcache util from the bcache-tools repository. Both the cache device 48 45 and backing device must be formatted before use:: 49 46 50 - make-bcache -B /dev/sdb 51 - make-bcache -C /dev/sdc 47 + bcache make -B /dev/sdb 48 + bcache make -C /dev/sdc 52 49 53 - make-bcache has the ability to format multiple devices at the same time - if 50 + `bcache make` has the ability to format multiple devices at the same time - if 54 51 you format your backing devices and cache device at the same time, you won't 55 52 have to manually attach:: 56 53 57 - make-bcache -B /dev/sda /dev/sdb -C /dev/sdc 54 + bcache make -B /dev/sda /dev/sdb -C /dev/sdc 55 + 56 + If your bcache-tools is not updated to latest version and does not have the 57 + unified `bcache` utility, you may use the legacy `make-bcache` utility to format 58 + bcache device with same -B and -C parameters. 58 59 59 60 bcache-tools now ships udev rules, and bcache devices are known to the kernel 60 61 immediately. Without udev, you can manually register devices like this:: ··· 195 188 If bcache is not available in the kernel, a filesystem on the backing 196 189 device is still available at an 8KiB offset. So either via a loopdev 197 190 of the backing device created with --offset 8K, or any value defined by 198 - --data-offset when you originally formatted bcache with `make-bcache`. 191 + --data-offset when you originally formatted bcache with `bcache make`. 199 192 200 193 For example:: 201 194 ··· 217 210 218 211 After you boot back with bcache enabled, you recreate the cache and attach it:: 219 212 220 - host:~# make-bcache -C /dev/sdh2 213 + host:~# bcache make -C /dev/sdh2 221 214 UUID: 7be7e175-8f4c-4f99-94b2-9c904d227045 222 215 Set UUID: 5bc072a8-ab17-446d-9744-e247949913c1 223 216 version: 0 ··· 325 318 326 319 The default metadata size in bcache is 8k. If your backing device is 327 320 RAID based, then be sure to align this by a multiple of your stride 328 - width using `make-bcache --data-offset`. If you intend to expand your 321 + width using `bcache make --data-offset`. If you intend to expand your 329 322 disk array in the future, then multiply a series of primes by your 330 323 raid stripe size to get the disk multiples that you would like. 331 324