• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

Best way to share content with NAS??

Kev_w

Member
Hello All,

What do you guys thing the best way the share content with a NAS (buffalo linkstation)? I've been looking around and there seems to be a few different options open as i'm running the custom firmware. The end game would be for me to be able to mount the NAS shares as if they were a USB drive fitted to the Hummy. I want to be able to copy files to the NAS and decrypt them using the hummy remote and be able to stream backed-up content.

I'm already able to stream content from the linkstaion using its DLNA client but think i'd get better functionality if I could mount shares directly.

So what do you reckon? CIFS? SMB? NFS?

Any advice at all would be greatly appreciated.

Cheers,

Kev
 
I don't think it matters too much whether you use CIFS or NFS, although I think drutt has mentioned that NFS seemed faster. They are both setup in a similar way on the Hummy. Perhaps the best way is to try them both out and see which performs best with your NAS.

The basic procedure is as follows (you can substitute the server ip address for the servername in the mount commands below if name resolution is not setup):

CIFS

Install the cifs package.

Make a directory under /media:
Code:
mkdir /media/NAS

Mount the share:
Code:
mount -t cifs //servername/sharename /media/NAS -o username=abc,password=def

These commands should be placed in a startup script in order to survive a reboot but you can try them out on the command line.

Files can be copied and decrypted in one step by copying them to the server using the OPT+ menu. In order to playback files on the server it is useful to create a second mount under "/media/My Video". This will then appear in the Hummy's recorded file list.

Code:
mkdir "/media/My Video/NASPlay"
mount -t cifs //servername/sharename "/media/My Video/NASPlay" -o username=abc,password=def

Note that this entry must only be used for playing back. When copying to the NAS always use the OPT+ function to copy to the first mount.

NFS

The NFS setup is similar to CIFS and the mounted directories will appear exactly the same in the Humax UI.

Install the portmap package

Code:
mkdir /media/NAS
mount -t nfs servername:/exportedDirectory /media/NAS
mkdir "/media/My Video/NASPlay"
mount -t nfs servername:/exportedDirectory "/media/My Video/NASPlay"
 
xyz321 I'm liking the look of this a lot - but as a bit of a dunce on some of this can I be the one to ask the stoopid questions (I'd like to think I'm doing this on behalf of those afraid to ask but actually no it's just because I'm a bit thick on this sort of stuff!!). I think the answer to the first three questions is yes based on your previous post but I wanted to make sure I'd understood it correctly...

Does doing this make my NAS drive visible in the USB list when you press the blue storage button when in the media menu?

And then navigable by the folder structure however that's constructed on the drive?

Presumably it still means the server bit of my NAS will still make the content visible over the network to other clients like it does now.

The commands you gave in your post are entered in Telnet presumably, I'm OK with copying those but the bit about creating a startup script - how do I do that exactly?

Thanks very much
 
What is the essential difference between cifs, smb, and nfs?
CIFS is essentially a newer version of SMB but with additional features (large file support etc.). It is the protocol used for sharing files on Windows machines. NFS was created way back when to allow unix machines to share file systems over the network.
 
Does doing this make my NAS drive visible in the USB list when you press the blue storage button when in the media menu?

And then navigable by the folder structure however that's constructed on the drive?
The mounting of network drives works in a similar way to the virtual disk (since that also mounts a "drive" under /media). If you have a usb drive plugged in then the new mount will be seen using the blue button (and you wouldn't then need the second mount.) Without a USB drive plugged in the first of these mounts can only be seen in the OPT+ menu. The second of the mounts in my post above will always appear with or without a USB drive connected but should not be used to copy files to the NAS.

When the mount is visible, it will be navigable.

Presumably it still means the server bit of my NAS will still make the content visible over the network to other clients like it does now.
Yes, other clients should be unaffected unless you have to change settings on the NAS to make it work.

The commands you gave in your post are entered in Telnet presumably, I'm OK with copying those but the bit about creating a startup script - how do I do that exactly?
I will come back to this later...
 
Thanks xyz321,

I've been able to mount the NAS share using cifs and it works just as I hoped! I am having problems setting up the startup script though. I've used the guide here - http://hummy.tv/forum/threads/mounting-drives-using-cifs.590/ but cant get my script to run. I have probably just formatted the script text wrong so should be able to get it working with a bit of trial and error...

I would also like to try out NFS if drutt says he saw a performance improvement but can't get that to mount at all. After inputting the commands given above telnet then outputs something like "mount failed errgo access denied" is this something I would have to set up on the NAS? How come cifs need a pasword but NFS doesn't?
 
The usual things that stop a Linux script are having DOS line endings (did you create the script in a Windows editor and forget to patch up afterwards?) or the wrong file permissions (did you make it executable in the file properties?) or not having the line at the start which says which shell to execute the script in. Don't ask me the detals though!
 
I would also like to try out NFS if drutt says he saw a performance improvement but can't get that to mount at all. After inputting the commands given above telnet then outputs something like "mount failed errgo access denied" is this something I would have to set up on the NAS? How come cifs need a pasword but NFS doesn't?

CIFS/SMB are predominantly user based (Windows technologies) whereas NFS is sytem-to-system. You usually need to set up the access on your NAS using the IP address or DNS name of the Humax, or allowing the whole of your network to access it.
 
OK so i'm getting there. I have made a script and placed it in /mod/etc/init.d named S99mountme and can run it using command ./S99mountme - this at least makes mounting the share a one command operation, however, it does not pick up on startup.

So, I tried putting it in a network check like so...

[ "$1" = start ] || exit 0
(
while [ ! -f /tmp/if-up ]; do
echo "Mountme: waiting for network."
sleep 1
done
mkdir /media/NAS
mount -t cifs //xxx.xxx.xxx.xxx/share /media/NAS -o username=username,password=password
mkdir "/media/My Video/Backup"
mount -t cifs //xxx.xxx.xxx.xxx/share "/media/My Video/Backup" -o username=username,password=password
) &

But then the script doesn't work at all, I dont get any error messages when I type ./S99mountme but also don't get a "waiting for network" message. Any ideas?
 
Probably staing the obvious here but are you runnng the script with './S99mountme start'?

Ha... Never assume that I know what I'm doing! I wasn't typing "start" to run the script from telnet. Any idea why it doesn't run at startup?
 
Are you sure it is not running on startup? Try 'cat /tmp/modinit.log' to see any startup errors. Also type 'mount' to show the mounts.
 
I will come back to this later...

Hi xyz321 - did you ever get a chance to look at a how to for the startup script? Or even something in the webif setttings maybe????? I know it's cheeky to ask a volunteer for more but I would really like to be able to get to my NAS folders as easily as it is on the HDD or USB (I hate all that DLNA navigation mullarkey - NasDrive/Video/All Video/All Folders...aaarrggghhh just get me to my recordings!!!)

I saw this post http://hummy.tv/forum/threads/mod-helper-script-for-network-shares.663/ but I can't tell if that is an answer to this, and even if I could tell I don't know how to go about getting a script to run at all - let alone automatically!!
 
Hi xyz321 - did you ever get a chance to look at a how to for the startup script? Or even something in the webif setttings maybe????? I know it's cheeky to ask a volunteer for more but I would really like to be able to get to my NAS folders as easily as it is on the HDD or USB (I hate all that DLNA navigation mullarkey - NasDrive/Video/All Video/All Folders...aaarrggghhh just get me to my recordings!!!)
I did start a webif settings plugin but it's only really half finished at the moment.
 
I saw this post http://hummy.tv/forum/threads/mod-helper-script-for-network-shares.663/ but I can't tell if that is an answer to this, and even if I could tell I don't know how to go about getting a script to run at all - let alone automatically!!

I'll try and put this into a package sometime - its working well for me, and allows configuration of ip addresses etc on the box via some named "settings" folders - via webif would be good but I'll leave that to the webif / jim experts ;). I was just waiting for any feedback, especially whether it worked on the HDR, which I don't have so can't test.

Steve
 
Hi, I note this thread has not been updated for a while - just wondering if there is any news on a possible Webif plug for setting up CIFS.

I have tried setting it up from Telnet and got it working but failed to make it "sticky" and autorun etc.
 
Back
Top