"df" command inside a container show the global size of our storage ...

xavier.cm

Renowned Member
May 22, 2013
13
0
66
Hi,

I encounter a strange problem while migrating some containers to a new storage system (NFS share on a Synology RS814RP+) : when i'm connected into one container and made a "df" command i get something like :

8<----------------
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 8.2T 62G 8.1T 1% /
8<----------------

But in my "/etc/vz/conf/CTID.conf" (where CTID is the Id of the container) i've something like :

8<----------------
DISKSPACE="200G:200G"
8<----------------

When i use the web interface and go to the "ressources" tab of this container i could see : "Disk size 200GB"

So i don't know why i don't have to good size information whith "df" (8.2TB is the global size of our new storage ...) while the web interface give me the good value.

Thanks in advance for your help !

/Xavier
 
Hello xavier

How did you migrate?

Kind regards

Mr.Holmes

Helo Mr.Holmes,

I used :

vzctl stop CTID

vzctl mount CTID

cp -av /old_storage_path/root/CTID /new_storage_path/private

vzctl umount CTID

Modified : /etc/vz/conf/CTID.conf whith :
...
VE_ROOT="/new_storage_path/root/$VEID"
VE_PRIVATE="/new_storage_path/private/$VEID"
...

vzctl start CTID

Any idea ?

/Xavier
 
Hello xavier,

vzctl stop CTID

vzctl mount CTID

cp -av /old_storage_path/root/CTID /new_storage_path/private

vzctl umount CTID

Modified : /etc/vz/conf/CTID.conf whith :
...
VE_ROOT="/new_storage_path/root/$VEID"
VE_PRIVATE="/new_storage_path/private/$VEID"
...

vzctl start CTID

Any idea ?

Yes - but first: you are right, a strange behavior indeed. Unfortunately no documentation about filesystem simfs can be found.

After playing around I found a trick:

1. Make a copy as above (btw.: "mount" is not necessary, rather copy direct from /old_storage_path/private/CTID)

2. define NEW-VEID, a number which is still free

3. copy /etc/vz/conf/$VEID to /etc/vz/conf/$NEW-VEID

4. adapt /etc/vz/conf/$NEW-VEID as described in your post (note: I left as private directory name the old name, but I think you can choose any name)

5.
Code:
vzctl start $NEW-VEID
df is correct now!

6. finally you can delete the old CT

A more thorough test is recommended - but seems to be the right direction.

Success!

Mr.Holmes
 
Last edited:
Hi Mr Holmes,

Thanks a lot for your help.

I tried your solution and it's OK.

But i found another way (without having to renumber all my CTs) :

I use the same method than explain in my previous message but after i do :

vzctl start CTID

vzquota off CTID

vzquota drop CTID

vzctl stop CTID

vzctl start CTID

And all work fine.

Thanks again for your help !

/Xavier