NETGEAR uses BTRFS in their ReadyNAS OS, and implements Tiered Storage in their latest versions. They started with "Metadata" tier only in ReadyNAS v6.9, and then added "Data Tier" in v6.10. The system uses SSDs as Tier-0 to speed up access to the slower HDDs in the system. The description of the system states that metadata will reside on the SSDs in both cases, and that in the "Data Tier" case also newly written data will go to the SSDs first, and then later will get migrated to HDD periodically, or when the SSD tier fills up to a specified level.
ReadyNAS uses BTRFS on top of RAID-ed HDDs in its normal installs – e.g. my system has a RAID5 made of 4 disks, which BTRFS sees/uses as a single device.
Looking at how the Tiering is implemented, it looks like both "Metadata" and "Data Tier" setups are done by adding a second RAID array, made only of the SSDs, to the main HDD RAID array, and transforming the initial single-device BTRFS into a multiple-device one.
What I cannot figure out is how the migration is done, and also how the "Metadata" case manages to separate metadata from data, so that only metadata goes to SSD? Also, how does the "Data Tier" mode direct the writes entirely to the SSD tier?
Any ideas?
Best Answer
OK, here's what I found happening during the periodic balances:
The following process is started on the host:
where /data is my tiered data-volume, /dev/md127 is the SSD array used as buffer/cache.
This process runs until the data from the SSD tier is moved almost completely to the HDD tier - e.g. somewhere along the way I see:
and then it goes down until the usage of the SSD tier goes almost to zero. The strange thing is that so far i was not able to run this command manually.
I still cannot figure out the 'sweep' balance filter.
This is what the -help shows:
but this does not explain how it maps to the "
lt:/dev/md127:7
" part of the command that runs periodically:What's the meaning here: Run until the /dev/md127 data usage falls below 7% ?!?