No execution of /etc/vz/conf/vps.premount

rumix

Renowned Member
Jan 5, 2015
2
0
66
Hi,

is there currently a bug preventing /etc/vz/vps.premount and ${CTID}.premount from being executed?

It seems vzctl start isn't even looking for them.

Code:
[B]root@node2:~# pveversion [/B]
pve-manager/3.3-5/bfebec03 (running kernel: 2.6.32-34-pve)


[B]root@node2:~# vzctl --version[/B]
vzctl version 4.0-4.git.162dded

[B]root@node2:~# strace -o strace.out vzctl start 103[/B]
Starting container ...
stat(/mnt/r1/private/103): No such file or directory
stat(/mnt/r1/private/103): No such file or directory
Can't umount /var/lib/vz/root/103: Invalid argument
stat(/mnt/r1/private/103): No such file or directory
Adding IP address(es): 10.10.10.103
Setting CPU units: 1000
Setting CPUs: 2
Error: Unable to apply new quota values: quota not running
Container start failed (try to check kernel messages, e.g. "dmesg | tail")
Killing container ...
Container was stopped
Error: Unable to apply new quota values: quota not running
stat(/mnt/r1/private/103): No such file or directory
stat(/mnt/r1/private/103): No such file or directory
Can't umount /var/lib/vz/root/103: Invalid argument

[B]root@node2:~# grep mount strace.out [/B]
stat("/etc/pve/openvz/103.umount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/vzctl/scripts/proxmox.umount", {st_mode=S_IFREG|0755, st_size=527, ...}) = 0
stat("/usr/lib/vzctl/scripts/proxmox.umount", {st_mode=S_IFREG|0755, st_size=527, ...}) = 0
open("/proc/mounts", O_RDONLY)          = 5
umount("/var/lib/vz/root/103", 0)       = -1 EINVAL (Invalid argument)
write(2, "Can't umount /var/lib/vz/root/10"..., 33) = 33
stat("/etc/pve/openvz/103.postumount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)
stat("/etc/pve/openvz/vps.postumount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)
stat("/etc/pve/openvz/103.umount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/vzctl/scripts/proxmox.umount", {st_mode=S_IFREG|0755, st_size=527, ...}) = 0
stat("/usr/lib/vzctl/scripts/proxmox.umount", {st_mode=S_IFREG|0755, st_size=527, ...}) = 0
open("/proc/mounts", O_RDONLY)          = 10
umount("/var/lib/vz/root/103", 0)       = -1 EINVAL (Invalid argument)
write(2, "Can't umount /var/lib/vz/root/10"..., 33) = 33
stat("/etc/pve/openvz/103.postumount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)
stat("/etc/pve/openvz/vps.postumount", 0x7fff54c2aac0) = -1 ENOENT (No such file or directory)

Many thanks in advance!
 
Hello rumix,

is there currently a bug preventing /etc/vz/vps.premount and ${CTID}.premount from being executed?

No, works fine - your problem seems to be a different one

It seems vzctl start isn't even looking for them.

Because you have a problem with your storage:

Code:
root@node2:~# strace -o strace.out vzctl start 103
Starting container ...
stat(/mnt/r1/private/103): No such file or directory
stat(/mnt/r1/private/103): No such file or directory
Can't umount /var/lib/vz/root/103: Invalid argument

/mnt/r1/prrivate/103 - probably the location of your container - is currently not availabe

Container start fails immediately, i.e. before there is any opportunity to execute vps.premount ....

Kind regards

Mr.Holmes
 
/mnt/r1/prrivate/103 - probably the location of your container - is currently not available
Container start fails immediately, i.e. before there is any opportunity to execute vps.premount ...

Hello Mr.Holmes,

thanks for the advice. I want to use the /etc/vz/vps.premount for mounting the volume where the container is stored. After mounting the volume manually and starting the container the output of strace contains the call for vps.premount. But shouldn't the commands inside be executed before any other checks occur and the process fails?

Thank you for your time

rumix
 
Hello rumix,

thanks for the advice. I want to use the /etc/vz/vps.premount for mounting the volume where the container is stored. After mounting the volume manually and starting the container the output of strace contains the call for vps.premount.

Quite understandable.
But shouldn't the commands inside be executed before any other checks occur and the process fails?

"should" - but the OpenVZ developers implemented like this. If you think it is a bug report it here: https://bugzilla.openvz.org/

Honestly, I am not optimistic that it will succeed....

On the other hand: to make your own start script containing both "mount" and "vzctl start" would not be a big deal.

Kind regards

Mr.Holmes
 

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!