Map HDA shares to NAS shares

andrebaros
Posts: 6
Joined: Thu Jan 14, 2010 11:48 am

Map HDA shares to NAS shares

Postby andrebaros » Thu Jan 14, 2010 11:57 am

Now that the server is running, my Buffalo NAS is finally behaving properly, since it's much bigger than the drive in the server I would like to keep my data there, can I map the HDA shares to the NAS shares? I already gave the NAS a static IP, so it's easy to map, but it would be nice to have the HDA see those shares as it's own.

Thanks,
Andre

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Map HDA shares to NAS shares

Postby cpg » Thu Jan 14, 2010 2:42 pm

you can use mount.cifs to mount your NAS shares via samba into your HDA. then you can create shares to see them!

see an example in the sharing to linux wiki page.

just to be clear, this page is about mounting the shares from an Amahi HDA to linux (ubuntu), but you can use the same concept to mount your shares in the NAS to your Amahi HDA.

we would like to get more community participation ... it would be great if you could write a page with the tips on how to do this, separate from the above. you are not the first one to try this!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

andrebaros
Posts: 6
Joined: Thu Jan 14, 2010 11:48 am

Re: Map HDA shares to NAS shares

Postby andrebaros » Thu Jan 14, 2010 5:29 pm

Thanks
I'll put what I find in the WIKI.

I found this tip on a linuxquestions.org, will it work with Amahi.

"u are looking in the right place. u must edit the /etc/fstab and place the following entry for it to work
//server/share /mnt/dir smbfs username=user,password=xxx 0 0"

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Map HDA shares to NAS shares

Postby moredruid » Fri Jan 15, 2010 1:53 am

depending on how the nfs shares are defined you can also mount them on your hda (with or without username).
say your NAS has hostname nas and nfs share pictures you could mount them as follows (if you want to use the amahi share):

Code: Select all

mount -t nfs nas:/pictures /var/hda/files/pictures
to have it mounted at boot time you need to add the mount point to your /etc/fstab:

Code: Select all

nas:/pictures /var/hda/files/pictures nfs defaults 0 0
you can also use the IP address instead of the hostname of the NAS
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Map HDA shares to NAS shares

Postby cpg » Fri Jan 15, 2010 2:08 am

@moredruid, i did not see mention of NFS. does the buffalo NAS have NFS by default?

@andrebaros, yes, that looks like it would work, if i am not mistaken.

please also note and also add this to the wiki article:

IMPORTANT:

- you want to test it with mount -a after doing changes to /etc/fstab, because failures will render your system stuck at boot time!
- similarly, if your NAS is offline when the HDA is booted, it may get stuck at booting
- if you get stuck at booting because of this, you will need to go into single-user mode and edit the fstab to a correct one!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Map HDA shares to NAS shares

Postby moredruid » Fri Jan 15, 2010 2:30 am

on the last comment of cpg: if you define the NFS shares in /etc/fstab the checks/issues are necessary.
you can also create an automount file, this is more graceful and forgiving for stale NFS handles.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

stueyboy
Posts: 101
Joined: Tue Mar 09, 2010 2:54 am

Re: Map HDA shares to NAS shares

Postby stueyboy » Tue Mar 09, 2010 3:12 am

depending on how the nfs shares are defined you can also mount them on your hda (with or without username).
say your NAS has hostname nas and nfs share pictures you could mount them as follows (if you want to use the amahi share):

Code: Select all

mount -t nfs nas:/pictures /var/hda/files/pictures
to have it mounted at boot time you need to add the mount point to your /etc/fstab:

Code: Select all

nas:/pictures /var/hda/files/pictures nfs defaults 0 0
you can also use the IP address instead of the hostname of the NAS
Hi there. Hope you can help. I'm about to build a system to serve media and like the OP, all of it is on a Buffalo NAS drive which thanks to this thread, I hope to re-route through the Amahi server without too much file transfering. I'm used to using Ubuntu to permenantly mount the drive shares using sifs and have username and password access to the shares as well.

Can anyone comment on where the user/pass section goes in the above quoted lines when editing fstab? (kind of assuming it goes in the same place as below) I have been using the following for each share when doing the permenant map, so is it any different in Fedora? I'm also assuming that nfs will be fine instead of cifs. Ta...

192.168.x.y/sharename /media/sharename cifs username=winusername,password=winpassword,iocharset=utf8,file_mode=0777,dir_mode=0777

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Map HDA shares to NAS shares

Postby moredruid » Tue Mar 09, 2010 3:55 am

NFS works differently from CIFS in that it doesn't require a user/password combination. The system name (or IP) is permitted (or denied) to connect on the NFS server. This has the advantage that the user/group permissions of the NFS client are used (in this case: the hda users) and not the locally defined users on the NFS server (in this case the NAS).
That said; NFS _can_ make use of user/passwords as well.

With CIFS you would need a 2nd authentication: one to connect to the NAS (with user/permissions there) and on the hda for access to your shares.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

stueyboy
Posts: 101
Joined: Tue Mar 09, 2010 2:54 am

Re: Map HDA shares to NAS shares

Postby stueyboy » Tue Mar 09, 2010 3:59 am

NFS works differently from CIFS in that it doesn't require a user/password combination. The system name (or IP) is permitted (or denied) to connect on the NFS server. This has the advantage that the user/group permissions of the NFS client are used (in this case: the hda users) and not the locally defined users on the NFS server (in this case the NAS).
That said; NFS _can_ make use of user/passwords as well.

With CIFS you would need a 2nd authentication: one to connect to the NAS (with user/permissions there) and on the hda for access to your shares.
Thanks for that. I'm assuming that cifs isn't installed as default and that nfs is. I'll try using nfs as the user for hda will be the same. Sounds like i should check the mount works anyway before I go rebooting thngs.

stueyboy
Posts: 101
Joined: Tue Mar 09, 2010 2:54 am

Re: Map HDA shares to NAS shares

Postby stueyboy » Wed Mar 10, 2010 3:23 am

OK, all nicely mapped out and working fine. I created a NAS sub folder in each media folder for the hda and mapped my buffalo NAS folders to these shares. Now that worked fine but on my xbox when I look for them with DLNA server running, I only see 4 movies, no music and no pictures fromt he NAS shares. Any ideas?

Appreciate this is probably a new topic so I will post it again if innapropriate for here.

Ta

p.s. Amahi seems to work very well and I really like it

Who is online

Users browsing this forum: No registered users and 10 guests