1

I am following the tutorial http://www.olindata.com/blog/2013/12/building-ha-cluster-openvz-drbd-heartbeat-and-pacemaker. I got up to here:

symlink folders in /var/lib/vz to /etc/vz

The /etc/vz has two folders: names and dists. At the previous step I moved these two folders on /var/lib/vz.

Now, in order to create the symlinks I did the following:

[root@primary vz]# cd dists
[root@primary dists]# ln -s /etc/vz symlink1

[root@primary vz]# cd names
[root@primary names]# ln -s /etc/vz/names symlink2

In order to verify, I used ls -la command.

[root@primary vz]# cd names
[root@primary names]# ls -la
lrwxrwxrwx  1 root root   13 Jun 10 10:58 symlink2 -> /etc/vz/names

[root@primary vz]# cd dists
[root@primary dists]# ls -la
rwxrwxrwx  1 root root   13 Jun 10 10:58 symlink1 -> /etc/vz/dists

Now, I'm not really sure if I did symlink folders in /var/lib/vz to /etc/vz or I misunterstood the requirement and i should've done it differently.

  • What do you mean by symlink folders in /var/lib/vz to /etc/vz . You just created two symlinks pointing to /etc/vz/names and /etc/vz/dists. What's your requirement? – Thushi Jun 10 '15 at 8:46
  • By requirement I mean symlink folders in /var/lib/vz to /etc/vz. And because I'm not sure how should I interpret that sentence I chose to make this post. – Tanatos Daniel Jun 10 '15 at 12:32
2

You were told to "symlink folders in /var/lib/vz to /etc/vz". This means you need to create a link in /etc/vz pointing to each of the directories in /var/lib/vz. To do that, run:

ln -s /var/lib/vz/names /etc/vz
ln -s /var/lib/vz/dists /etc/vz

That will create the symlinks /etc/vz/names and /etc/vz/dists which point to /var/lib/vz/names and /var/lib/vz/dists respectively.

  • You mean the way I did it I created symlinks /var/lib/vz/names and /var/lib/vz/dists which point to /etc/vz/names and /etc/vz/dists repectively? – Tanatos Daniel Jun 10 '15 at 12:40
  • @TanatosDaniel I'm not sure what you did since that will depend on which directory you ran the command from. You created a link called symlink1 in vz/dists (I don't know if that was /etc/vz or /lib.vz) which pointed to /etc/vz and one called symlink2 in vz/names which pointed to /etc/vz/names. – terdon Jun 10 '15 at 22:37
  • Oh. You're right. The folders have the same names. The commands were run from /var/lib/vz/dists and /var/lib/vz/names – Tanatos Daniel Jun 10 '15 at 22:57
  • @TanatosDaniel OK, in that case, you created the following symlinks: /var/lib/vz/dists/symlink1 -> /etc/vz and /var/lib/vz/names/symlink2 -> /etc/vz/names. Just remove the two symlinks and run the command from my answer to create the right ones. – terdon Jun 10 '15 at 23:01
  • Ok. So I have created them backwards. I get it now. Thanks! – Tanatos Daniel Jun 10 '15 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.