Page 1 of 1

Playing media from a NAS on RPi

Posted: Mon Apr 22, 2013 11:43 pm
by pigmonger
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.

Re: Playing media from a NAS on RPi

Posted: Tue Apr 23, 2013 6:39 am
by ripping
This is what you may want.
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.

Re: Playing media from a NAS on RPi

Posted: Tue Apr 23, 2013 5:08 pm
by Ottoman
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.

Re: Playing media from a NAS on RPi

Posted: Fri Apr 26, 2013 11:58 pm
by pigmonger
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!

Re: Playing media from a NAS on RPi

Posted: Sat Apr 27, 2013 1:14 am
by crackers
Samba is the CIFS implementation for Linux, if that helps.

Re: Playing media from a NAS on RPi

Posted: Sat Apr 27, 2013 11:17 pm
by pigmonger
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 ( 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 // /storage/media
mount: mounting // 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 (28.44 KiB) Viewed 4726 times

Re: Playing media from a NAS on RPi

Posted: Sun Apr 28, 2013 1:06 am
by pigmonger
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!