[systemd-devel] Failed to mount a crypted device with 'tmp' option
Francis Moreau
francis.moro at gmail.com
Fri Jun 26 06:39:46 PDT 2015
Hi,
I'm setting up an encrypted device at boot using cryptsetup. This device
is formatted at each boot (I'm using 'tmp' option in /etc/crypttab).
Also this device is mounted at boot time (a corresponding entry in
/etc/fstab has been made) and is also fsck'ed (fs_passno=2).
However it seems that the mount happens at the same time cryptsetup lib
is formatting the disk which causes trouble.
Here is part of the boot log:
---------
...
systemd-cryptsetup[230]: Set cipher aes, mode cbc-essiv:sha256, key size
256 bits for device
kernel: sha256_ssse3: Using SSSE3 optimized SHA-256 implementation
modprobe[309]: FATAL: Error inserting padlock_sha
(/lib/modules/3.11.10-29-default/kernel/dr
kernel: bio: create slab <bio-1> at 1
systemd[1]: Found device /dev/mapper/cr_tmp.
systemd[1]: Starting File System Check on /dev/mapper/cr_tmp...
mke2fs[318]: mke2fs 1.42.8 (20-Jun-2013)
mke2fs[318]: Filesystem label=
mke2fs[318]: OS type: Linux
mke2fs[318]: Block size=1024 (log=0)
mke2fs[318]: Fragment size=1024 (log=0)
mke2fs[318]: Stride=0 blocks, Stripe width=0 blocks
mke2fs[318]: 25688 inodes, 102400 blocks
mke2fs[318]: 5120 blocks (5.00%) reserved for the super user
mke2fs[318]: First data block=1
mke2fs[318]: Maximum filesystem blocks=67371008
mke2fs[318]: 13 block groups
mke2fs[318]: 8192 blocks per group, 8192 fragments per group
mke2fs[318]: 1976 inodes per group
mke2fs[318]: Superblock backups stored on blocks:
mke2fs[318]: 8193, 24577, 40961, 57345, 73729
mke2fs[318]: [49B blob data]
mke2fs[318]: [46B blob data]
systemd-fsck[320]: /dev/mapper/cr_tmp is in use.
systemd-fsck[320]: e2fsck: Cannot continue, aborting.
systemd-fsck[320]: fsck failed with error code 8.
systemd-fsck[320]: Ignoring error.
systemd[1]: Started File System Check on /dev/mapper/cr_tmp.
systemd[1]: Mounting /mnt/cr_tmp...
mount[324]: mount: /dev/mapper/cr_tmp is already mounted or /mnt/cr_tmp busy
systemd[1]: mnt-cr_tmp.mount mount process exited, code=exited status=32
systemd[1]: Failed to mount /mnt/cr_tmp.
systemd[1]: Dependency failed for Local File Systems.
systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
systemd[1]: Unit mnt-cr_tmp.mount entered failed state.
....
-----------------
So my question, is this a known bug or am I doing something wrong ?
Thanks.
More information about the systemd-devel
mailing list