INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is automounted SMB share needed for MC to access media  (Read 3914 times)

pepar

  • World Citizen
  • ***
  • Posts: 248
Is automounted SMB share needed for MC to access media
« on: January 04, 2020, 12:42:11 pm »

I have my media stored on an unRAID server and have an Intel NUC running Debian 10 and MediaCenter to serve as my MC Media Server. I can access the shared folder from the Debian 10 desktop with no problems. But I am not able to automount the darn share. If I need to, I will dig deeper into the problem but before I do that I thought I'd ask if it's necessary.

Does the SMB share need to be mounted MC to access it?

Jeff
Logged
"I like the future, I'm in it." F. Theater

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: Is automounted SMB share needed for MC to access media
« Reply #1 on: January 04, 2020, 11:24:06 pm »

With my limited Linux experience, yes.

I usually set up my win 10 share to mount in the home/user/Music folder at boot.

However, if you can browse in Tools/Import/Configure Auto-Import to where the media files are, I assume you could use it.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Is automounted SMB share needed for MC to access media
« Reply #2 on: January 05, 2020, 09:29:32 am »

Automounted? No. Mounted? Yes.

Are you having issues mounting it manually?

Code: [Select]
mount -t cifs -o username=user_name //server_name/share_name /mnt/
Logged

pepar

  • World Citizen
  • ***
  • Posts: 248
Re: Is automounted SMB share needed for MC to access media
« Reply #3 on: January 05, 2020, 01:49:48 pm »

No problem mounting manually, but can’t get it to auto mount. Am using Buster so I have seen that an additional systemd option must be used in fstab. It must be my syntax. Every blog/forum/tutorial assumes more Linux fu than I possess.

I want to automount to make it headless ..
Jeff
Logged
"I like the future, I'm in it." F. Theater

erviv

  • World Citizen
  • ***
  • Posts: 220
Re: Is automounted SMB share needed for MC to access media
« Reply #4 on: January 05, 2020, 02:03:12 pm »

I expect you will need to auto mount to run headless.
As an aside I am not running headless and neither mount or auto mount my drive. However I do have to open my drive in the desktop file manager of buster so that MC can see the drive.  I suppose this technically is a mount, however once opened via the file manager I can use my drive from its networked location  for my library in MC.
I have not been successful in auto mounting my network drive. I think you are on the right path with using systemd.
Logged
MacBook Pro i5 2.3Ghz 8 GB (early 2011) 1Tb SSD; 3 Raspberry pi’s 4 and 2@ 3B (o/s: Buster).

pepar

  • World Citizen
  • ***
  • Posts: 248
Re: Is automounted SMB share needed for MC to access media
« Reply #5 on: January 05, 2020, 02:19:51 pm »

Admittedly, I am a Windows guy and only use Linux for unRAID, Media Center Library Server and clients, and certain specific things like Clonezilla, PartEd, etc. I am boggled by how hard it is to do what I would think isquite a common task, i.e. map a network drive. Why it is so darn elusive I haven’t a clue.
Logged
"I like the future, I'm in it." F. Theater

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Is automounted SMB share needed for MC to access media
« Reply #6 on: January 05, 2020, 03:45:08 pm »

add it to /etc/fstab

google cifs fstab for articles to explain further, e.g. http://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/

an example line, some extra lines added to make it writeable (as I rip to such locations from the box)

Code: [Select]
//192.168.1.123/films /media/films cifs file_mode=0777,dir_mode=0777,username=someuser,password=somepass,uid=1000,gid=1000 0 0

Logged

pepar

  • World Citizen
  • ***
  • Posts: 248
Re: Is automounted SMB share needed for MC to access media
« Reply #7 on: January 05, 2020, 05:23:52 pm »

add it to /etc/fstab

google cifs fstab for articles to explain further, e.g. http://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/

an example line, some extra lines added to make it writeable (as I rip to such locations from the box)

Code: [Select]
//192.168.1.123/films /media/films cifs file_mode=0777,dir_mode=0777,username=someuser,password=somepass,uid=1000,gid=1000 0 0
Thx. Do I not need to use the "x-systemd.automount" option in that line? I am running Debian 10 Buster.
Logged
"I like the future, I'm in it." F. Theater

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: Is automounted SMB share needed for MC to access media
« Reply #8 on: January 05, 2020, 11:20:15 pm »

The following is one version of my fstab line. Since the file server is running MC on Win 10 I use it for all tagging, etc, and don't need write access for the linux machines, so this mounts the share read-only:

//192.168.1.106/Music    /home/user/Music  cifs   auto,user,credentials=/home/user/netlogin  0  0  _netdev
 
You must have samba and cifs-utils installed.

ip is of share server
Music is server share name
This mounts the folder into the user's Music folder (make sure it exists)
The credential file "netlogin" can be named anything just match name and path to the fstab line.

Format and content of "netlogin" file:
--------------------
username=xx
password=xx
--------------------
The values xx must match server's share login credentials.

I was using _netdev when using a machine with wifi, to wait for network.

In a terminal you can run sudo mount -a to test live without rebooting. Keep the fstab file open in editor, save, test.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Is automounted SMB share needed for MC to access media
« Reply #9 on: January 06, 2020, 01:53:59 am »

Thx. Do I not need to use the "x-systemd.automount" option in that line? I am running Debian 10 Buster.
No. See the fstab section in the man for more details https://manpages.debian.org/buster/systemd/systemd.mount.5.en.html
Logged

pepar

  • World Citizen
  • ***
  • Posts: 248
Re: Is automounted SMB share needed for MC to access media
« Reply #10 on: January 06, 2020, 08:42:57 am »

Thanks for the help! I will be diving into Debian later today.

Jeff
Logged
"I like the future, I'm in it." F. Theater

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Is automounted SMB share needed for MC to access media
« Reply #11 on: January 06, 2020, 11:54:57 am »

Thanks for the help! I will be diving into Debian later today.

Jeff

The Arch Wiki is also a great resource even if you aren't using Arch: https://wiki.archlinux.org/index.php/samba#Automatic_mounting
Logged

pepar

  • World Citizen
  • ***
  • Posts: 248
Re: Is automounted SMB share needed for MC to access media
« Reply #12 on: January 06, 2020, 07:06:14 pm »

add it to /etc/fstab

google cifs fstab for articles to explain further, e.g. http://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/

an example line, some extra lines added to make it writeable (as I rip to such locations from the box)

Code: [Select]
//192.168.1.123/films /media/films cifs file_mode=0777,dir_mode=0777,username=someuser,password=somepass,uid=1000,gid=1000 0 0
We have a winner! I had been trying to use a hidden credentials file, but I really don't need to keep secrets. So your line, edited for my system, did the trick.

Thanks,
Jeff
Logged
"I like the future, I'm in it." F. Theater
Pages: [1]   Go Up