Quick question: is there a filesystem that let me

  1. automatically "resize" (up or down) partitions,
  2. share one partition between several devices, and
  3. make sure that some content only go to one device and not the other?

Context: I have two drives: a big HDD (1 TB) that I trust, and a very small SSD (24 GB) that I do not trust (i.e. it could be destroyed at any time, but this should not corrupt the data on the HDD). To simplify, let's say I have two folders only:

  • /nix will contain the system: I don't mind if I lose this partition, so I'd like to have it as much as possible on the SSD to launch new apps quickly. But '/nix' could contain more that 24 GB of data, so it needs to be partly on the HDD as well.

  • /home will contain the data: it contains valuable data that I do not want to put on the SSD to make sure I don't lose them in case of a corruption of the SSD.

For now, I created 3 LVM partitions (physical volumes): two partitions on the HDD (hdda, hddb), and one the SDD (sdda), and I created two LWM group volumes, one that contains hdda + sdda (for the ext4 partition /nix), and one that contains hddb (for the ext4 partition/home). But the problem is that the total size of /nix + /home is always close to the maximum available size, so when I need more memory on /home, I need to shrink down /nix. And shrinking a partition is not super practical, as it requires to boot from a live CD, and takes time...

I saw that the very poverful ZFS (that even allows compression!) can automatically "resize" the partition for me, but unfortunately I can't find how to say "keep the /home partition in HDD, and keep the /nix partition in SDD if possible".

Is there any better filesystem that allows that (compression would be nice as well), or a way to use ZFS in that manner?


1 Answer 1


just make one big LV with the 2 spinning disks, and add the SSD as a lvmcache.


Other options;

Btrfs, SeaweedFS



  • Thanks for your answer. I was considering at some points zfs's l2arc method that are similar, but the cache was lost at every reboot, which makes it pointless for quick boot. Does lvmcache also lose cache at startup? The second problem of this approach is that I lose 25Gb of space due to the duplication on the HDD and SDD.
    – tobiasBora
    Jun 12, 2019 at 0:46
  • @tobiasBora in the time of 16,000GB drives 25Gb is negligible, plus the ease of adding more drives to the cached volume while it is in use makes upgrading a no worries JIT operation. I assume the data in the cache is persistant on reboot (otherwise it would not need a metadata section) but have not explicitly tested. Jun 12, 2019 at 2:47
  • this approximation does not hold in my case as my HDD is nearly full (hence the title), but if I don't have better option, I might consider this option. Thanks!
    – tobiasBora
    Jun 12, 2019 at 10:10
  • Just, to ensure you don't have any trouble to downsize partitions/subvolumes/... in the HDD, you would combine lvmcache with btrfs/zfs?
    – tobiasBora
    Jun 12, 2019 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .