Sample Header Ad - 728x90

Is it possible to assign/limit a BTRFS subvolume to a particular device, and if so how?

5 votes
0 answers
275 views
My root (BTRFS) filesystem is on a small SSD, and /var is on a larger, slower, separately formatted (also with BTRFS) HDD. This works well, but I can't use CoW when copying files between the two devices and snapshotting my system requires creating two snapshots every time. I know that BTRFS can use multiple devices, but I wonder whether I can limit the root subvolume to only use the SSD, and the /var subvolume to only use the HDD (like LVM). I know that existing blocks won't be moved between devices without running btrfs balance, but new blocks could be placed on either device by default. I know that block-level caches can combine the benefits of SSDs and HHDs within the same filesystem, but I'd like seldom-used system files to remain on the SSD. I'm also hoping that this can be done online and without copying my data elsewhere first, but that is a secondary concern.
Asked by ATLief (328 rep)
Feb 11, 2021, 05:28 PM
Last activity: Feb 11, 2021, 06:55 PM