Re: [systemd-devel] luks - a particular device systemd treats differently?
On 02/06/2021 13:46, Lennart Poettering wrote: On Mi, 02.06.21 10:00, lejeczek (pelj...@yahoo.co.uk) wrote: Conditional check - systemctl is-failed ... - works for all devices but that one. I am sorry, but I don#t really follow. I understand though that once of the instances of systemd-cryptsetup@.service fails for you? Please provide the full logs off that unit. "journalctl -u ". Lennart -- Lennart Poettering, Berlin And the crypttab & fstab snippets are clear and explanatory? If yes then it's only that: luks devices I open manually, not at boot time, after an actual real human login with: systemctl is-failed "systemd-cryptsetup@luks\x2d_DEVICEservice" -q && { systemctl restart "systemd-cryptsetup@luks\x2d_DEVICEs.service" && fsck.ext4 /dev/mapper/luks-DEVICE && mount /DEVICE; } so I have, let say four devices in total and only one which for some reason does not reports as "failed" If I get "systemctl is-failed" correctly - "is-failed" returns true and then there rest of code above gets going, "restart" gets me prompt for passphrase and the rest... a) and that happens for all devices but that one. b) but I expect all devices.. since c) crypttab & fstab are identical for all four devices in terms of options/params. And if do below for that one device, after reboot and before manual intervention: -> $ systemctl is-failed "systemd-cryptsetup@luks\x2ddevs.service" inactive Sorry mate if you still won't get it, I cannot explain myself any better or different way. thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] luks - a particular device systemd treats differently?
On 01/06/2021 22:05, Lennart Poettering wrote: On Di, 01.06.21 16:55, lejeczek (pelj...@yahoo.co.uk) wrote: Hi guys. I have a crypttabl here: luks-devs /dev/mapper/dev1-devs /etc/.etc.enc.loop/crypttab.key discard,nofail,timeout=3s,noauto luks-home /dev/mapper/dev1-home /etc/.etc.enc.loop/crypttab.key discard,nofail,timeout=3s,noauto ... plus a few more lines with all options just as those two. I have a fstab here: /dev/mapper/luks-home /home ext4 noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 /dev/mapper/luks-devs /devs ext4 noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 ... when I check devices manually here: ... systemctl is-failed "systemd-cryptsetup@luks\x2ddevs.service" -q && { systemctl restart "systemd-cryptsetup@luks\x2ddevs.service" && fsck.ext4 /dev/mapper/luks-devs && mount /devs; } then I get asked for passphrase and the rest gets going (intentional, as those luks devs do not get opened at boot time) for all the devices except for "devs" As I understand systemd here does not see, mark that one device as "failed" and I have no idea why systemd would do that for that one device. Would somebody care to share so ideas? I am not sure I properly grok what you are trying to say, but: did you check the logs? Lennart -- Lennart Poettering, Berlin Yes I did, in logs is nothing in terms of errors or warning, well, I could not find anything. This I'll say if I try to rephrase my words earlier - I have an number of luks devices which _all_ are "ignored" at boot (as snippets from crypttab & fstab show) and are meant to be opened & mounted only manually: so I check to open & mount as above snippet shows and... for all devices but one, I get from 'systemd' to mount manually. Conditional check - systemctl is-failed ... - works for all devices but that one. Why?? no idea. Would there be something specific I should be looking in logs for? many thanks, L. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] luks - a particular device systemd treats differently?
On Mi, 02.06.21 10:00, lejeczek (pelj...@yahoo.co.uk) wrote: > Conditional check - systemctl is-failed ... - works for all devices but that > one. I am sorry, but I don#t really follow. I understand though that once of the instances of systemd-cryptsetup@.service fails for you? Please provide the full logs off that unit. "journalctl -u ". Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] luks - a particular device systemd treats differently?
On Di, 01.06.21 16:55, lejeczek (pelj...@yahoo.co.uk) wrote: > Hi guys. > > I have a crypttabl here: > > luks-devs /dev/mapper/dev1-devs /etc/.etc.enc.loop/crypttab.key > discard,nofail,timeout=3s,noauto > luks-home /dev/mapper/dev1-home /etc/.etc.enc.loop/crypttab.key > discard,nofail,timeout=3s,noauto > ... > plus a few more lines with all options just as those two. I have a fstab > here: > > /dev/mapper/luks-home /home ext4 > noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 > /dev/mapper/luks-devs /devs ext4 > noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 > ... > > when I check devices manually here: > ... > systemctl is-failed "systemd-cryptsetup@luks\x2ddevs.service" -q && { > systemctl restart "systemd-cryptsetup@luks\x2ddevs.service" && fsck.ext4 > /dev/mapper/luks-devs && mount /devs; } > > then I get asked for passphrase and the rest gets going (intentional, as > those luks devs do not get opened at boot time) for all the devices except > for "devs" > As I understand systemd here does not see, mark that one device as "failed" > and I have no idea why systemd would do that for that one device. > Would somebody care to share so ideas? I am not sure I properly grok what you are trying to say, but: did you check the logs? Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] luks - a particular device systemd treats differently?
Hi guys. I have a crypttabl here: luks-devs /dev/mapper/dev1-devs /etc/.etc.enc.loop/crypttab.key discard,nofail,timeout=3s,noauto luks-home /dev/mapper/dev1-home /etc/.etc.enc.loop/crypttab.key discard,nofail,timeout=3s,noauto ... plus a few more lines with all options just as those two. I have a fstab here: /dev/mapper/luks-home /home ext4 noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 /dev/mapper/luks-devs /devs ext4 noauto,nofail,noatime,nobarrier,noatime,x-systemd.device-timeout=3s 1 2 ... when I check devices manually here: ... systemctl is-failed "systemd-cryptsetup@luks\x2ddevs.service" -q && { systemctl restart "systemd-cryptsetup@luks\x2ddevs.service" && fsck.ext4 /dev/mapper/luks-devs && mount /devs; } then I get asked for passphrase and the rest gets going (intentional, as those luks devs do not get opened at boot time) for all the devices except for "devs" As I understand systemd here does not see, mark that one device as "failed" and I have no idea why systemd would do that for that one device. Would somebody care to share so ideas? many thanks, L ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel