Questions tagged [bcache]

Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives.

Filter by
Sorted by
Tagged with
1 vote
0 answers
37 views

Using hibernate with bcache

I have writethrough bcache working on Debian Sid with an underlying LUKS + LVM. My swap partition (already present) is lying unused as an LVM volume. I know that I am supposed to stop bcache before ...
user avatar
0 votes
0 answers
48 views

Adding bcache partition to fstab

I successfully setup bcache and added a HDD as a backing partition. I am able to mount that partition by sudo mount /dev/bcache0 /data I would like to add this to fstab. I edited it to the following: /...
user avatar
0 votes
1 answer
84 views

How can you check how much of a bcache cache is currently in use?

I've got a setup that includes a bcache cache device serving multiple backing devices. I would like to know how much of it is currently in use because bcache only caches certain kinds of data.
user avatar
  • 333
2 votes
1 answer
212 views

Is it possible to avoid cached data duplication in bcache and Btrfs RAID1?

There is a possibility to attach single bcache cache drive to multiple backing devices. Since bcache is not aware about filesystem which lies on top, this means it is not aware about any software RAID ...
user avatar
0 votes
0 answers
139 views

bcache on btrfs - drives won't stay statically mapped - order changes automatically

Just an upfront, I've been in IT professionally for 30 years, yet mostly on the Windows systems side of the house. I've taken quite an interest in Linux as of late to expand my horizons, yet this may ...
user avatar
1 vote
0 answers
201 views

Use SSDs as persistent buffer for HDDs to decrease power usage

similar questions have been asked multiple times ... How to use an SSD for caching, so my hard disks can spin down? Caching write changes on SSD to avoid HDD spin-up? ZFS, but (probably) not L2ARC ...
user avatar
2 votes
0 answers
184 views

LVMCache: Why use a cachepool instead of a cachevol?

I'm aware of the differences between a cachepool and cachevol. Cachepool separates the cache data and metadata into two separate volumes, whereas a Cachevol uses a single volume for both. My question ...
user avatar
  • 165
4 votes
0 answers
235 views

Using LVMCache or BCache for Hot-Warm-Cold Caching

I've recently reconfigured my current debian machine with three different drives: An SLC SSD, a QLC SSD, and a 4TB HDD. I've been toying around with lvmcache and other utilities, and I wanted to know ...
user avatar
  • 165
2 votes
1 answer
170 views

bcache fails to attach local ssd as caching device in google cloud

I'm trying to setup bcache in an instance in google cloud using a raid of local SSDs as caching device but everything fails in the attach phase of the process. For testing purposes I created a new ...
user avatar
  • 21
2 votes
0 answers
95 views

Troubleshooting slow writeback on bcache

can somebody give me a hint, how to troubleshoot bcache in writeback mode? I'm using a RAID 1 (2x500GB SSD) as caching device for the RAID 1 backing device (2x16TB HDD). Dirty data of bcache is not ...
user avatar
  • 21
1 vote
1 answer
298 views

bcache: is sequential_cutoff and other parameters supposed to be permanent?

I recall when setting up my system, I changed the sequential_cutoff parameter to zero by executing: echo 0 | sudo tee /sys/block/bcache0/bcache/sequential_cutoff Now, after many months I see it back ...
user avatar
  • 572
2 votes
1 answer
226 views

Can bcache have non-zero dirty cache forever?

I created a Raspberry Pi based bcache on SSD with a HDD based RAID 1 array. After populating the RAID with few TB of content, bcache showed 10% dirty cache. That would be expected, since I have /sys/...
user avatar
  • 23
0 votes
1 answer
78 views

Files come back from deletion

I have an script that does this: rm -rf "$test_dir" && sync && mkdir -p "$test_dir" unzip -qq "$zip" -d "$test_dir" # compile and run some ...
user avatar
2 votes
1 answer
412 views

Compiling kernel from source got a fatal error: too few arguments to function 'part_round_stats'

I'm trying to compile the kernel from source on the system CentOS 7. The output of uname -a is: Linux dbn03 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Here ...
user avatar
  • 2,809
2 votes
0 answers
34 views

Automatically store based on file size - linux - bcache?

Hoping to get answers to this on Debian based distros: When saving a file, from any program, I'd wish to know if it is possible for the OS to automatically save based on file size. For example, ...
user avatar
0 votes
1 answer
677 views

Missing bcache0 backing device

In my new Fedora 31 install there is no \dev\bcache0. The caching device is Raid 1: # ls -d /dev/b* /dev/block /dev/bsg /dev/btrfs-control /dev/bus # bcache-super-show /dev/md127 sb.magic ...
user avatar
  • 306
1 vote
0 answers
138 views

In dm-cache, does the metadata volume need to be redundant?

I currently have a pool of hard drive storage in LVM, arranged such that each physical volume is an mdraid mirror device, so that I have full redundancy. Now, I'd like to add a SSD cache to this pool ...
user avatar
  • 273
1 vote
1 answer
823 views

Testing bcache with raspberry pi 4 on ubuntu

I was testing bache on raspberry pi 4 with ubuntu. The reason I choose ubuntu that I found standard raspbian got some issues with bcache as kernel module not properly loaded. I tried to troubleshoot ...
user avatar
  • 294
0 votes
1 answer
2k views

"echo: write error: invalid argument" writing to sysfs

From the instructions for setting up bcache: echo cset.uuid > /sys/block/bcache0/bcache/attach What happens: root@gentooserver ~ # echo 45511b33-6bb8-42d5-a255-3de1749f8dda > /sys/block/...
user avatar
2 votes
1 answer
576 views

Convert existing LVM LV to bcache backing device

How do I convert an existing LVM LV to a bcache backing device? The official tool for converting an existing device to bcache is blocks, but it hasn't been updated since December 2014. At a minimum, ...
user avatar
  • 24.6k
0 votes
1 answer
92 views

Are btrfs reads round-robin or throughput maximising?

Does btrfs prefer to read from a faster device if one is available? My reason for asking: I have a btrfs RAID 1 on spinning rust. I want to use bcache for increased performance, and hope to only ...
user avatar
  • 24.6k
2 votes
1 answer
182 views

Access bcache backing data without bcache (eg from Windows)

Assuming that the bcache cache device is fully flushed, is it possible to access the data stored in a bcache backing device without bcache? I'd like to have a bcache NTFS partition which is also ...
user avatar
  • 24.6k
1 vote
1 answer
174 views

Replace Bcache Backing Device

Suppose I want to replace the crusty old HDD I'm using as a backing device with a new one. Can I transfer my data to the new device without having to set up.an entirely new bcache?
user avatar
2 votes
1 answer
250 views

Corruption on BCache uppon Kernel Update/Upgrade

After using a write-around bcache on the root device of an old laptop for more than a year (HD + SD card), I finally found out that some severe filesystem corruptions I was facing -- which lead me to ...
user avatar
  • 121
0 votes
1 answer
483 views

Add a backing device to an existing bcache device

I currently have a bcache device with one SSD as cache and one HDD as a backing device. Is it possible to add another backing device without loosing the files already on the bcache device?
user avatar
0 votes
2 answers
742 views

Using dm-cache for transparent ongoing backup

Is there any chance to use dm-cache for ongoing SSD backup? I want to have very fast and cheap eventually consistent failure resistant partition. Use case: We have regular ssd (1Gb) (cache) + hdd (...
user avatar
1 vote
1 answer
2k views

Installing bcache on debian9

I am installing bcache tools on my debian-9 machine root@machine# uname -a Linux singlefs-ssd-vm 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux Commands tried: make-...
user avatar
  • 111
2 votes
2 answers
2k views

Bcache writeback_percent max value

I'm tryng to set writeback_percent at a value > 40 but it only accept value between 0 and 40. If i set echo 50 > /sys/block/bcache0/bcache/writeback_percent then when i read the value more ...
user avatar
  • 123
1 vote
2 answers
1k views

Getting files off bcache disk from different computer

I have a disk with a btrfs filesystem on top of bcache that was used in an old installation I no longer have (unintentionally nuked). When I plug in the drive, /dev/bcache0 doesn't show up and I'm not ...
user avatar
  • 103
2 votes
1 answer
1k views

Use SSD for caching files from HDD

I don't have a name for this so I'll present my special user case: I have an hybrid-laptop made of a tablet slate of only 32GB SSD and a 500GB HDD build into the USB keyboard-dock and I want to make ...
user avatar
  • 21
5 votes
2 answers
3k views

Cannot attach cache device to backing device

I have an LVM and I wanted to use bcache to cache one of its LVs. (Yes, I know I could use lvmcache, but I was having issues booting and I gave up using it.) First, I used blocks to convert the LV ...
user avatar
4 votes
1 answer
991 views

Is bcache solution for my ssd use case? [closed]

I recently bought a 240 GB SSD to speed up my computer with 1 TB HDD. I dual boot Windows and Linux. I want to use my new SSD in the most effective way. Reading through many sites led me to conclusion ...
user avatar
5 votes
1 answer
646 views

What is grinding my HDDs and how do I stop it?

Something is grinding my hard disks all the time (a few KBs every second) and I can't seem to figure out what. My configuration: 4 spinning platters (/dev/sd[cdef]) assembled into a raid5 array, ...
user avatar
  • 347
1 vote
1 answer
837 views

Error while installing Bcache on centOS

I am trying to setup Bcache on my existing system(Its risky,but we are not worried about losing any data ) . So my make and make install works proper but when I run the command make-bcache i receive ...
user avatar
1 vote
0 answers
45 views

Which is the correct dm-cache version

I am trying to install dm-cache on my CentOS machine. Which dm-cache version should I use. I read on wikipedia as below: Another dm-cache project with similar goals was announced by Eric Van ...
user avatar
1 vote
1 answer
3k views

bcache not working as expected with ramdisk as cache device

I was trying out bcache but i don't have an SSD so wanted to use free memory as a substitute. As ramdisk is listed in /proc/devices as block device i assumed this would work OK but with below simple ...
user avatar
  • 213
5 votes
0 answers
670 views

bcache: writeback strategy

I'm using bcache with about 1 TByte of SSD caching for about 40 TByte of data. With writeback and 10% configured for bcache, about 100 GByte of dirty data exist only on the caching devices. I like ...
user avatar
  • 345
2 votes
0 answers
165 views

Can I convert and deconvert a bache0 device to a standard block device and still read the filesystem?

When I set my raid (ex. /dev/md0) as a backing device. To work with the raid device, I have to interface with /dev/bcache0. However, if I wanted to add to the raid using mdadm, I need to address /...
user avatar
5 votes
1 answer
12k views

How to remove bcache0 volume?

I've tried echoing to detach and stop. The device will remove itself, but will show up again on reboot. One time on reboot, it restored the mdadm raid I had as a backing device! The other time I ...
user avatar
2 votes
1 answer
956 views

SSHD drive caching algorithm vs bcache/LVM

I read somewhere that the algorithms used by LVM/bcache are much better than the algorithms implemented by the H-HDD/SSHD drives. Is it true?
user avatar
  • 2,662
1 vote
1 answer
266 views

Using the SSD area of a H-HDD drive with LVM/bcache

I heard that LVM/bcache can be used in Linux to store the most accessed files if there is a separate SSD drive. With a hybrid drive (SSHD/H-HDD), can the flash area be manually used by LVM/bcache as ...
user avatar
  • 2,662
1 vote
2 answers
544 views

How to install bcache on Linux 4.1?

The official user documentation doesn't bother to say a word about how bcache is structured and how it can be installed. There's no .ko file in the source root after building with make. I speculate it'...
user avatar
8 votes
1 answer
2k views

How to restart a 'stopped' bcache device?

I need to upgrade some drive firmware and I'd like to shut down bcache for the duration. The docs show how to stop a bcache device: stop Write to this file to shut down the bcache device and ...
user avatar
1 vote
1 answer
937 views

Change Linux Bcache device type

I have accidentally configured my SSD as a backing device instead of a caching device. Simply trying either one of the following: sudo make-bcache -C /dev/sdb1 sudo make-bcache -C /dev/sdb Gives the ...
user avatar
  • 315
5 votes
1 answer
6k views

Optimizing bcache

I have 3 HDD and 1 SSD, I have successfully mounted all drives to bcache. pavs@VAS:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 132G 35G 90G 28% / none 4....
user avatar
  • 167
7 votes
2 answers
4k views

Using multiple SSDs as cache devices with bcache?

If we have three SSDs installed in a system, with a spare partition for the unused space on the SSD (/dev/sda2, /dev/sdb2 and /dev/sdc2). Can bcache be configured to use all three of those partitions ...
user avatar
  • 263
14 votes
2 answers
8k views

bcache on md or md on bcache

bcache allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. If I understand correctly, an SSD* could be ...
user avatar
12 votes
1 answer
2k views

How to use an SSD for caching, so my hard disks can spin down?

I've got a file server with a bunch of disks running together in a BTRFS pool and want to add an SSD for caching. I'm not mainly after speeding up things, but want to catch the regular small accesses ...
user avatar
  • 2,103
2 votes
1 answer
4k views

How to regenerate initramfs so it can include bcache module?

Eventually I have converted root-fs into bcache (with the help of blocks). I skipped the step update-initramfs -u -k all because I've been using bcache on other partitions for some time, and I've ...
user avatar
9 votes
3 answers
20k views

How do I remove the cache device from bcache?

I believe, that once I made sure my cache device state is "clean": $ sudo cat /sys/block/bcache0/bcache/state I can just physically remove it from the machine when it is powered off or boot with ...
user avatar