On 2017-04-01 02:06, UGlee wrote:
We are working on a small NAS server for home user. The product is
equipped with a small fast SSD (around 60-120GB) and a large HDD (2T
to 4T).
We have two choices:
1. using bcache to accelerate io operation
2. combining SSD and HDD into a single btrfs volume.
Bcache is certainly designed for our purpose. But bcache requires
complex configuration and can only start from clean disk. Also in our
test in Ubuntu 16.04, data inconsistence was observed at least once,
resulting total HDD data lost.
So we wonder if simply putting SSD and HDD into a single btrfs volume,
in whatever mode, the general read operation (mostly readdir and
getxattr) will also be significantly faster than a single HDD without
SSD.
Have you tried dm-cache? The general idea is similar to bcache, but
it's been much more reliable in my experience, and it's possible to add
it to an existing device without any need for reprovisioning (although
the existing device can't have any pending writes, otherwise you might
get some data corruption).
Additionally, given what you've said, write-through mode should cover
what you need in terms of performance, and may be more reliable on
bcache than writeback mode.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html