Move volume activation to vm_start
currently all volumes for a container are activated in the pre-start hook,
which runs in a separate mount namespace (lxc.monitor.unshare is set to 1
in our container config). This leads to problems with ZFS:
* if a pool is imported by this call the filesystems are mounted only inside
the containers mount namespace
by running the volume activation inside vm_start, right before starting the
container via systemctl the volume activation happens before the unshare.
The other site where a container is started via systemctl is in
'pve-container-stop-wrapper' when a container is rebooted from the inside:
By activating the volumes in 'lxc-pve-poststop-hook' we avoid to try starting
a container with an inactive volume (LVM, kRBD), occuring when having a
mp-addtion pending during such a reboot
Starting a container manually using lxc-start is usually done for obtaining
debug-logs (after starting failed with our tooling) - so the potential for
regression in that case should also be small.
The $loopdevlist variable is not used anywhere in our codebase since 2015
(
da6298481ea4dfe7d894f42fa105cda015ebe5ce).
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>