Lidong Zhong <lzhong@xxxxxxxx> schrieb: >>>> On 4/9/2015 at 02:56 AM, in message >>>> <98agvb-l7r.ln1@xxxxxxxxxxxxxxxxxxx>, Kai > Krakow <hurikhan77@xxxxxxxxx> wrote: >> David Mohr <david@xxxxxxxx> schrieb: >> >> > On 2015-04-06 09:44, arnaud gaboury wrote: >> >> Here is my overall plan: >> >> >> >> root filesystem & OS on a SSD >> >> DB and other stuff on HD. >> >> Use ssd as caching device and HD as backing. >> >> >> >> Shall I partition the SSD with : one partition for OS and one empty >> >> for bcache? Or install the OS on the whole SSD and use the whole SSD >> >> as caching device? >> >> >> >> Thank you for hint. >> > >> > So this is just depending on your preference, how big the SSD is, and >> > how much space you expect your OS to take up. >> > >> > Personally I split my SSD into two partitions: one for the root FS, and >> > the other as a caching device for /home. >> >> The other preference is valid, too: I chose to put bcache only on the SSD >> to >> >> get maximum benefit from its capacity, rootfs and home dynamically share >> the >> > I am curious about how rootfs and home share the SSD dynamically. Are they > on the same partition? Sorry for stupid questions since I just touched > bcache recently. Cache and backing device association is not 1:1. You can attach multiple backing partitions (even from distinct filesystems) to the one and same caching partition. So, accesses to one of the cached filesystems will go through the same bcache, thus sharing the cache space through bcache's LRU implementation (or if you change it from the default, even something else like LRU). Here's my setup (shortened): ├─sdb3 8:19 0 79,5G 0 part │ ├─bcache0 252:0 0 925,5G 0 disk │ ├─bcache1 252:1 0 925,5G 0 disk │ └─bcache2 252:2 0 925,5G 0 disk with sdb3 being the one and only bcache partition on SSD: $ ls -al /sys/fs/bcache/ insgesamt 0 drwxr-xr-x 3 root root 0 11. Apr 00:25 . drwxr-xr-x 11 root root 0 6. Apr 19:07 .. drwxr-xr-x 7 root root 0 8. Apr 20:33 bf2b67f9-a261-4d27- a6ef-2961f2ce2cc2 --w------- 1 root root 4096 8. Apr 20:33 register --w------- 1 root root 4096 6. Apr 19:08 register_quiet $ ls -al /sys/fs/bcache/bf2b67f9-a261-4d27-a6ef-2961f2ce2cc2/ insgesamt 0 drwxr-xr-x 7 root root 0 11. Apr 00:25 . drwxr-xr-x 3 root root 0 11. Apr 00:25 .. -r--r--r-- 1 root root 4096 8. Apr 20:33 average_key_size lrwxrwxrwx 1 root root 0 8. Apr 20:33 bdev0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc/sdc2/bcache lrwxrwxrwx 1 root root 0 8. Apr 20:33 bdev1 -> ../../../devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd2/bcache lrwxrwxrwx 1 root root 0 8. Apr 20:33 bdev2 -> ../../../devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sde/sde2/bcache -r--r--r-- 1 root root 4096 8. Apr 20:33 block_size -r--r--r-- 1 root root 4096 8. Apr 20:33 btree_cache_size -r--r--r-- 1 root root 4096 8. Apr 20:33 bucket_size lrwxrwxrwx 1 root root 0 8. Apr 20:33 cache0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sdb/sdb3/bcache [...] -- Replies to list only preferred. -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html