mounting script to mount nfs shares for recording on a NAS

  • Hi guys,

    I have a Wetek Play running LibreELEC Krypton which contains two DVB-S2 receivers.
    I would like to record the resulting recordings on my Synology NAS.
    I have followed the wiki entry here:

    Mounting network shares - OpenELEC

    But I can't get it to work. the script creates something in multi-user.target.wants and what looks like a directory is added in the /storage directory but there is no link to the actual folder on the NAS. I have a text file in there and it doesnt show when I look in the new directory in /storage.

    As you can see by what I am writing I am far from being a Linux expert. I would be grateful if someone could take a look at the mounting file and tell me where I have gone wrong or give me some suggestions.
    The Synology NAS share is 'video' and I am trying to mount a folder within that share (video/RECORDING/Movies). Is this even possible? Can I only mount a share and not a folder within it?
    i used to have TVHeadend running on the NAS but im just testing out TVHeadend 4.2 on the Wetek as 4.2 has not been compiled for the Synology. I, unfortunately, have no idea how to do that myself. Is TVHeadend 4.2 even worth this effort over TVHeadend 4.1?

    The mounting script is:

    Thank you for any advice.

    Degsy

  • Here is my cheat sheet that I use to mount my Synology NAS media folders onto LibreELEC. It only takes me a few minutes to setup my tvheadend DVR server using this method of mounting my NAS shares. I do have have NAS set up as NFS shares. You obviously will have you user you IP address, and folder names.

    The easy way to mount NAS,
    1. open windows explorer, go to openELEC in network directory
    2. copy "autostart.sh" file into the root of configfiles directory.
    3. go to system.d folder from Configfiles folder.
    4. copy and paste storage-myrecordings.mount
    5. copy and paste storage-recordings.mount

    6. reboot OpenELEC box.
    7. open putty and paste this into the root of OpenELEC.
    systemctl >> systemctl enable storage-myrecordings.mount

    8. Under the recording profile in the web browser use this for the recording path
    /storage/myrecordings

    all there is to it.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    all autostart.sh is, is a text file with this code.
    mount -t nfs 192.168.1.74:/volume1/myrecordings /storage/myrecordings -o rw,nolock

    echo 0 > /sys/class/amhdmitx/amhdmitx0/cec_config

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    all the storage-myrecordings.mount is, is a text file with this

    [Unit]
    Description=test nfs mount
    Requires=network-online.service
    After=network-online.service
    Before=kodi.service
    #Before=xbmc.service

    [Mount]
    #enter in the share and place it will mount to
    What=192.168.1.74:/volume1/myrecordings
    Where=/storage/myrecordings
    Options=
    Type=nfs

    [Install]
    WantedBy=multi-user.target

  • Thanks clarkss12.

    So, I did what you advised, changed the settings so they matched my ip adresses etc.

    I'm guessing it will work for folders more than one level below "volume1" right?
    Once you reboot the openelec and the folders are created in storage, if you navigate to them via ssh should you see the contents of the folder on the synology using ls?
    should these mounted folders be seen via windows explorer when looking at the openelec box?

    Degsy


  • Thanks clarkss12.

    So, I did what you advised, changed the settings so they matched my ip adresses etc.

    I'm guessing it will work for folders more than one level below "volume1" right?
    Once you reboot the openelec and the folders are created in storage, if you navigate to them via ssh should you see the contents of the folder on the synology using ls?
    should these mounted folders be seen via windows explorer when looking at the openelec box?

    Degsy


    Yes to all your questions.