Kodi Community Forum

Full Version: save to nas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a WD Mycloud on the same network with my RPi2 running openelec. I would like to mount the nas so that I can save my recorded shows to it in TVheadend. I have mounted my nas drive in raspbian before and I wanted to double check my line.

Is mounting a drive the same in raspbian as it is in openelec?

According to my raspbian knowledge I would do the following in openelec

nano /etc/fstab
//192.168.2.8/public/Shared Videos/Recorded TV /storage/recordings cifs guest,workgroup=Workgroup,users,auto,user_xattr 0 0
Save and exit
mount -t

do I have that right? I appreciate any help or suggestions you can offer.
Thanks,
In OpenElec, you can also lodge the mount command in an autostart.sh file - that way you don't have to hack fstab, which will possibly get over-written on a future upgrade (I don't know that, I'm just suspicious).

See here: http://wiki.openelec.tv/index.php?title=Autostart.sh

You can also use systemd to do it: http://wiki.openelec.tv/index.php?title=...ork_shares

I won't comment on your mount syntax, as I'm a "suck it and see" kind of guy when it comes to exports and mounts: I play with it all until it works, then Never Touch It Again. It looks okay, depending on how it's exported - although I'd probably use NFS rather than CIFS just because you're using Linux-to-Linux, but you won't see any material difference.
With the good Prof's help I got a WD Mybook live to mount via NFS using the autostart.sh, and have Tvheadend saving recordings to it successfully. For reference, this is the syntax that's working for me:

Code:
#!/bin/sh
(sleep 30;
mount -t nfs IPADDRESS:/nfs/Public/KodiRecordings /storage/recordings -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiBackups /storage/backup -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiZipFiles /storage/zips -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiPicons /storage/picons -o nolock;
)&

But you may find the WD MyCloud works differently than the WD MyBookLive, as I did when adding music and movies, and perhaps you can help me...

I've just setup a system for a friend (the first one I ever did other than my own), and he has a WD MyCloud and an RPi2, using OpenELEC (so same system as you). He's not using PVR, but uses the NAS to store content and I've been unable to scan-in the content using NFS - and had to use SMB (which I understand is a less desirable way to do it than NFS). Did you manage to add content using NFS? If so, how?
If you *only* need content in Kodi, then there's no benefit in mounting the remote system as you boot, as Kodi is perfectly happy with its own NFS client. So, if you can't navigate to the shared directory through Videos -> Add Source -> NFS -> browse, then I'd raise a suspicious eyebrow at the export rather than the client.

You will need to mount the remote filesystem if you're using PVR, utorrent or similar on the OE box and want to save the files to the remote system, however.

Re: SMB/CIFS vs NFS - NFS has the edge on speed, but you'd never really notice it unless you're doing significant, repeated file transfers. For streaming, I'm not sure you'd really care... I prefer NFS because it feels 'right' on a Linux setup, but I suspect that's a fairly baseless conclusion.
Thanks that really helped a lot.

here are my steps and tell me if you see where I went wrong.

I ssh into Openelec with putty;

nano autostart.sh

#!/bin/sh
(sleep 30;
mount -t cifs -o guest,rw //192.168.2.8/Shared Videos/Recorded TV /storage/recordings;
)&

Since my WDmycloud does not have a password I wrote in guest.
Once finished I reboot and check storage/recordings and look for a video that I placed in the nas in that spot. Nothing.
Am I missing something?
(2015-06-30, 00:23)Prof Yaffle Wrote: [ -> ]If you *only* need content in Kodi, then there's no benefit in mounting the remote system as you boot, as Kodi is perfectly happy with its own NFS client. So, if you can't navigate to the shared directory through Videos -> Add Source -> NFS -> browse, then I'd raise a suspicious eyebrow at the export rather than the client.

You will need to mount the remote filesystem if you're using PVR, utorrent or similar on the OE box and want to save the files to the remote system, however.

Re: SMB/CIFS vs NFS - NFS has the edge on speed, but you'd never really notice it unless you're doing significant, repeated file transfers. For streaming, I'm not sure you'd really care... I prefer NFS because it feels 'right' on a Linux setup, but I suspect that's a fairly baseless conclusion.

For my friends system I was going to mount his backup folder only to on the NAS, but the same syntax doesn't work on th MyCooud as the MyBookLive. For adding content to his system I cannot do it using NFS - when I click Add Source>NFS>IPADDRESS>I cannot get down further to ththe shared folder - as I can if I use SMB and I wonder if Drhoeh can?
(2015-06-30, 02:48)drhoeh Wrote: [ -> ]Thanks that really helped a lot.

here are my steps and tell me if you see where I went wrong.

I ssh into Openelec with putty;

nano autostart.sh

#!/bin/sh
(sleep 30;
mount -t cifs -o guest,rw //192.168.2.8/Shared Videos/Recorded TV /storage/recordings;
)&

Since my WDmycloud does not have a password I wrote in guest.
Once finished I reboot and check storage/recordings and look for a video that I placed in the nas in that spot. Nothing.
Am I missing something?

I don't know, I don't really understand the syntax, just found it by trial and error with the Prof's help. Did you try the exact same lines that work on my MyBookLive?

Also have you added your content using NFS, if so how?
I'd play with the mount command from the command line - there's no need to reboot - just issue it in a ssh session and then use mount to check everything. Repeat until you know what you're doing: it's dependent as much on how it's exported as it is on the mount command from the client. That'll be the issue that gshodg has with "I cannot get down further", it's almost certainly not exported properly. There will be settings on the WD box that determine how it's shared, with what users, what protocols, what login credentials, and so on.

When you're happy, then put that command into the autostart/systemd config.
(2015-06-30, 00:12)gshodg Wrote: [ -> ]With the good Prof's help I got a WD Mybook live to mount via NFS using the autostart.sh, and have Tvheadend saving recordings to it successfully. For reference, this is the syntax that's working for me:

Code:
#!/bin/sh
(sleep 30;
mount -t nfs IPADDRESS:/nfs/Public/KodiRecordings /storage/recordings -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiBackups /storage/backup -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiZipFiles /storage/zips -o nolock;
mount -t nfs IPADDRESS:/nfs/Public/KodiPicons /storage/picons -o nolock;
)&

But you may find the WD MyCloud works differently than the WD MyBookLive, as I did when adding music and movies, and perhaps you can help me...

I've just setup a system for a friend (the first one I ever did other than my own), and he has a WD MyCloud and an RPi2, using OpenELEC (so same system as you). He's not using PVR, but uses the NAS to store content and I've been unable to scan-in the content using NFS - and had to use SMB (which I understand is a less desirable way to do it than NFS). Did you manage to add content using NFS? If so, how?

I wish I could use that but my cloud does not use nfs. I have been trying to mount the drive as cifs without much success.

Where did you save the autostart.sh and did you enter in the code using nano?
(2015-06-30, 15:41)drhoeh Wrote: [ -> ]I wish I could use that but my cloud does not use nfs. I have been trying to mount the drive as cifs without much success.

Where did you save the autostart.sh and did you enter in the code using nano?

Ah, so that's why on my friend's system I can't add content using NFS. Strange as my MyBookLive has been replaced by the MyCloud, so no NFS would be a step backwards - maybe as Prof says there's a setting on the WD admin somewhere.

The autostart.sh files lives in a folder called Configfiles. I created/edited it using Notepad++.
I put autostart.sh into the configfiles.

In autostart.sh I have

#!/bin/sh
(sleep 30;
mount -t cifs -o guest,rw //192.168.2.8/Shared Videos/Recorded TV /storage/recordings;
)&

If I were in raspbian i would mount -a. I don't know how to test the mount so I restart the system. nothing.
1. how do I test my mount?
2. how do I add a cifs mount if I don't have a password? I assumed to add guest.
1. You test the mount by issuing that command at the command line. When you ssh in, you're root, so you can use mount directly.

That also has the benefit of perhaps telling you why it's not working - a reboot will write something to dmesg/syslog, but a command-line mount should tell you immediately what happened (or didn't happen).

2. Security is determined by the export, not the client. So any user/password is set on the WD box.

It looks like the MyCloud does support NFS, but not out of the box - only CIFS and AFP. If you want NFS, you have to ssh in (which apparently voids your warranty - WTF??) and enable it from the command line. I may have read some rubbish on the Internet, though, but have a look if you want to and see what you can find.

If you want to stick with SMB/CIFS, then you need to log into the WD box and see how that's configured - what username, what password (if any).

Looking at this manual, it looks like you can have either public (universal) or private (named user) shares - so select which you want and work from there.
I got it!
Thanks for all the help.
I had to go into WD Mycloud and create a user account and a password
and that was it. I just entered that into my autostart.sh and it worked.
Thanks for all the help.
Prof, good call looking into the nas.
I got it. I think?
I had to go into the My Cloud and create an account with a password.
I then then put that into
Thanks Again.
We are good.
Pages: 1 2