Article ID: 120591, created on Mar 18, 2014, last review on May 11, 2014

  • Applies to:
  • Virtuozzo 6.0

Symptoms

Container was migrated using pmigrate and resized. Now vzctl shows incorrect diskspace value:

[root@node ~]# vzlist 100600 -o diskspace,diskspace.h
  DQBLOCKS DQBLOCKS.H
    820928   22796788        <----initial value

[root@node ~]# vzctl set 100600 --save --diskspace 100000000
...
The filesystem on /dev/ploop11773p1 is now 24999168 blocks long.
Saved parameters for Container 100600

[root@node ~]# vzlist 100600 -o diskspace,diskspace.h
  DQBLOCKS DQBLOCKS.H
    820928   22796788        <----incorrect value

Cause

There is a .statfs ( /vz/private/$CTID/root.hdd/.statfs ) file that is created when a container is stopped. It contains the details about diskspace and inode quotas, so vzlist can get this information without the access to the file system. After container is started, .statfs is deleted.

Online migration of a running ploop container over shared storage results in an existing .statfs file for a running container. The file persists over online disk resize and it was is to show quota values unconditionally.

This behavior is recognized as a product bug with internal id PSBM-24412.

Resolution

Delete .statfs file and vzctl will be able get the actual diskspace value:

[root@node ~]# vzlist 100600 -o diskspace,diskspace.h
  DQBLOCKS DQBLOCKS.H
    820928   22796788       <----incorrect value

[root@node ~]# ls -al /vz/private/100600/root.hdd/.statfs
-rwx------ 1 root root 40 Mar 15 16:51 /vz/private/100600/root.hdd/.statfs

[root@node ~]# rm -f /vz/private/100600/root.hdd/.statfs

[root@node ~]# ls -al /vz/private/100600/root.hdd/.statfs
ls: cannot access /vz/private/100600/root.hdd/.statfs: No such file or directory

[root@node ~]# vzlist 100600 -o diskspace,diskspace.h
  DQBLOCKS DQBLOCKS.H
    837036   98427524       <----correct value

Search Words

size wrong

PSBM-24412

resizing

diskspace.h

incorrect value

.statfs

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF