Thursday, January 30, 2014

Bug: OpenVZ migration with NFS version 4

There is bug for OpenVZ migration with NFS version 4


I mount the /vz and /etc/vz/conf directories to a NFS server to reduce the migration time.

I am able to suspend the container, but it give me error message when resuming it. If I unmount the two directories, problem would be resolved.

Here is the error message when I am using NFS

[root@sr2s1 /]# vzctl suspend 106
Setting up checkpoint...
suspend...
dump...
kill...
Checkpointing completed successfully
Container is unmounted
[root@sr2s1 /]# vzctl resume 106
Restoring container ...
Container is mounted
undump...
Setting CPU units: 1000
Restore error, undump failed: Not a directory
Error: can't open file /lib64/libnss_files-2.12.so
Error: do_rst_vma: rst_file: 107776
Error: do_rst_mm: failed to restore vma: -20
Error: do_rst_mm 183376
Error: rst_mm: -20
Container restore failed

Container is unmounted

The error message complains that the /vz/private/106/lib64/libnss_files-2.12.so file is not accessible, although I set up the correct access and ownership for that file. 

I solved this problem by downgrading the NFS version from 4 to 3. I think the NFS v4 does some security checks that prevents the vzctl resume to access the library files. 
How to downgrade NFS:
http://fengweizhang.blogspot.com/2014/01/downgrade-nfs-from-version-4-to-3.html





No comments: