pigmonger
Posts: 4
Joined: Mon Apr 22, 2013 11:38 pm

Playing media from a NAS on RPi

Mon Apr 22, 2013 11:43 pm

Obviously this can be done, but I set up a NAS at home for the first time and don't know very much about what file system should be used and so on. Does anyone know of a guide that shows how to set up a NAS using free software so that the files are accessible from a RPi as well as Windows workstations?

I'm thinking it needs to be a SAMBA file system but I already have FreeNAS set up so I was hoping to use that if it's possible. To be clear, I'm not using the RPi as the NAS. It is a stand alone box I built that only serves as a NAS.

ripping
Posts: 32
Joined: Wed Mar 14, 2012 10:55 am
Location: New Zealand

Re: Playing media from a NAS on RPi

Tue Apr 23, 2013 6:39 am

This is what you may want.
http://elinux.org/R-Pi_NAS
Shows how to set up a Samba server etc and how to connect to it.
I've set up a Raspi NAS with 3Tb H/D attached that serves music and movies to my network, as well as operating as a secondary backup. works tip top!
But maybe you're more interested in the client end. For music I use mpd on two raspi's, for movies I use Openelec on another 2 raspi's. If your NAS is already set up, it is trivial to access that with any network attached Raspberry Pi.
You will get endless hits using the forum search or Google.

Ottoman
Posts: 9
Joined: Fri Jan 25, 2013 3:23 am

Re: Playing media from a NAS on RPi

Tue Apr 23, 2013 5:08 pm

What hardware do you have for the NAS? You can use an old PC, put some hard drives in it and use something like NAS4Free for FreeNAS. Those will even boot from a USB stick so you can use all the drives for storage. Then in your NAS configuration, you can use SAMBA or NFS to share files, or better yet both. Then your NAS just appears as a network share and you can point your RPi to is (using XBMC or similar) and map a drive from your PC also. I have a commercial NAS (QNap). I have it sharing via both NFS and Samba. I use NFS with the RPi because NFS has slightly less network overhead then Samba. But I need to enable Samba also for ease in connecting my PC to the NAS.

pigmonger
Posts: 4
Joined: Mon Apr 22, 2013 11:38 pm

Re: Playing media from a NAS on RPi

Fri Apr 26, 2013 11:58 pm

Thanks for the replies. The NAS is already set up. I used an old Pentium 4 running FreeNAS from a USB stick. The part I'm having trouble figuring out is how to configure FreeNAS so that I can read/write from my Windows 8 box while also being able to access the files from the RPi. It sounds like I'm on the right track, just need to do some more reading about configuring the NAS.

If I create a CIFS share, is that roughly the same as Samba? Or more importantly, will the RPi be able to read the files from a CIFS share?

I appreciate the help!

User avatar
crackers
Posts: 55
Joined: Fri Dec 28, 2012 7:45 am

Re: Playing media from a NAS on RPi

Sat Apr 27, 2013 1:14 am

Samba is the CIFS implementation for Linux, if that helps.

pigmonger
Posts: 4
Joined: Mon Apr 22, 2013 11:38 pm

Re: Playing media from a NAS on RPi

Sat Apr 27, 2013 11:17 pm

Thanks for the reply, crackers. I eventually figured that out after doing some more reading. Now I'm trying to figure out how to mount the CIFS share via SSH. I don't know what to use for 'device' and 'dir' when running the mount command. I think device should be the IP of the NAS plus the path of the share (192.168.1.107/mnt/A) and dir should be the directory that the mounted file system shows up as on the RPi. Here is the mount command I tried and the error I got:

mount -t cifs -o username=[username],rw //192.168.1.107/mnt/A /storage/media
mount: mounting //192.168.1.107/mnt/A on /storage/media failed: No such device or address

Unfortunately, I'm doing something wrong because this isn't working. The username I'm using has full read/write/execute permission on the NAS. I attached a screenshot of my CIFS shares in FreeNAS. Anyone have advice?
CIFS_Shares.jpg
CIFS_Shares.jpg (28.44 KiB) Viewed 4674 times

pigmonger
Posts: 4
Joined: Mon Apr 22, 2013 11:38 pm

Re: Playing media from a NAS on RPi

Sun Apr 28, 2013 1:06 am

Never mind, I figured out what I was doing wrong. The 'device' argument should be the IP plus the name of the share, rather than the path of the share.

It's working like a charm now. Thanks for the help!

Return to “Media centres”