Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043

    LMS on Raspbian - network share problems

    I've got LMS running on Rasbian after a bit of hacking and a bit of help from other threads on this board. I was anticipating this might be a pain but it wasn't too hard in the end.

    However, now I'm stuck on something I thought would be a breeze, namely setting up LMS to access a NAS. I've gone through the process of editing /etc/fstab and adding this line:
    192.168.0.18:/storage /mnt/juke nfs rw,nouser 0 0

    Then entering
    sudo mount -a

    to test it, and all is well, I can see the NAS folder structure under /mnt/juke.

    PROBLEM ONE

    One problem is, on reboot the share is not mounted, I have to add the mount command again (no use to me as I intend to run headless when its all set up). I run this command to see the boot issue:

    systemctl status mnt-juke.mount
    mnt-juke.mount - /mnt/juke
    Loaded: loaded (/etc/fstab; generated)
    Active: failed (Result: exit-code) since Thu 2021-02-11 19:31:47 GMT; 1min 13s ago
    Where: /mnt/juke
    What: 192.168.0.18:/storage
    Docs: man:fstab(5)
    man:systemd-fstab-generator(8)

    Feb 11 19:31:47 raspberrypi systemd[1]: Mounting /mnt/juke...
    Feb 11 19:31:47 raspberrypi mount[506]: mount.nfs: Network is unreachable
    Feb 11 19:31:47 raspberrypi systemd[1]: mnt-juke.mount: Mount process exited, code=exited, status=32/n/a
    Feb 11 19:31:47 raspberrypi systemd[1]: mnt-juke.mount: Failed with result 'exit-code'.
    Feb 11 19:31:47 raspberrypi systemd[1]: Failed to mount /mnt/juke.

    I can only imagine that the network is not established when it tries this on startup. Any advice on how to get round this?

    PROBLEM TWO

    The second issue I have is that, when I do the mount manually, it's read-only. I want it to be read-write so that I can generate playlists on the share and also run some other software (transmission, plex) that will also need to write to the NAS. Again, any advice here?

    The NAS is an old Vortexbox device, if that's relevant.
    Last edited by jezbo; 2021-02-11 at 13:10.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  2. #2
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    I solved PROBLEM ONE myself after a bit of googling. Turns out you can add a delay to the mount options, so in the end I have this long-winded line in /etc/fstab:

    192.168.0.18:/storage /mnt/juke nfs rw,nouser,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10 0 0

    Still stuck on PROBLEM TWO though:

    sudo mkdir -p /mnt/juke/temp
    mkdir: cannot create directory ‘/mnt/juke/temp’: Read-only file system

    The NAS, which has a read/write samba share set up as follows:

    [files]
    comment = Read/Write file share
    path = /storage
    guest ok = yes
    writeable = yes
    create mask = 0777

    But Samba is only to open it up for windows access, right?

    I've tried various cifs options but they dont seem to work. I dont really know what to try next.
    Last edited by jezbo; 2021-02-11 at 15:16.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  3. #3
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    I thought this had gone away but it also seems I have a

    PROBLEM THREE:


    Whenever I boot the pi with a Wired network connection, it seems to knock out other wired devices on my LAN. I use poweline adapters. Wireless
    works fine for now but I think I'll run into buffering problems accessing the NAS and streaming music from LMS if I try to go wireless long term.

    Has anyone ever encountered anything like this before?
    Last edited by jezbo; 2021-02-11 at 14:34.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  4. #4
    Quote Originally Posted by jezbo View Post
    I've tried various cifs options but they dont seem to work. I dont really know what to try next.
    Try mounting it as CIFS rather than NFS - you've shown your server-side settings for CIFS but your client-side settings are NFS. These are different protocols handled by different things with different settings.

    Should be something useful in here:
    https://wiki.ubuntu.com/MountWindowsSharesPermanently

  5. #5
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    Quote Originally Posted by troffasky View Post
    Try mounting it as CIFS rather than NFS - you've shown your server-side settings for CIFS but your client-side settings are NFS. These are different protocols handled by different things with different settings.

    Should be something useful in here:
    https://wiki.ubuntu.com/MountWindowsSharesPermanently
    Thanks. I tried lots of CIFS options, with credential files, username & password etc - no luck. That link is about accessing from Windows again isnt it? I want to access a linux-based NAS from a pi. I think CIFS is a replacement for Samba so isnt that too about Windows access?

    I thought this would be simple!
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  6. #6
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    4,261
    @jezbo

    which Nas ?

    I have a Qnap TS121 and I have to enter an IP address for the raspberry pi to give it permission to access the NAS

    ronnie

    who cares not for the Calcutta Cup defeat as an Ireland and Wales supporter

  7. #7
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    I think I found a fix for my PROBLEM TWO as well. After more digging I now understand that while Samba was designed for access to windows machines, it CAN be used to share between two Linux machines as well, and CIFS is a way to do that. But the Linux way of sharing files is NFS, so I looked deeper into that and found that my NAS has this in its /etc/exports file:

    /storage *(ro)

    I can open up that path to my pi only as read-write by adding two other rules to the end (49 & 50 are my fixed IP addresses for my pi for wireless and wired respectively)

    /storage *(ro) 192.168.0.49(rw,no_root_squash,async) 192.168.0.50(rw,no_root_squash,async)

    And this is in /etc/fstab on my pi:

    192.168.0.18:/storage /mnt/juke nfs rw,nouser,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10 0 0

    Reboot both the NAS and the pi and I can access the NAS from my pi in read/write mode (I also had to set u+rwx permissions on the /mnt/juke folder on the pi).
    Last edited by jezbo; 2021-02-12 at 05:59.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  8. #8
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    On my PROBLEM THREE, if I enable both wired and wireless on the pi wlan0 gets assigned to the 192.168 range as you'd expect but eth0 is on 169.254

    route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    0.0.0.0 192.168.0.1 0.0.0.0 UG 303 0 0 wlan0
    169.254.0.0 0.0.0.0 255.255.0.0 U 202 0 0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0

    I don't fully understand these things but that looks a bit iffy. Is the default setup to act as a DHCP server or something?
    Last edited by jezbo; 2021-02-13 at 01:21.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  9. #9
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,013
    169.254.x.y is used when an expected DHCP server could not be found.
    It can be useful - e.g. to connect one computer directly to another during a set-up phase - but not in this case.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  10. #10
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    OK I'm not sure why it would fail to find the DHCP but following some advice on https://www.raspberrypi.org/document...uration/tcpip/ I did this

    sudo nano /etc/dhcpcd.conf

    And just uncommented these lines:
    # Example static IP configuration:
    interface eth0
    static ip_address=192.168.0.10/24
    static ip6_address=fd51:42f8:caae:d92e::ff/64
    static routers=192.168.0.1
    static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

    Then rebooted and I do get the pi using 192.168.0.10 on eth0:

    route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    0.0.0.0 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 303 0 0 wlan0
    192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0

    Not sure why that was necessary but if that fixes it long term i'm happy.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

Posting Permissions

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