What does it mean?
What should I do to fix it?

[root@MYSRV /]# systemctl status systemd-cryptsetup@0.service
● systemd-cryptsetup@0.service - Cryptography Setup for 0
     Loaded: loaded (/etc/crypttab; bad; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2017-01-20 22:00:05 UTC; 4min 19s ago
     Docs: man:crypttab(5)
  Process: 3176 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach 0 2 * * (code=exited, status=1/FAILURE)
  Main PID: 3176 (code=exited, status=1/FAILURE)

Jan 20 22:00:05 MYSRV systemd[1]: Starting Cryptography Setup for 0...
Jan 20 22:00:05 MYSRV systemd[1]: systemd-cryptsetup@0.service: main process exited, code=exited, status=1/FAILURE
Jan 20 22:00:05 MYSRV systemd[1]: Failed to start Cryptography Setup for 0.
Jan 20 22:00:05 MYSRV systemd[1]: Unit systemd-cryptsetup@0.service entered failed state.
Jan 20 22:00:05 MYSRV systemd[1]: systemd-cryptsetup@0.service failed.
  • What is your /etc/crypttab. You have one right? systemd-cryptsetup is generated by systemd-cryptsetup-generator based on the contents of /etc/crypttab. – grochmal Jan 20 '17 at 22:35
  • It has only single line... most likely added by gitlab-omnibus package: "0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1" – Maxim Jan 20 '17 at 22:46
  • 1
    That looks to be an fstab line in reverse. A crypttab has similar syntax to /etc/fstab but does not have mount/fsck numbers (what appear to be at the beginning of your crypttab). A sesnsible crypttab should look something like the example at arch wiki – grochmal Jan 20 '17 at 22:54
  • Then I think it was by mistake added to crypttab instead of crontab. I simply need to move it in crontab. Thanks. – Maxim Jan 20 '17 at 23:13
  • You should add a self answer. First paste your old crypttab and the example from the wiki. And explain that systemd-crytpsetup do read the crypttab. It may prove useful to others. – grochmal Jan 21 '17 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.