Forums

nuke
nuke
Offline
Resolved
0 votes
I thought I'd try the Plex media server since it is available as an install.

All my media resides on a NAS4Free server. I don't want to copy all the media files to the COS 7 server because that would duplicate all the media files. I never installed Plex or Serviio on the NAS4Free. It serves files quite nicely using SMB and Netatalk.

Because of the suggestions/assumption that all media is supposed to be put into the Flexshares, which I don't want to do, I'm not sure how I should go about adding the existing media disks through the NAS4Free without screwing up the COS.

I suspect I can somehow mount the NAS in COS in the /etc/fstab with a newly created Plex userid on the NAS.

Is this how you do it?

Or is there something I should be doing?

Thanks for your suggestions.
Saturday, October 14 2017, 06:31 PM
Share this post:
Responses (8)
  • Accepted Answer

    Saturday, October 14 2017, 08:58 PM - #Permalink
    Resolved
    0 votes
    Use this as a starting point:
    # Fileserver Videos
    # reference: https://discourse.osmc.tv/t/configuring-fstab-based-samba-share-mounts/38167?source_topic_id=38924
    //server.howitts.co.uk/videos /mnt/server_videos cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=nick,password=my_password,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0
    This is how I mount my ClearOS share on a Pi in the Pi's /etc/fstab. I'm not sure of anything after my_password and you may get by without it. I'm also not sure about the "x-systemd.automount" and I think there is a flag you can set so ClearOS does not hang on boot if it does not find the NAS drive. This mounts the ClearOS drive in /mnt/server on the Pi. You can mount it to wherever you want.
    The reply is currently minimized Show
  • Accepted Answer

    nuke
    nuke
    Offline
    Monday, October 16 2017, 01:10 AM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    Use this as a starting point:
    # Fileserver Videos
    # reference: https://discourse.osmc.tv/t/configuring-fstab-based-samba-share-mounts/38167?source_topic_id=38924
    //server.howitts.co.uk/videos /mnt/server_videos cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=nick,password=my_password,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0
    This is how I mount my ClearOS share on a Pi in the Pi's /etc/fstab. I'm not sure of anything after my_password and you may get by without it. I'm also not sure about the "x-systemd.automount" and I think there is a flag you can set so ClearOS does not hang on boot if it does not find the NAS drive. This mounts the ClearOS drive in /mnt/server on the Pi. You can mount it to wherever you want.


    Thanks Nick.

    I've been doing some reading and this has become quite complicated with the x-systemd.automount .

    I noticed that there are some flexshare mounts in the fstab as I have a webpage and virtual webpage.

    Does the COS7 server update the fstab when you add another flexshare directory? Will it overwrite the existing fstab?

    Thanks again.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, October 16 2017, 07:41 AM - #Permalink
    Resolved
    0 votes
    I thought the x-systemd.automount looked quite interesting. If you don't want to try it, remove it and the "noauto" and put in "nofail" instead. I think the advantage of x-systemd.automount is if the NAS disappears or gets rebooted the mount will automatically recover.

    The Websites to funny things to fstab. The default web site has /var/www/html bound into it and the other websites get /var/www/virtual/{website} bound into it so all the files are actually somewhere in the /var/www/ folder structure but appear to be in the flexshare structure. This does not happen with file share flexshares.

    CoS should not overwrite the existing fstab, just amend it.
    The reply is currently minimized Show
  • Accepted Answer

    nuke
    nuke
    Offline
    Thursday, July 25 2019, 01:23 AM - #Permalink
    Resolved
    0 votes
    Hi again.

    So I ended up using the mount command in a script to mount the external NAS drives. Then removed Plex and removed mount commands.

    With some time now to try to get Plex DNLA going again now, I decided to pick up from where I left off.

    I wanted to test using the mount command before finally getting the automount to work. But, now I can't mount any of the drives. The NAS hasn't been updated. The NAS is running Freebsd 9.1.0.1 - Sandstorm (revision 775). I have SMB 2.0 enabled on the NAS.

    From the command line I've been trying to mount CIFS. I get
    mount error(22): Invalid argument


    The command I've been trying (multiple variants, ver=2.1, sec=ntlm, etc etc)

    mount.cifs //192.168.102.22/Media\ Share/Movies /mnt/nas_movies -o user=user
    Password for user@//192.168.102.22/Media Share/Movies: ****************
    mount error(22): Invalid argument
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


    I can't tell from the man page what I'm doing wrong.

    I've spent a few hours reading many posts and stackexchange but nothing is working.

    Is there something that I'm missing?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 25 2019, 07:20 AM - #Permalink
    Resolved
    0 votes
    Somt time ago I had to update the command on my Pi to:
    //server.howitts.co.uk/videos /mnt/server_videos cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=nick,password=my_password,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770,domain=home,vers=3.0 0 0
    Note the addition of the domain and vers parameters.Vers is the smb protocol and you may now find smb1 is being rejected for security reasons, but please make sure you have disabled "Windows 10 Domain Logons" in the Windows Networking Webconfig as it is no longer needed but will stop you using protocols above SMB1. I also had to add the domain - in my case the workgroup.

    Note I think you have an error in your command:
    //192.168.102.22/Media\ Share/Movies
    should be:
    //192.168.102.22/Media/Share/Movies
    The reply is currently minimized Show
  • Accepted Answer

    nuke
    nuke
    Offline
    Thursday, July 25 2019, 11:04 PM - #Permalink
    Resolved
    0 votes
    Thanks Nick.

    Couple of questions if you don't mind.

    Nick Howitt wrote:

    Some time ago I had to update the command on my Pi to:
    //server.howitts.co.uk/videos /mnt/server_videos cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=nick,password=my_password,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770,domain=home,vers=3.0 0 0
    Note the addition of the domain and vers parameters.Vers is the smb protocol and you may now find smb1 is being rejected for security reasons, but please make sure you have disabled "Windows 10 Domain Logons" in the Windows Networking Webconfig as it is no longer needed but will stop you using protocols above SMB1. I also had to add the domain - in my case the workgroup.

    I was trying to get the basic mount command to work before I started on the automount as it looks like it would be more challenging to debug as a first step.

    I can't find that setting in Windows Networking.

    I have following settings:
    Server Name: myServerName
    Printing: disabled
    Home Directories: enabled
    Force SMB1 Protocol: enabled
    WINS Support: disabled
    WINS Server: blank

    Mode
    Mode: Simple Server
    WINDOWS domain: COS

    I have only 1 windows PC and that is from work. I rarely connect to the server.

    I enabled Windows Networking so I could connect using a bunch of Macs. They have no problem connecting to the NAS using SMB, CIFS or AFP. I run TimeMachine backups to the server and for that I've been using CIFS on the Macs.

    I haven't enabled NFS on the NAS as I hear it was slower than SMB, AFP or CIFS.

    Note I think you have an error in your command:
    //192.168.102.22/Media\ Share/Movies
    should be:
    //192.168.102.22/Media/Share/Movies

    Thanks for the suggestion. I may have gotten it wrong but there is a space between the two words "Media" and "Share" ie. "//192.168.102.22/Media Share/Movies" The spaces always mess me up. Should it be
    Media\ Share
    or
    Media Share
    or
    "Media Share"
    ? I'm using BASH.

    Thanks for your help.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 26 2019, 07:21 AM - #Permalink
    Resolved
    0 votes
    OK. "Windows Domain Logons" was renamed to "Force SMB1 Protocol". You have it enabled so you have to force SMB1 in the mount.cifs command but we can see virtually no good reason to have "Force SMB1 Protocol" enabled any more, but were too scared to remove it when we renamed it in case there was an edge case which was important. I suggest you remove it at which point it will disappear from the webconfig. It can be added back at the command line if necessary.

    If you have a space in your file path, try quoting the full path:
    mount.cifs '//192.168.102.22/Media Share/Movies' /mnt/nas_movies -o user=user
    or try everything:
    mount.cifs '//192.168.102.22/Media Share/Movies' /mnt/nas_movies -o user=user,domain=cos,vers=3.0
    Another reference I bumped into said to change the " " to "\040"
    The reply is currently minimized Show
  • Accepted Answer

    nuke
    nuke
    Offline
    Sunday, July 28 2019, 09:24 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    OK. "Windows Domain Logons" was renamed to "Force SMB1 Protocol". You have it enabled so you have to force SMB1 in the mount.cifs command but we can see virtually no good reason to have "Force SMB1 Protocol" enabled any more, but were too scared to remove it when we renamed it in case there was an edge case which was important. I suggest you remove it at which point it will disappear from the webconfig. It can be added back at the command line if necessary.

    Done.

    Nick Howitt wrote:If you have a space in your file path, try quoting the full path:
    mount.cifs '//192.168.102.22/Media Share/Movies' /mnt/nas_movies -o user=user
    or try everything:
    mount.cifs '//192.168.102.22/Media Share/Movies' /mnt/nas_movies -o user=user,domain=cos,vers=3.0
    Another reference I bumped into said to change the " " to "\040"


    I have tried all sorts of different combinations of options but no luck so far. I have to take a break today.

    I've tried all the vers options and only vers=2.0 seems to do anything better. Together with sec=ntmlv2 I get
    mount error(13): Permission denied
    So I think I've made some progress. :-(

    Oh frig. When I turned the nas log to debug, it said
    FAILED with error NT_STATUS_WRONG_PASSWORD


    I reset the password when I started this challenge because I couldn't remember the original password. Apparently the change didn't work because when I removed the password (ie. blank) it connected. Put back the original password and all is OK.

    Now I'll try the automount.

    @Nick, thanks for your patience on this. How incredibly stupid on my side. I should have tried to reset the password a few iterations earlier.
    The reply is currently minimized Show
Your Reply