Cannot create Symlinks

  • hi there


    first of all: THX for OMV6. It is great.


    I do have problems setting up symlinks, though.


    1. I have created folders for 2 users. There I want to set up symlinks to where the data resides.
    2. One of these user folders is
      /srv/dev-disk-by-uuid-47f6eb2b-fa42-449f-b374-19ca06aadaed/Symlinks/akt
    3. Here, I created a subfolder names "Audiothek" to set upo symbolic links pointing to 2 different drives
    4. I created the first link in this way:
      Source
      /srv/dev-disk-by-uuid-47f6eb2b-fa42-449f-b374-19ca06aadaed/Symlinks/akt/Audiothek//00 DJ Mixes
      Destination
      /srv/dev-disk-by-uuid-0b4b2dac-3154-4855-86d6-b005eae04d99/Audiothek2/00 DJ Mixes
    5. OMV Symlinks interface accepts this symlink setting but does not do anything. No symlink is beingcreated. I checked both in Windows and on CLI

    Am I doing something wrong?

  • You have a typo in the source. There is a double forward slash in: ..........Audiothek//00 DJ Mixes

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Heck!

    Thank you, I realised this myself in the OMV gui and fixed it

    (my bad that I oversaw this one in my post)


    It still did not work


    So, apart from this typo: is there anything wrong?


    Also: Can you explain to me what to put in source / destination if I want to do this:


    link this folder containing the real data

    audio/1


    to this user folder containing only symlinks

    user/1/audio


    This symlinks business always used to drive me nuts. It must be how my brain is wired ...

    Also, I sort of brainfreeze when I see UUIDs

    So please forgive me for any seemingly dumb question

    • Offizieller Beitrag

    Just my personal opinion... but part of the ease of using symlinks, is to shorten the path and make it easier. You seem to be linking it right back to the same place it was created. Also, in #4 am I correct your paths are using spaces? This is very possibly an issue... Linux doesn't handle paths with spaces well. Or was that something else you were showing?


    Try this (as root)


    cd /

    mkdir audio

    chown -R root:users audio (this will give your users permission to write the folder)


    Now in the symlink plugin, delete whatever else you have created


    Source, is the full path to the folder that has your data.


    Target, is the symlink where you want to access it. So in this case, /audio/username/whatever


    Save


    Then navigate to /audio and you should see a directory called username. cd into username then ls -l and you should see your directory there and it will show it is a symlink (there will be a --> at the end pointing to the source path)

  • That's very cool, THANKS! The links generated this way do actually work


    Is there any way to display them in OMV 6 gui?


    And:

    How do I actually put in the proper lines into OMV 6 gui so this plugin works?

    It would be great to be given an example based on my scenario from post 3 / my second post


    What I just forgot:

    You are right about the spaces. I navigated around that problem by entering the entire path like this

    'path/folder with spaces/'


    This allowed me to set the symlinks despite the empty spaces


    Or are there any other problems that might occur from them?

    It would be quite some hassle changing all of them ...

    • Offizieller Beitrag

    Quotes do indeed overcome the spacing issues... I just don't usually recommend it to newer users as it causes problems for them. As long as you're comfortable with it, that's all that matters.


    Mounting it in the UI.. No. Symlinks (as they are recommended here anyway) are usually used for two things.


    1. Command line access to your directories. It's obviously a lot easier to use the short symlink path vs the long UUID's, etc.


    2. Probalby most comonly, they are used for docker-compose volume mounts.


    So instead of this in your docker-compose volume mounts:


    /srv/dev-disk-by-uuid-123457891029303930/Folder/Folder_1:/config


    You can just have (assuming you store your symlinks in a folder called NAS)


    /NAS/Folder/Folder_1:/config


    Edit: As for changing the paths w/ spaces.. that could be a considerable headache depending on how your data is laid out.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!