0

Used Proxmox 7.3 on a Hetzner baremetal server. Configured ZFS Encryption using following steps:

zpool import -f rpool
zfs snapshot -r rpool/ROOT@copy
zfs send -R rpool/ROOT@copy | zfs receive rpool/copyroot
zfs destroy -r rpool/ROOT

# Create a new zfs root, with encryption turned on
# OR -o encryption=aes-256-gcm - aes-256-ccm vs aes-256-gcm
zfs create -o encryption=on -o keyformat=passphrase rpool/ROOT

# Copy the files from the copy to the new encrypted zfs root
zfs send -R rpool/copyroot/pve-1@copy | zfs receive -o encryption=on rpool/ROOT/pve-1

zfs set mountpoint=/ rpool/ROOT/pve-1
zpool export rpool

All setup works fine and login to Proxmox is fast, until I run above script to encrypt the ZFS root partition.

After having typed zfs_unlock, the login takes +25 seconds to complete due to systemd-logind service which fails to start. Any ideas why this is or how to fix it?

# systemctl status systemd-logind.service
● systemd-logind.service - User Login Management
     Loaded: loaded (/lib/systemd/system/systemd-logind.service; static)
     Active: failed (Result: exit-code) since Mon 2023-02-27 21:12:52 CET; 1min 43s ago
       Docs: man:sd-login(3)
             man:systemd-logind.service(8)
             man:logind.conf(5)
             man:org.freedesktop.login1(5)
    Process: 1578 ExecStart=/lib/systemd/systemd-logind (code=exited, status=1/FAILURE)
   Main PID: 1578 (code=exited, status=1/FAILURE)
        CPU: 26ms

Feb 27 21:12:52 vmbox systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 5.
Feb 27 21:12:52 vmbox systemd[1]: Stopped User Login Management.
Feb 27 21:12:52 vmbox systemd[1]: systemd-logind.service: Start request repeated too quickly.
Feb 27 21:12:52 vmbox systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Feb 27 21:12:52 vmbox systemd[1]: Failed to start User Login Management.

# journalctl _PID=1578
-- Journal begins at Mon 2023-02-27 17:56:12 CET, ends at Mon 2023-02-27 21:15:36 CET. --
Feb 27 21:12:52 vmbox systemd-logind[1578]: Failed to connect to system bus: No such file or directory
Feb 27 21:12:52 vmbox systemd-logind[1578]: Failed to fully start up daemon: No such file or directory

systemctl status dbus

● dbus.service - D-Bus System Message Bus
     Loaded: loaded (/lib/systemd/system/dbus.service; static)
     Active: active (running) since Mon 2023-02-27 21:12:35 CET; 8h ago
TriggeredBy: ● dbus.socket
       Docs: man:dbus-daemon(1)
   Main PID: 981 (dbus-daemon)
      Tasks: 1 (limit: 76835)
     Memory: 1.2M
        CPU: 11ms
     CGroup: /system.slice/dbus.service
             └─981 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Feb 27 21:12:52 vmbox dbus-daemon[981]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requested by ':1.1' (uid=0 pid=1514 comm="sshd: root [priv]    " label="unconfined")
Feb 27 21:13:17 vmbox dbus-daemon[981]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)

Also when using dropbear-initramfs, there's a crypt error, not sure if there's any impact:

# apt install dropbear-initramfs
# update-initramfs -u

cryptsetup: ERROR: Couldn't resolve device rpool/ROOT/pve-1
cryptsetup: WARNING: Couldn't determine root device
Dan L.
  • 101
  • Welcome to Server Fault. Please [take the tour](https://serverfault.com/tour) to learn how Server Fault works. Read [how to ask](https://serverfault.com/questions/how-to-ask) to improve the quality of your question. Then take a look to [the help center](https://serverfault.com/help/on-topic) to see if some _on-topic questions_ are already asked. – freezed Mar 07 '23 at 22:05

0 Answers0