Page 2 of 2

Re: cifs samba mounting.

Posted: Thu May 24, 2012 11:40 pm
by gegs
I tried with FAT32 but lots of "cant preserve ownership of <file name here>: Operation not permitted" errors when I tried to copy the cache to it. At least the stick is writeable because I can now create folders on it, which is a start.

--- EDIT ---

I checked this morning and the cache had copied to the USB stick. Last night it looked like nothing had copied over in WinSCP but this was obviously just a refresh problem. The error I got seems to be one of changing permissions on the files copied. I'm not sure if this will cause me problems but I'll try symlinking to the USB cache some time over the weekend.

Thanks for your help with this Max. If I can get this working I'm sure it'll be very helpful to forum members; loads of people have posted about mounting a NAS in LMS and if I can do it (with your help) anyone can.

Re: cifs samba mounting.

Posted: Sat May 26, 2012 9:59 am
by gegs
I followed all the other steps in your instructions Max and the contents of the USB cache folder were indeed listed by 'ls' after I'd set up the symlink. Unfortunately LMS wouldn't start up with the symlinked cache folder. Maybe something to do with the permissions problem I encountered writing the files to the USB stick initially.

Re: cifs samba mounting.

Posted: Sat May 26, 2012 10:45 am
by Max
Hi

OK, try this:

cp /etc/fstab /etc/fstab.backup
vi /etc/fstab

(enter the following line at the bottom)

/dev/sda1 /mnt vfat rw,user,noauto,umask=000,uid=20,gid=20

(Note: uid and gid user id and group id, are of the squeezebox server from the /etc/passwd and /etc/group files, should be the same for yours.)

exit and save.

Stick the usb in.

Wait a couple of seconds.

Type:

umount /mnt

then

mount /mnt (If anyone knows how to get the automounter in the joggler to mount what is in the fstab please let me know.)

/mnt should now be owned by the squeezebox user (ls -la /).

Give the copy and symlink bit another go.

Hope that make sense.

Re: cifs samba mounting.

Posted: Sun May 27, 2012 9:27 am
by joh
On the newer busybox build I changed the SMB mount command to

from

OLD

Code: Select all

/bin/mount -t cifs //10.10.10.10//music /media/music/smbshare -o user=auser,password=apass,iocharset=utf8  
NEW

Code: Select all

/bin/mount -t cifs //10.10.10.10\\music /media/music/smbshare -o user=auser,password=apass,iocharset=utf8  
Then it works again. It looks a bit odd.

Re: cifs samba mounting.

Posted: Mon May 28, 2012 11:01 am
by gegs
@Max - I'm going to give your suggestions a spin later this week but probably more out of curiosity than anything else.

If the USB stick won't automount at boot it won't be much use to me. My family use Squeezeplay regularly and would be unfamiliar with the concept of mounting/unmounting a drive. If LMS won't start properly without intervention it would drive them nuts.

Streaming from my NAS would be the icing on the cake, but I may have to rely on Last.fm and Triode's excellent Spotify plugin for most of my music needs until someone posts an automount solution.

The best solution IMO would be to have SqueezePlay OS and LMS running from an 8GB or 16GB stick if this was possible. I may even try to install LMS on a stick with roobarb's SqueezePlay OS; it apparently has apt-get capability and a command line interface tool. I may even be able to install MPlayer to play WMA streams. Roobarb may be able to confirm if this is feasible; I've posed the question on the SqueezePlay OS thread.

-- EDIT --
wrong about the CLI tool but commands can be run using SSH on Squeezeplay OS.

Re: cifs samba mounting.

Posted: Fri Aug 17, 2012 10:20 pm
by monkeydogcat
This thread is linked from the first post in the PnP III thread with the comment "cifs/samba shares can be made to work". Well, I can't make it work. I've never attempted it before now. I only loaded PnP III a week ago.

I've got the cifs.ko module and it's loaded

Code: Select all

# lsmod | grep cifs
cifs                  221428  0
# busybox
BusyBox v1.10.4 (2010-06-25 14:21:21 EDT) multi-call binary
That version of BusyBox confuses me. I have PnP III. This thread is linked from the PnP III thread, yet the first post in this thread seems to say the problem with not being able to mount cifs is because of a problem in busybox 1.19.4. Which I don't have. As far as I can see, PnP III comes with busybox 1.10.4.

I've tried many variants of the mount command I've lost track. Either they exit with no output but the mount doesn't work (checking the exit code of the mount command shows it's 1) or I get "mount: mounting blah on foo failed: Invalid argument"

A post earlier in this thread says
I noticed that the "dummy" argument is not so "dummy", as it is assumed as the name of the remote share.
But I've no idea what that's supposed to mean. The example command after it uses the argument 'MyMusicLibrary' but I have no idea how one determines what the name of the remote share is.

The cifs share is from my router which can share a drive attached to it's USB port. I can mount it on my Mac and by Android tablet. There's no username/password required, or indeed even set up so I've been using '-o guest' with the mount command.

The IP address is 192.168.0.1 when I mount that on the Mac or tablet I get a directory called Volume1 and that contains the directories that are in the root of the USB drive called Music and Video.

Can anyone explain to me how to get this mounted on my Joggler?

Re: cifs samba mounting.

Posted: Fri Aug 17, 2012 11:26 pm
by monkeydogcat
After a a bit more flailing around I discovered this works for me

Code: Select all

# mount  -t cifs //192.168.0.1/Volume1 /media/netstorage/ -o ro,username=guest,password=guest

Re: cifs samba mounting.

Posted: Sun Aug 19, 2012 5:38 pm
by JimbobVFR400
Glad it works. However I might suggest adding
,_netdev
On the end of your mount command. This ensures that it'll wait until the network connection is available before mounting. Before I added this option on mine I found occasionally the mount would fail if the network wasn't available and would then require either running the mount manually via SSH or a reboot. Since adding _netdev I've not had any problems.

Re: cifs samba mounting.

Posted: Sun Sep 02, 2012 4:24 pm
by danjog2
Please have pity on a old noob?

I've got a winscp connection to my joggler and really want to get my NAS linked. Can someone gently explain which lines of code go where and how I do that?
I've downloaded the cifs.ko module which is sitting in / on the joggler. My NAS lives at 192.168.1.130 the share is called \\LS-CHLF57\Share and the user name is admin and the password is ******

Thanks for your patience.