Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    6

    piCorePlayer mount NFS on boot.

    Hi,

    I've the following problem:

    I want to mount 2 directories from my NAS for use in LMS.
    I added the mounts in the Web-UI, and it works ..... BUT when I boot the piCorePlayer and the NAS isn't online pcp tries to mount it several times, despite of that it shouldn't, according to the options
    Code:
    retrans=1,retry=1
    So it seems to me that the options simply get ignored.

    Then I added these lines to the bootlocal.sh, but they don't seem to be executed, log shows nothing:

    Code:
    sudo mkdir /mnt/Musik
    sudo mkdir /mnt/Hoerspiele
    sudo mount -o addr=192.168.1.77,nolock,retrans=1,retry=1 -t nfs 192.168.1.77:/export/Musik /mnt/Musik
    sudo mount -o addr=192.168.1.77,nolock,retrans=1,retry=1 -t nfs 192.168.1.77:/export/Hoerspiele /mnt/Hoerspiele
    So, has anyone an idea to solve this problem?

  2. #2
    Member
    Join Date
    Sep 2017
    Location
    Ňkersberga, Sweden
    Posts
    98
    Quote Originally Posted by ankalagon View Post
    Hi,

    I've the following problem:

    I want to mount 2 directories from my NAS for use in LMS.
    I added the mounts in the Web-UI, and it works ..... BUT when I boot the piCorePlayer and the NAS isn't online pcp tries to mount it several times, despite of that it shouldn't, according to the options
    Code:
    retrans=1,retry=1
    So it seems to me that the options simply get ignored.

    Then I added these lines to the bootlocal.sh, but they don't seem to be executed, log shows nothing:

    Code:
    sudo mkdir /mnt/Musik
    sudo mkdir /mnt/Hoerspiele
    sudo mount -o addr=192.168.1.77,nolock,retrans=1,retry=1 -t nfs 192.168.1.77:/export/Musik /mnt/Musik
    sudo mount -o addr=192.168.1.77,nolock,retrans=1,retry=1 -t nfs 192.168.1.77:/export/Hoerspiele /mnt/Hoerspiele
    So, has anyone an idea to solve this problem?
    From the manpage for nfs:
    retrans=n The number of times the NFS client retries a request before it attempts further recovery action. If the retrans option is not specified, the NFS client tries each UDP request three times and each TCP request
    twice. The NFS client generates a "server not responding" message after retrans retries, then attempts further recovery (depending on whether the hard mount option is in effect).

    retry=n The number of minutes that the mount(8) command retries an NFS mount operation in the foreground or background before giving up. If this option is not specified, the default value for foreground
    mounts is 2 minutes, and the default value for background mounts is 10000 minutes (80 minutes shy of one week). If a value of zero is specified, the mount(8) command exits immediately after the first
    failure.
    Note that this only affects how many retries are made and doesn't affect the delay caused by each retry. For UDP each retry takes the time determined by the timeo and retrans options, which by default
    will be about 7 seconds. For TCP the default is 3 minutes, but system TCP connection timeouts will sometimes limit the timeout of each retransmission to around 2 minutes.

    soft / hard Determines the recovery behavior of the NFS client after an NFS request times out. If neither option is specified (or if the hard option is specified), NFS requests are retried indefinitely. If the soft
    option is specified, then the NFS client fails an NFS request after retrans retransmissions have been sent, causing the NFS client to return an error to the calling application.
    NB: A so-called "soft" timeout can cause silent data corruption in certain cases. As such, use the soft option only when client responsiveness is more important than data integrity. Using NFS over TCP or
    increasing the value of the retrans option may mitigate some of the risks of using the soft option.

    Maybe adding "soft" to the options will cause the behavior you want?
    2 Touch, 2 Picoreplayer v6.1.0 on RaspBerry 3B
    LMS 8.0.0 on Ubuntu 20.04.1 on Intel Core2 Duo E4500 @ 2.20GHz, 2GB. All wired
    Main audio system: Magnepan 3.6, amp "Gdis 400", DAC & pre: NAD M51, streamers: SB Touch // NAD M50

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,015
    Also - why do you expect the mount to fail?
    If it is because the remote NFS server has been shutdown then how about putting all of your commands into a script and then wrapping the script with some other test such as ping to see if the remote system is reachable.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  4. #4
    Junior Member
    Join Date
    Jul 2020
    Posts
    6
    The soft option didn't change anything, it seems to me that the options are totally ignorrd, because I entered "asdfasf" and it doesn't throw any error.

    Quote Originally Posted by Paul Webster View Post
    Also - why do you expect the mount to fail?
    If it is because the remote NFS server has been shutdown then how about putting all of your commands into a script and then wrapping the script with some other test such as ping to see if the remote system is reachable.
    The NAS is only on when it's needed and the Squeezebox is mainly used for Radio.
    I'll try it with the script.

  5. #5
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,008
    Quote Originally Posted by ankalagon View Post
    The NAS is only on when it's needed and the Squeezebox is mainly used for Radio.
    I'll try it with the script.
    A NAS is designed to be an always on device. You are probably reducing its lifespan if you are constantly shutting it down and restarting it.
    A USB drive attached to the Pi would be a better option in your use case (with appropriate backup).
    VB2.4 storage QNAP TS419p (NFS)
    Living Room - Joggler & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  6. #6
    Junior Member
    Join Date
    Jul 2020
    Posts
    6
    Quote Originally Posted by d6jg View Post
    A NAS is designed to be an always on device. You are probably reducing its lifespan if you are constantly shutting it down and restarting it.
    A USB drive attached to the Pi would be a better option in your use case (with appropriate backup).
    The NAS IS another pi with USB drive. But when all family members are working and not at home, it has no sense to be online (hm, maybe the dogs want to use it, but they haven't complained about that). It's running for years and no probs.

  7. #7
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,008
    Quote Originally Posted by ankalagon View Post
    The NAS IS another pi with USB drive. But when all family members are working and not at home, it has no sense to be online (hm, maybe the dogs want to use it, but they haven't complained about that). It's running for years and no probs.
    Thatís not really a NAS then is it? Thatís a Pi used as a storage device
    VB2.4 storage QNAP TS419p (NFS)
    Living Room - Joggler & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  8. #8
    Junior Member
    Join Date
    Jul 2020
    Posts
    6
    Quote Originally Posted by d6jg View Post
    Thatís not really a NAS then is it? Thatís a Pi used as a storage device
    Sure it is a NAS. The hardware of the NAS has nothing to do with the definition.
    There could even be a bunch of hamsters on Speed and coffeine typing the bits and bytes on a typewriter with nearly lightspeed.

  9. #9
    Member
    Join Date
    Oct 2016
    Location
    Plymouth, UK
    Posts
    37
    Quote Originally Posted by d6jg View Post
    Thatís not really a NAS then is it? Thatís a Pi used as a storage device
    Have a read of this article

    https://thepi.io/how-to-use-your-ras...-as-a-nas-box/

  10. #10
    Junior Member
    Join Date
    Jul 2020
    Posts
    6
    Okay I see I should have mentioned that I have OMV installed on the pi, sry.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •