You are not logged in.
I recently switched to systemd and have some issues with a multi-device (raid1) btrfs volume.
My fstab contains this line for the volume:
/dev/mapper/archive1 /mnt/archive btrfs device=/dev/mapper/archive1,device=/dev/mapper/archive2,device=/dev/mapper/archive3,device=/dev/mapper/archive4,defaults,noatime,nodiratime 0 0
As you can see, the volume consits of four LUKS mapper devices, which must all be present for the volume to be mounted.
The problem now is that systemd doesn't recognize the dependency for my volume to all four crypto mappers. It tries to mount the volume as soon as /dev/mapper/archive1 is in place, which fails very often.
So how do I manually set the dependency? I tried adding cryptsetup.target to /etc/systemd/system/local-fs.target.wants without success.
Thanks
lynix
Offline
With the most recent btrfs-utils package, this should in theory "just work". However, I believe there is a kmod bug that means that we are not correctly auto-assembling btrfs devices.
Offline
With the most recent btrfs-utils package, this should in theory "just work".
I don't see a package named "btrfs-utils", did you mean "btrfs-progs"? I'm using version 0.19.20120328-4 of that package.
I'm thinking about writing a .mount file for the volume in question, or simply fix it quick'n'dirty by adding a manual mount in rc.local...
Offline
I meant btrfs-progs yes, but I see now that the bug I have in mind is probably a different one. It would be worthwhile to try making a custom .mount unit and see if that fixes your issue. If it does, we should probably improve the upstream fstab parsing code to deal with this case.
Offline
I found the time to write the custom .mount file and it seems to fix the issue, indeed
[Unit]
Description=/mnt/archive
Wants=cryptsetup.target
After=cryptsetup.target
[Mount]
What=/dev/mapper/archive1
Where=/mnt/archive
Type=btrfs
Options=defaults,noatime,nodiratime
The mount point in question is still listed in my /etc/fstab, the .mount file takes precedence like stated in `man systemd.mount`.
Offline