On 3/31/20 7:09 PM, Andrei Borzenkov wrote:
31.03.2020 20:01, Eli V пишет:
Another option is to put the 12TB drives in an mdadm RAID, and then
use the mdadm raid & the ssd for btrfs RAID1 metadata, with SINGLE
data on the the array.
How do you restrict specific device for metadata only?
I never tried, but I don't think that it would be so complicated.
When BTRFS has to allocate a new chunk, it collects all the available
free spaces on the disks; it sorts all these free spaces on the basis of
criterion like the largest contiguous area and how the disk is full
and pick the top one.
It could be sufficient to add another criteria to the sorting algorithm,
something like that
- if the chunk is a metadata one, an SSD has an higher priority
- if the chunk is a data one, an SSD has a lower priority
So the metadata will have an higher likelihood to be on the SSD,
instead the data will have an higher likelihood to be a NON SSD disk.
Of course this is a soft constraint, when a kind of disk is full, it will
be possible to use the other kind, only with a lower priority.
Currently, this will make roughly half of the
meta data lookups run at SSD speed, but there is a pending patch to
allow all the metadata reads to go to the SSD. This option is, of
course, only useful for speeding up metadata operations. It can make
large btrfs filesystems feel much more responsive in interactive use
however.
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5