hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/Documentation/admin-guide/bcache.rst
....@@ -5,11 +5,14 @@
55 Say you've got a big slow raid 6, and an ssd or three. Wouldn't it be
66 nice if you could use them as cache... Hence bcache.
77
8
-Wiki and git repositories are at:
8
+The bcache wiki can be found at:
9
+ https://bcache.evilpiepirate.org
910
10
- - http://bcache.evilpiepirate.org
11
- - http://evilpiepirate.org/git/linux-bcache.git
12
- - http://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/
1316
1417 It's designed around the performance characteristics of SSDs - it only allocates
1518 in erase block sized buckets, and it uses a hybrid btree/log to track cached
....@@ -41,17 +44,21 @@
4144 to be flushed.
4245
4346 Getting started:
44
-You'll need make-bcache from the bcache-tools repository. Both the cache device
47
+You'll need bcache util from the bcache-tools repository. Both the cache device
4548 and backing device must be formatted before use::
4649
47
- make-bcache -B /dev/sdb
48
- make-bcache -C /dev/sdc
50
+ bcache make -B /dev/sdb
51
+ bcache make -C /dev/sdc
4952
50
-make-bcache has the ability to format multiple devices at the same time - if
53
+`bcache make` has the ability to format multiple devices at the same time - if
5154 you format your backing devices and cache device at the same time, you won't
5255 have to manually attach::
5356
54
- make-bcache -B /dev/sda /dev/sdb -C /dev/sdc
57
+ bcache make -B /dev/sda /dev/sdb -C /dev/sdc
58
+
59
+If your bcache-tools is not updated to latest version and does not have the
60
+unified `bcache` utility, you may use the legacy `make-bcache` utility to format
61
+bcache device with same -B and -C parameters.
5562
5663 bcache-tools now ships udev rules, and bcache devices are known to the kernel
5764 immediately. Without udev, you can manually register devices like this::
....@@ -188,7 +195,7 @@
188195 If bcache is not available in the kernel, a filesystem on the backing
189196 device is still available at an 8KiB offset. So either via a loopdev
190197 of the backing device created with --offset 8K, or any value defined by
191
---data-offset when you originally formatted bcache with `make-bcache`.
198
+--data-offset when you originally formatted bcache with `bcache make`.
192199
193200 For example::
194201
....@@ -210,7 +217,7 @@
210217
211218 After you boot back with bcache enabled, you recreate the cache and attach it::
212219
213
- host:~# make-bcache -C /dev/sdh2
220
+ host:~# bcache make -C /dev/sdh2
214221 UUID: 7be7e175-8f4c-4f99-94b2-9c904d227045
215222 Set UUID: 5bc072a8-ab17-446d-9744-e247949913c1
216223 version: 0
....@@ -318,7 +325,7 @@
318325
319326 The default metadata size in bcache is 8k. If your backing device is
320327 RAID based, then be sure to align this by a multiple of your stride
321
- width using `make-bcache --data-offset`. If you intend to expand your
328
+ width using `bcache make --data-offset`. If you intend to expand your
322329 disk array in the future, then multiply a series of primes by your
323330 raid stripe size to get the disk multiples that you would like.
324331