You are not logged in.

#1 2015-11-20 15:06:31

mearon
Member
Registered: 2015-11-20
Posts: 7

Shutdown error message (/dev/mapper/home_crypt)

Hi everybody smile


First time posting here, hope I'm doing it alright.
After updating Arch again this week (last update was 6 months ago), I have the following issue.
On shutdown, I get an error message, which I like to understand and solve:

Nov 18 22:23:13 bluesky systemd[1]: Stopped (with error) /dev/mapper/home_crypt.

Here's a snippet of "journalctl -r" of a shutdown showing this message:
It's printed in red btw.

-- Reboot --
Nov 18 22:23:15 bluesky systemd-journald[282]: Journal stopped
Nov 18 22:23:15 bluesky systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Nov 18 22:23:14 bluesky kernel: watchdog watchdog0: watchdog did not stop!
Nov 18 22:23:14 bluesky systemd[1]: Set hardware watchdog to 10min.
Nov 18 22:23:14 bluesky systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
Nov 18 22:23:14 bluesky systemd[1]: Shutting down.
Nov 18 22:23:14 bluesky systemd[1]: Starting Reboot...
Nov 18 22:23:14 bluesky systemd[1]: Reached target Final Step.
Nov 18 22:23:14 bluesky systemd[1]: Reached target Shutdown.
Nov 18 22:23:14 bluesky systemd[1]: Removed slice system-systemd\x2dcryptsetup.slice.
Nov 18 22:23:14 bluesky systemd[1]: Reached target Unmount All Filesystems.
Nov 18 22:23:14 bluesky systemd[1]: Stopped Cryptography Setup for home_crypt.
Nov 18 22:23:14 bluesky systemd[1]: Stopped /sys/devices/virtual/block/dm-1.
Nov 18 22:23:14 bluesky systemd[1]: Stopped /dev/dm-1.
Nov 18 22:23:14 bluesky systemd[1]: Stopped /dev/disk/by-id/dm-name-home_crypt.
Nov 18 22:23:14 bluesky systemd[1]: Stopped /dev/disk/by-id/dm-uuid-CRYPT-LUKS1-ff9eeda3e7444ff08c3f1d94a5f5421c-home_crypt.
Nov 18 22:23:14 bluesky systemd[1]: Stopped /dev/disk/by-uuid/9d8ebe66-f799-4770-b387-d75b09e3aac2.
Nov 18 22:23:14 bluesky systemd[1]: Stopped Remount Root and Kernel File Systems.
Nov 18 22:23:14 bluesky systemd[1]: Stopped Create Static Device Nodes in /dev.
Nov 18 22:23:14 bluesky systemd[1]: Stopped target Local File Systems (Pre).
Nov 18 22:23:14 bluesky systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Nov 18 22:23:14 bluesky systemd[1]: Stopped File System Check on /dev/disk/by-uuid/9d8ebe66-f799-4770-b387-d75b09e3aac2.
Nov 18 22:23:14 bluesky systemd[1]: Unmounted /home.
Nov 18 22:23:14 bluesky systemd[1]: Stopped File System Check on /dev/disk/by-uuid/a6ae0b5d-5456-4da6-a555-cdc9e7c23f5b.
Nov 18 22:23:14 bluesky systemd[1]: Unmounted /boot.
Nov 18 22:23:13 bluesky systemd[1]: Unmounted Temporary Directory.
Nov 18 22:23:13 bluesky systemd[1]: Unmounted /run/user/1000.
Nov 18 22:23:13 bluesky systemd[1]: Stopped (with error) /dev/mapper/home_crypt.
Nov 18 22:23:13 bluesky systemd[1]: Deactivated swap /swapfile.
Nov 18 22:23:13 bluesky systemd[1]: Removed slice system-systemd\x2dbacklight.slice.
Nov 18 22:23:13 bluesky systemd[1]: Unmounting /home...
Nov 18 22:23:13 bluesky systemd[1]: Unmounting Temporary Directory...
Nov 18 22:23:13 bluesky systemd[1]: Unmounting /run/user/1000...
Nov 18 22:23:13 bluesky systemd[1]: Unmounting /boot...
Nov 18 22:23:13 bluesky systemd[1]: Stopped target Local File Systems.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Create Volatile Files and Directories.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Update UTMP about System Boot/Shutdown.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Load/Save Random Seed.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:intel_backlight.
Nov 18 22:23:13 bluesky systemd[1]: Removed slice User and Session Slice.
Nov 18 22:23:13 bluesky systemd[1]: Stopped target Slices.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Load Kernel Modules.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Apply Kernel Variables.
Nov 18 22:23:13 bluesky systemd[1]: Stopping Load/Save Random Seed...
Nov 18 22:23:13 bluesky systemd[1]: Stopping Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Nov 18 22:23:13 bluesky systemd[1]: Stopping Cryptography Setup for home_crypt...
Nov 18 22:23:13 bluesky systemd[1]: Stopped target Encrypted Volumes.
Nov 18 22:23:13 bluesky systemd[1]: Stopped Setup Virtual Console.
Nov 18 22:23:13 bluesky systemd[1]: Stopping Update UTMP about System Boot/Shutdown...
Nov 18 22:23:13 bluesky systemd[1]: Stopping Load/Save Screen Backlight Brightness of backlight:intel_backlight...
Nov 18 22:23:13 bluesky systemd[1]: Deactivating swap /swapfile...
Nov 18 22:23:13 bluesky systemd[1]: Stopped target Swap.
Nov 18 22:23:13 bluesky systemd[1]: Stopped target System Initialization.

Here's my /etc/fstab:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/mapper/root_crypt
UUID=cdfc6a39-7806-4972-b7db-30d5768367cf	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda2
UUID=a6ae0b5d-5456-4da6-a555-cdc9e7c23f5b	/boot     	ext4      	rw,relatime,data=ordered	0 2

# /dev/mapper/home_crypt
UUID=9d8ebe66-f799-4770-b387-d75b09e3aac2	/home     	ext4      	rw,relatime,data=ordered	0 2

/swapfile       	none      	swap      	defaults  	0 0

/etc/crypttab:

# crypttab: mappings for encrypted partitions
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# The Arch specific syntax has been deprecated, see crypttab(5) for the
# new supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf).

# <name>       <device>                                     <password>              <options>
# home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
# data1        /dev/sda3                                    /etc/mypassword2
# data2        /dev/sda5                                    /etc/cryptfs.key
# swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=256
# vol          /dev/sdb7                                    none
home_crypt	UUID=ff9eeda3-e744-4ff0-8c3f-1d94a5f5421c	/crypthome_keyfile	luks

blkid gives:

/dev/sda2: UUID="a6ae0b5d-5456-4da6-a555-cdc9e7c23f5b" TYPE="ext4" PARTUUID="5689f305-7065-45c2-9bb5-b3e1b6ff1ef4"
/dev/sda3: UUID="8557f614-9fca-42d5-8bf6-6488e473fa8c" TYPE="crypto_LUKS" PARTUUID="48388af4-c120-4c18-bc04-9ab045e2798c"
/dev/sda5: UUID="ff9eeda3-e744-4ff0-8c3f-1d94a5f5421c" TYPE="crypto_LUKS" PARTUUID="f588125b-2a7f-463b-a2d6-eacbfa80fa0a"
/dev/mapper/root_crypt: UUID="cdfc6a39-7806-4972-b7db-30d5768367cf" TYPE="ext4"
/dev/mapper/home_crypt: UUID="9d8ebe66-f799-4770-b387-d75b09e3aac2" TYPE="ext4"
/dev/sda1: PARTUUID="582f017b-0d03-40ca-b82b-1eead024eaa1"
/dev/sda4: PARTUUID="0e7de2fc-24f5-44dc-9cbe-95d71c58a278"

And lsblk for a quick overview:

NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda              8:0    0 596.2G  0 disk  
├─sda1           8:1    0  1007K  0 part  
├─sda2           8:2    0   199M  0 part  /boot
├─sda3           8:3    0  79.8G  0 part  
│ └─root_crypt 254:0    0  79.8G  0 crypt /
├─sda4           8:4    0     6G  0 part  
└─sda5           8:5    0 510.2G  0 part  
  └─home_crypt 254:1    0 510.2G  0 crypt /home
sr0             11:0    1  1024M  0 rom   

I would be very glad if someone could give me a hint, how I can further investigate in that?

I of course found this: https://bbs.archlinux.org/viewtopic.php?id=194287
But the difference is, that my location /dev/mapper/home_crypt is valid, as you can see in my crypttab.
Also his problem got solved by simply updating.

This may be related:
During the 6 months with no update, I changed my BIOS battery, which has renamed my wireless interface from "wlp3so" to "wls3". Maybe the (implied) BIOS reset has something to do with the error message?

Here's some more information:

I have Arch installed for 2 years now, on a Thinkpad T61.
I had never problems with my encrypted setup.
Sometimes, the laptop is running for many weeks without reboot.
My HOOKS are:

HOOKS="base udev autodetect modconf block keyboard keymap encrypt resume filesystems fsck"

Maybe someone can just tell me what I can search for?

I will appreciate any help.



Thank you! smile

Regards, mearon

Last edited by mearon (2015-11-20 18:55:10)

Offline

#2 2015-11-21 20:53:23

mearon
Member
Registered: 2015-11-20
Posts: 7

Re: Shutdown error message (/dev/mapper/home_crypt)

Hi,


at #archlinux someone had the same warning message on shuthdown and told me how to fix it:
In /etc/fstab he had to switch the home mountpiont specification from UUID to /dev/mapper/... i.e. changed this

UUID=9d8ebe66-f799-4770-b387-d75b09e3aac2	/home     	ext4      	rw,relatime,data=ordered	0 2

to this

/dev/mapper/home_crypt				/home     	ext4      	rw,relatime,data=ordered	0 2

.

I've tried it and it seems to work for me. That means, on shutdown the message

Nov 18 22:23:13 bluesky systemd[1]: Stopped (with error) /dev/mapper/home_crypt.

changes to

Nov 18 22:23:13 bluesky systemd[1]: Stopped /dev/mapper/home_crypt.

- also in the journalctl of course.


Now I'd really like to understand why my system behaves like that. I'm confused by the fact, that there are no error messages during boot, but only at shutdown...
At #archlinux I was told that there's something going on with the cryptsetup-generator and dependency handling in systemd, causing my problem.
I went to /run/systemd/generator/, where the service and mount files are produced by the systemd generators.
It appears, that the only file that changes when booting with my two different fstabs (UUID vs. /dev/mapper/...) is /run/systemd/generator/home.mount:


home.mount (fstab with UUID)

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
RequiresOverridable=systemd-fsck@dev-disk-by\x2duuid-9d8ebe66\x2df799\x2d4770\x2db387\x2dd75b09e3aac2.service
After=systemd-fsck@dev-disk-by\x2duuid-9d8ebe66\x2df799\x2d4770\x2db387\x2dd75b09e3aac2.service

[Mount]
What=/dev/disk/by-uuid/9d8ebe66-f799-4770-b387-d75b09e3aac2
Where=/home
Type=ext4
Options=rw,relatime,data=ordered

home.mount (fstab with /dev/mapper/...)

# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
RequiresOverridable=systemd-fsck@dev-mapper-home_crypt.service
After=systemd-fsck@dev-mapper-home_crypt.service

[Mount]
What=/dev/mapper/home_crypt
Where=/home
Type=ext4
Options=rw,relatime,data=ordered

The changes are obviously and with good reason I think, and I don't understand how they produce the error message during shutdown.
How can I find out what's actually wrong at the shutdown, i.e. what is systemd(?) actually complaining about when using UUID in my fstab?

I really appreciate any help on that!
Systemd seems still very complex and confusing to me...
I'm going to look now for the changes in the cryptsetup-generator / fstab-generator.

Note: Since I want to "understand and solve" this error message, I'm not going to mark this thread as [solved].


Best regards,

mearon

Offline

#3 2016-09-01 18:18:11

KenMacD
Member
Registered: 2014-01-06
Posts: 19

Re: Shutdown error message (/dev/mapper/home_crypt)

Github issue, for others that find this:

https://github.com/systemd/systemd/issues/1620

with a duplicate that has the UUID->path workaround: https://github.com/systemd/systemd/issues/2351

Offline

Board footer

Powered by FluxBB