Il giorno mar 5 gen 2021 alle ore 07:44 <cedric.dew...@eclipso.eu> ha scritto: > > Is there a way to tell btrfs to leave the slow hdd alone, and to prioritize > the SSD?
You can use mdadm to do this (I'm using this feature since years in setup where I have to fallback on USB disks for any reason). >From manpage: -W, --write-mostly subsequent devices listed in a --build, --create, or --add command will be flagged as 'write-mostly'. This is valid for RAID1 only and means that the 'md' driver will avoid reading from these devices if at all possible. This can be useful if mirroring over a slow link. --write-behind= Specify that write-behind mode should be enabled (valid for RAID1 only). If an argument is specified, it will set the maximum number of outstanding writes allowed. The default value is 256. A write-intent bitmap is required in order to use write-behind mode, and write-behind is only attempted on drives marked as write-mostly. So you can do this: (be carefull, this wipe your data) mdadm --create --verbose --assume-clean /dev/md0 --level=1 --raid-devices=2 /dev/sda1 --write-mostly /dev/sdb1 Then you use BTRFS on top of /dev/md0, after mkfs.btrfs, of course. Ciao, Gelma