OpenVZ Forum


Home » General » Support » vps-create ERROR
vps-create ERROR [message #53246] Fri, 27 April 2018 14:06 Go to next message
Shed is currently offline  Shed
Messages: 5
Registered: April 2018
Junior Member
From: *taipit.ru
Good day everyone! I've got a problem creating containers. I installed the system, evrth went quite well, I created containers and destroyed and dumped and restored. Evrth was fine. But suddenly I tried to create a container and it said

Creating container private area (debian-8.0-x86_64)
/usr/lib/vzctl/vzctl/scripts/vps-create: 53: test: Illegal number: 2.62483e+090
vps-create ERROR: Failed to get available disk space on /var/lib/vz/private/1000.tmp

There is 2.5 Tb of free space. this error is shown when I use simfs layout, if I use ploop, then it says
....
Error in ploop_mount_fs (ploop.c:1326): Can't mount file system dev=/dev/ploop31453p1 target=/var/lib/vz/private/1001.tmp/root.hdd/root.hdd.mnt data='(null)': Invalid argument
Unmounting device /dev/ploop31453
Failed to create image: Error in ploop_mount_fs (ploop.c:1326): Can't mount file system dev=/dev/ploop31453p1 target=/var/lib/vz/private/1001.tmp/root.hdd/root.hdd.mnt data='(null)': Invalid argument [21]
Creation of container private area failed

The system is Debian 9 (upgraded from Debian Cool, the kernel is 2.6.32-openvz-042stab123.9-amd64, version of vzctl 4.9.4-3+b1
couldn't find anything in the Net, please help
Re: vps-create ERROR [message #53247 is a reply to message #53246] Sat, 28 April 2018 08:12 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 660
Registered: September 2005
Senior Member
From: *virtuozzo.com
take look at failed script:

52 AVAIL=$(awk "BEGIN {print $(stat -f -c '%a*%s/1024' $VE_PRVT)}")
53 test "${AVAIL}0" -gt 0 ||
54 vzerror "Failed to get available disk space on $VE_PRVT" ${VZ_FS_NEW_VE_PRVT}

Obviopusly test on line 53 was unable to handle 2.5Tb converted to kilobytes.

You can modify this line, to work around the problem,
but I afraid you can fail on other place.

I believe it's better for you to create small partition for containers private areas.
Re: vps-create ERROR [message #53248 is a reply to message #53247] Sat, 28 April 2018 08:19 Go to previous messageGo to next message
Shed is currently offline  Shed
Messages: 5
Registered: April 2018
Junior Member
From: *taipit.ru
thanks for answer! I'll try to do smth with the script. But I'm just confused about the fact that I have already created containers here on that 2,5Tb disk earlier. I think that I upgraded the system after those successful attempts and that upgrade changed smth, but I can't exactly say what was upgraded, I just made "apt-get upgrade"..
Re: vps-create ERROR [message #53249 is a reply to message #53248] Sat, 28 April 2018 08:33 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 660
Registered: September 2005
Senior Member
From: *virtuozzo.com
The problem was triggered by output of
awk "BEGIN {print $(stat -f -c '%a*%s/1024' /some/partition>)}"

Please check who is guilty here: awk or stat ?
Re: vps-create ERROR [message #53250 is a reply to message #53249] Sat, 28 April 2018 08:39 Go to previous messageGo to next message
Shed is currently offline  Shed
Messages: 5
Registered: April 2018
Junior Member
From: *taipit.ru
my df -h shows

/dev/md0 2.7T 108G 2.5T 5% /
there is no special partition for /vz catalog, so I should replace <some/partition> to /dev/md0 ? right?

then I have the following

# awk "BEGIN {print $(stat -f -c '%a*%s/1024' /dev/md0)}"
32962668
Re: vps-create ERROR [message #53251 is a reply to message #53250] Sat, 28 April 2018 08:54 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 660
Registered: September 2005
Senior Member
From: *virtuozzo.com
originally it was $VE_PRVT -- i.e. directory for containers private areas.

You can use "/" here, stat should return the same numbers for any directories of the same partition.

but /dev/md0 -- is wrong, it is located on another (tmpfs?) partition

Re: vps-create ERROR [message #53252 is a reply to message #53251] Sat, 28 April 2018 11:50 Go to previous messageGo to next message
Shed is currently offline  Shed
Messages: 5
Registered: April 2018
Junior Member
From: *taipit.ru
Directory for containers private areas is /var/lib/vz/private/

so I try:

awk "BEGIN {print $(stat -f -c '%a*%s/1024' /var/lib/vz/private/)}"

and this is the result

2.62468e+09

so how I understand this is the result which the script can't handle?

the command

stat -f -c '%a*%s/1024' /var/lib/vz/private/

results in 656168065*4096/1024


Re: vps-create ERROR [message #53253 is a reply to message #53252] Sat, 28 April 2018 12:10 Go to previous message
Shed is currently offline  Shed
Messages: 5
Registered: April 2018
Junior Member
From: *taipit.ru
Yohooooooooo!!!!

I just commented out the tests in that script /usr/lib/vzctl/vzctl/scripts/vps-create - on line 53 and on line 86 and it works!!!!
Thank you SU much, vaverin!!! It's a shame of me, that didn't think carefully about the error line
"/usr/lib/vzctl/vzctl/scripts/vps-create: 53: test: Illegal number: 2.62467e+090" - it gives the whole info.

But I still have what to do))) repaired creating the 'simfs' containers only, not 'ploop'. Now I'll go and take a close look on ploop.c)))
Previous Topic: prl_disk_tool compact on started containers
Next Topic: No arp entry on vlan interface
Goto Forum:
  


Current Time: Sun May 27 05:21:34 GMT 2018