I'm trying to mount two btrfs subvolumes from a same (luks-encrypted) device via the entries in fstab. The crypttab entry must be correct, since the system asks for the password on boot. But then it hangs with a black screen. The entries are:
(this example is correct, the only problem was the wrong UUID, which was of the encrypted partition, not the decrypted mapped device. I'll leave the question in case anyone searches for a specific working example of btrfs and fstab).
UUID={same uuid for device under /dev/mapper} /home/me btrfs defaults,ssd,subvol=home-me-dir,noatime 0 3
UUID={same uuid for device under /dev/mapper} /tmp btrfs defaults,ssd,subvol=tmp-dir,noatime,nodatacow,nodatasum 0 4
I tried both subvol=path and subvolid=id options. I ran sudo systemctl daemon-reload as was mentioned in the fstab file.
I'm not sure whether my problem is with it or with systemd (I suspect the issue is with fstab and btrfs since IIRC I did this with ext4 and everything worked OK). So could anyone answer this, please:
- How to specify a path for the subvolume in the options, i.e. the
subvol=pathoption? There were no examples in theman 5 btrfs, only the statement, that the path is always relative to the root subvolume, so I triedsubvol=some-dirandsubvol=/some-dirto no avail; - Does the root subvolume have to be mounted to use the
subvol=pathorsubvolid=idoptions for its children subvolumes infstab? When I usesubvol=some-dirthe decrypted device is not even mounted yet.
Thank you.