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:
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 <==== 1="1" 21="21" 1828="1828" not="not" a="a" symlink="symlink" -rw-r--r--="-rw-r--r--" root="root" nov="Nov" 01:07="01:07" ve.conf="ve.conf" lrwxrwxrwx="lrwxrwxrwx" .ve.layout=".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 <==== 1="1" 15="15" 1708="1708" 2012="2012" 2013="2013" symlink="Symlink" -rw-r--r--="-rw-r--r--" root="root" feb="Feb" ve.conf="ve.conf" lrwxrwxrwx="lrwxrwxrwx" root1="root1" jun="Jun" .ve.layout=".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 <==== 1="1" 11="11" 2012="2012" proper="proper" location="location" lrwxrwxrwx="lrwxrwxrwx" root="root" root7="root7" may="May" version="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.)