2

I want to accelerate a 4TB HDD using a 100GB cache partition on an SSD on linux. I only need read-only-cache, so data corruption should not be a problem. I understand that bcache offers a relatively straightforward solution to this use-case. However, the solution (making the SSD-partition a caching partition, making the HDD partition a cached partition and linking them) requires the creation of a "superblock" wrapping the actual data partition on the HDD, in the meantime requiring a reformat of the drive. The partition itself does not differ from an uncached partition, but is not directly in the HDD's partition table, which only contains a pointer to the superblock to ensure that the partition is recognized as a cached partition. Now to my question:

I want to be able to read the partition with Windows, too. It will be an NTFS-partition. Windows can't understand bcache partitions to the best of my knowledge. What are my options?

The superblock should not be essential for devices only cached for reading, right? Is there a way to set up bcache without it? If not, here are two of my ideas:

  • Write the superblock into a file and use mdadm to RAID it with the actual partition, tricking bcache into thinking it's dealing with a cached partition.
  • Manipulate the partition table of the HDD to contain overlapping partitions, one starting at the superblock and one starting at the actual partition. Is this even possible?

Which is the saner approach? Are there better approaches to realize my use-case?

heio
  • 29
  • 2
  • First, I'm assuming you mean you're caching a 4TB backing device with a 100GB cache device. Second, we need to know what your workload is like before offering any kind of solutions. You say that you need to read it with Windows, but don't mention why you would need to do so directly rather than using something like CIFS. Perhaps this is a personal machine that is dual booting? – Spooler Feb 23 '17 at 03:27
  • Thanks for your answer, @SmallLoanOf1M. Yes, it is a personal machine. I hope this is the right forum for the question anyway, since I found most related questions here. Your assumption is correct, the HDD is supposed to be the backing device and the SSD-partition is supposed to be the cache device. The HDD will inter alia contain games. I'm currently using Linux Mint w/two parallel Gaming VMs (PCIe passthrough) but plan to move one of the VMs to a physical partition and also boot it natively to be able to compare performance. That's the main reason I want the HDD readable w/o bcache running – heio Feb 23 '17 at 12:53
  • Beyond that, it's simply curiosity. – heio Feb 23 '17 at 12:56

0 Answers0