Article ID: 118971, created on Dec 2, 2013, last review on Jun 17, 2016

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux 4.7
  • Virtuozzo containers for Linux 4.6

Symptoms

I have VZFS3 container running on VZ 4.6 node that I would like to migrate to Parallels Cloud Storage cluster (PCSS). I have converted it to VZFS4 using instruction provided in:

116321 Migration of VZFS container to PCS6 fails: "Can't migrate this private area on shared FS (old layout)"

However, migration is still not possible.

Cause

During conversion from VZFS3 to VZFS4, the container got improper layout, in particular, "templates" directory is still located in /vz/private/CT_ID/ instead of being in /vz/private/CT_ID/fs while /vz/private/CT_ID/templates should be a symlink.

Improper layout example:

~# ls -la /vz/private/444444 
total 44
drwxr-xr-x  8 root root 4096 Nov 21 01:07 .
drwxr-xr-x 28 root root 4096 Nov 21 00:38 ..
drwxr-xr-x  2 root root 4096 Nov 21 01:07 dump
drwxr-xr-x  4 root root 4096 Nov 21 01:07 fs
-rw-r--r--  1 root root   20 Nov 21 01:07 .owner
-rw-------  1 root root  186 Nov 21 01:07 quota.fs
drwxr-xr-x  2 root root 4096 Nov 21 01:07 scripts
drwxr-xr-x 21 root root 4096 Nov 21 00:38 templates   <==== not a symlink
-rw-r--r--  1 root root 1828 Nov 21 01:07 ve.conf
lrwxrwxrwx  1 root root    1 Nov 21 01:07 .ve.layout -> 4
drwxr-xr-x  2 root root 4096 Nov 21 00:50 .vza
drwxr-xr-x  3 root root 4096 Nov 21 00:49 vzagent

Proper layout after conversion:

~# ls -la /vz/private/5006
total 40
drwxr-xr-x  6 root root 4096 Feb 15  2013 .
drwxr-xr-x 57 root root 4096 Dec  2 14:30 ..
drwxr-xr-x  2 root root 4096 Jun 15  2012 dump
drwx------  5 root root 4096 Sep 14  2012 fs
-rw-r--r--  1 root root0 Sep 14  2012 .lck
-rw-r--r--  1 root root   10 Sep 18  2012 .owner
-rw-------  1 root root 4344 Nov 25 07:27 quota.fs
drwxr-xr-x  2 root root 4096 Jun 15  2012 scripts
lrwxrwxrwx  1 root root   12 Jun 15  2012 templates -> fs/templates    <==== Symlink
-rw-r--r--  1 root root 1708 Feb 15  2013 ve.conf
lrwxrwxrwx  1 root root1 Jun 15  2012 .ve.layout -> 4
drwxr-xr-x  2 root root 4096 Nov 20  2012 .vza


~# ls -la /vz/private/5006/fs
total 20
drwx------  5 root root 4096 Sep 14  2012 .
drwxr-xr-x  6 root root 4096 Feb 15  2013 ..
drwxrwxrwx  2 root root 4096 May 11  2012 cow
drwxr-xr-x 22 root root 4096 Sep 25 11:42 root
drwxr-xr-x  3 root root 4096 Sep 14  2012 templates        <==== proper location
lrwxrwxrwx  1 root root7 May 11  2012 VERSION -> 005.004

Resolution

For Parallels Virtuozzo Containers 4.6, the fix for the issue PCLIN-32206 has been included in TU-4.6.0-266.

As a workaround, move "templates" directory to the proper location under /vz/private/CT_ID/fs and create a symlink manually.

# mv /vz/private/CT_ID/templates /vz/private/CT_ID/fs/templates

# ln -s fs/templates /vz/private/CT_ID/templates

(Replace CT_ID with the proper container's ID value.)

Search Words

ploop-based layout

vzfsutil

fs/templates

1415665751: /bin/vztar exited with code 2

pcss

vzfs layout

Migration of VZFS container

PCLIN-32206

vzfs4

vzfs3

vzctl convert

old layout

e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 0dd5b9380c7d4884d77587f3eb0fa8ef 0c05f0c76fec3dd785e9feafce1099a9 36627b12981f68a16405a79233409a5e

Email subscription for changes to this article
Save as PDF