Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to set a symlink on a mountpoint? I have a mountpoint /vz. When I'm ln -s /var/lib/vz /vz the result is, that I have a directory vz in my mountpoint /vz, thus I have /vz/vz. Is there any way to prevent this?

share|improve this question

migrated from serverfault.com Sep 24 '12 at 16:42

This question came from our site for system and network administrators.

2 Answers 2

up vote 5 down vote accepted

A symbolic link cannot be a mount point.

To do what (I think) you want:

  1. Mount the filesystem at /var/lib/vz instead of /vz.
  2. Create a symbolic link at /vz.

    rmdir /vz
    ln -s /var/lib/vz /vz
    
share|improve this answer
    
That sounds like a good idea. Gonna try that. Thanks. –  ulf Sep 13 '12 at 10:50
    
That worked. Thanks :-). –  ulf Sep 13 '12 at 11:06

You're doing the symlink wrong, you need to run ln -s /vz /var/lib/vz

share|improve this answer
    
Unfortunately I don't. This doesn't work either :-(. –  ulf Sep 13 '12 at 10:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.