Skip to main content
Topic: The system does not seem to shutdown properly (Read 197 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

The system does not seem to shutdown properly

Hello,

I recently installed Artix on my new computer and set it up with LVM on LUKS.
There are two SSD, one has got three partitions: /boot, /boot/efi and the third is the encrypted partition (lvmsys). The encrypted partition is a LVM physical volume and volume group (MyVolGroup1) on which there are a few logical volumes / partitions including the swap.
The other drive has got a unique encrypted partition (lvmdata), which is another LVM physical volume / volume group (MyVolGroup2), with two logical volumes.
All the partitions are formatted in ext4, excepted /boot/efi in fat32 and the swap in its own thing. I also have a tmpfs on a /tmp mountpoint in the fstab.
The volume with root is deciphered by entering my passphrase at boot time and the second volume is deciphered with a keyfile on the root volume.
My init is OpenRC; my display manager is LightDM and my desktop environment is XFCE.

It looks like the shutdown does not happen properly, as I often have one (or two?) lines at boot telling “recovering journal on ext4 partition”, however I am not completely sure which is or are the problematic partitions. I could not even find the “recovering” lines in the different logs in /var/log, but there are the “OK“ lines.
My lead would be that somehow LVM and dmcrypt try to unmount / deactivate in a wrong order. I may know how to tell the need for another service to be up before another with rc_after in /etc/conf.d/… but not how to shutdown one service after another.
The following line from yesterday shutdown and today boot may help comprehend the problem (the backslash during the shutdown has been manually added in this message so the quote does not get interpreted):

Code: [Select]
rc shutdown […]
dmcrypt          | * Removing dm-crypt mappings
dmcrypt          | *   lvmdata ...
dmcrypt          |Device lvmdata is still in use.
[…]
localmount       | * Unmounting loop devices
localmount       | * Unmounting filesystems
localmount       | *   Unmounting /run/user/974 ...
 [ ok ]
localmount       | *   Unmounting /tmp ...
 [ ok ]
localmount       | *   Unmounting /home/data ...
 [ ok ]
localmount       | *   Unmounting /home/backup ...
 [ ok ]
localmount       | *   Unmounting /opt ...
 [ ok ]
localmount       | *   Unmounting /home ...
 [ ok ]
localmount       | *   Unmounting /var ...
 [ ok ]
localmount       | *   Unmounting /boot/efi ...
 [ ok ]
localmount       | *   Unmounting /boot ...
 [ ok ]
lvm              | * Stopping the Logical Volume Manager ...
lvm              |  0 logical volume(s) in volume group "MyVolGroup2" now active
lvm              |  Logical volume MyVolGroup1/volroot contains a filesystem in use.
lvm              |  Can\'t deactivate volume group "MyVolGroup1" with 1 open logical volume(s)
 [ ok ]
lvm              | * Failed to stop Logical Volume Manager (possibly some LVs still needed for /usr or root)
 [ !! ]
[…]

rc boot […]
dmcrypt          | *   lvmdata using:   open /dev/nvme1n1p1 lvmdata ...
 [ ok ]
[…]
lvm              | * Starting the Logical Volume Manager ...
lvm              |  Found volume group "MyVolGroup2" using metadata type lvm2
lvm              |  Found volume group "MyVolGroup1" using metadata type lvm2
lvm              |  2 logical volume(s) in volume group "MyVolGroup2" now active
lvm              |  5 logical volume(s) in volume group "MyVolGroup1" now active
 [ ok ]
fsck             | * Checking local filesystems  ...
fsck             |/dev/nvme0n1p1: clean, 383/65536 files, 60620/262144 blocks
fsck             |fsck.fat 4.2 (2021-01-31)
fsck             |/dev/nvme0n1p2: 3 files, 38/261628 clusters
fsck             |/dev/mapper/MyVolGroup1-volvar: clean, 5532/1048576 files, 688571/4194304 blocks
fsck             |/dev/mapper/MyVolGroup1-volhome: clean, 127645/57597952 files, 13554004/230385664 blocks
fsck             |/dev/mapper/MyVolGroup1-volopt: clean, 12/524288 files, 59023/2097152 blocks
fsck             |/dev/mapper/MyVolGroup2-volbackup: clean, 12/4194304 files, 408187/16777216 blocks
fsck             |/dev/mapper/MyVolGroup2-voldata: clean, 781/58253312 files, 88613632/233007104 blocks
 [ ok ]
root             | * Remounting filesystems ...
 [ ok ]
[…]

Thanks in advance if you take some time to help me!