LXC - Lange Start- / Bootzeit bei Verwendung von NFS Mount im Container

AnK

Member
Dec 28, 2021
13
1
8
40
Hallo,

ich habe einen privilegierten LXC Container mit Ubuntu 22.04 und verwende NFS Shares (also NFS Client) im Container.

Dazu habe ich die Shares in /etc/fstab eingetragen, damit sie beim Booten automatisch gemountet werden.

Allerdings nimmt dadurch die Bootzeit um mehrere Minuten zu.

Code:
# systemd-analyze blame
2min 223ms systemd-networkd-wait-online.service
    6.603s vdr.service
     884ms docker.service
     243ms networkd-dispatcher.service
     186ms vdr-addon-lifeguard-ng.service
     184ms systemd-resolved.service
     157ms nfs-server.service
     140ms containerd.service
     105ms systemd-logind.service

Code:
# systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @2min 7.116s
└─multi-user.target @2min 7.116s
  └─vdr.service @2min 512ms +6.603s
    └─network-online.target @2min 481ms
      └─network.target @450ms
        └─systemd-resolved.service @266ms +184ms
          └─systemd-tmpfiles-setup.service @251ms +11ms
            └─systemd-journal-flush.service @179ms +70ms
              └─systemd-journald.service @150ms +28ms
                └─systemd-journald.socket @145ms
                  └─system.slice @114ms
                    └─-.slice @114ms

Jemand eine Idee, was hier das Problem sein könnte?
Ich vermute mal systemd hängt bzw. wartet auf irgendwas.
 
Gleiches Problem haben wir hier: [1] auch.

Eine Lösung scheint zu sein, den LXC direkt bei der Erstellung nicht zu verändern (CPU und RAM); sondern erst im Nachhinein. [2] [3]

Bringt bei bereits bestehenden LXCs natürlich leider nichts. :confused: Von daher wäre ich weiteren Lösungsvorschlägen auch nicht abgeneigt.

[1] https://forum.proxmox.com/threads/lxc-debian-kein-login.111462/#post-480671
[2] https://forum.proxmox.com/threads/lxc-debian-kein-login.111462/#post-480908
[3] https://forum.proxmox.com/threads/lxc-debian-kein-login.111462/#post-481316
 
Hi,

also ich hab jetzt bei mir einfach die IPv6 Konfiguration von DHCP auf SLAAC geändert, damit gehts jetzt schon besser.

Code:
# systemd-analyze blame
6.378s vdr.service
4.333s systemd-networkd-wait-online.service
 945ms docker.service
 272ms networkd-dispatcher.service
 214ms mnt-media.mount
 213ms vdr-addon-lifeguard-ng.service
 196ms srv-vdr-video.mount
 176ms nfs-server.service
 171ms containerd.service
 112ms systemd-logind.service
 112ms systemd-networkd.service
Code:
# systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @11.119s
└─multi-user.target @11.119s
  └─vdr.service @4.740s +6.378s
    └─network-online.target @4.704s
      └─systemd-networkd-wait-online.service @370ms +4.333s
        └─systemd-networkd.service @236ms +112ms
          └─network-pre.target @235ms
            └─ufw.service @231ms +3ms
              └─local-fs.target @228ms
                └─var-lib-docker.mount @5.933s
                  └─local-fs-pre.target @225ms
                    └─keyboard-setup.service @170ms +55ms
                      └─systemd-journald.socket @164ms
                        └─-.mount @135ms
                          └─-.slice @135ms
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!