21
edits
Changes
m
Currently, ovz-node1 is still Primary of Move the original /devvz directory to /drbd0vz. You can now mount it orig and copy recreate the necessary files /vz directory to have it as a mount point '''(only do this on ovz-node1!both nodes)''':
→Copy necessary OpenVZ files to DRBD device: fixed one link (/etc/vz) and reworded the steps more clearly
=== Copy necessary OpenVZ files to DRBD device ===
<pre>
[root@ovz-node1 ~]# mount mv /dev/drbd0 /mnt[root@ovz-node1 ~]# cp -a vz /vz/* /mnt/.orig[root@ovz-node1 ~]# mkdir -p /mnt/cluster/etc/sysconfig[root@ovz-node1 ~]# mkdir -p /mnt/cluster/var[root@ovz-node1 ~]# cp -a /etc/sysconfig/vz /mnt/cluster/etc/sysconfig[root@ovz-node1 ~]# cp -a /etc/sysconfig/vz-scripts /mnt/cluster/etc/sysconfig[root@ovz-node1 ~]# cp -a /var/vzquota /mnt/cluster/var[root@ovz-node1 ~]# umount /dev/drbd0
[root@ovz-node1 ~]#
</pre>
Afterwards move the original files necessary OpenVZ directories (/etc/vz, /etc/sysconfig/vz-scripts, /var/vzquota) and replace them with symbolic links '''(do this on both nodes)''':
<pre>
[root@ovz-node1 ~]# mv /etc/sysconfig/vz /etc/sysconfig/vz.orig
[root@ovz-node1 ~]# mv /etc/sysconfig/vz-scripts /etc/sysconfig/vz-scripts.orig
[root@ovz-node1 ~]# mv /var/vzquota /var/vzquota.orig
[root@ovz-node1 ~]# ln -s /vz/cluster/etc/sysconfig/vz /etc/sysconfig/vz
[root@ovz-node1 ~]# ln -s /vz/cluster/etc/sysconfig/vz-scripts /etc/sysconfig/vz-scripts
[root@ovz-node1 ~]# ln -s /vz/cluster/var/vzquota /var/vzquota
[root@ovz-node1 ~]#
</pre>
Currently, ovz-node1 is still Primary of /dev/drbd0. You can now mount it and copy the necessary files to it '''(only on ovz-node1!)''':
<pre>
[root@ovz-node1 ~]# mount /dev/drbd0 /vz
[root@ovz-node1 ~]# cp -a /vz.orig/* /vz/
[root@ovz-node1 ~]# mkdir -p /vz/cluster/etc
[root@ovz-node1 ~]# mkdir -p /vz/cluster/etc/sysconfig
[root@ovz-node1 ~]# mkdir -p /vz/cluster/var
[root@ovz-node1 ~]# cp -a /etc/vz /vz/cluster/etc/
[root@ovz-node1 ~]# cp -a /etc/sysconfig/vz-scripts /vz/cluster/etc/sysconfig/
[root@ovz-node1 ~]# cp -a /var/vzquota /vz/cluster/var/
[root@ovz-node1 ~]# umount /dev/drbd0
[root@ovz-node1 ~]#
</pre>