Page 1 of 2

cifs samba mounting.

Posted: Mon May 21, 2012 8:06 pm
by Max
Hi

I found the cause of the "failed: Invalid argument" error when mounting cifs mounts. The newer version of busybox I have on my jogglers, doesn't seem to have cifs support. The older version I have mounts my smb server fine.

BusyBox v1.19.4 (2012-03-09 19:01:08 CET) multi-call binary. Fails.

but:

BusyBox v1.10.4 (2010-06-25 14:21:21 EDT) multi-call binary. Works fine.

Luckily you can have 2 versions of busy box installed, have the new version still called "busybox" and just call the mount command through the busybox.old executable:

busybox.old mount -t cifs //server/media /mnt/tmp1/ -o user=max,password=XXX

Works fine.

I can email a copy of the old busybox, whilst I find somewhere to host it if anyone is interesting.

Max

Re: cifs samba mounting.

Posted: Mon May 21, 2012 8:51 pm
by offbeatdave
Would it be worthwhile me popping this on the PnP III build instead of the slightly new version it sticks on? Seems a bit daft to run a newer version if it's unnecessary and fails.

Re: cifs samba mounting.

Posted: Mon May 21, 2012 9:00 pm
by papaiannis
I tried the older busybox, as suggested by Max, and mount of cifs share works! Thank you so much, Max.
Alekos

Re: cifs samba mounting.

Posted: Mon May 21, 2012 9:13 pm
by Max
offbeatdave wrote:Would it be worthwhile me popping this on the PnP III build instead of the slightly new version it sticks on? Seems a bit daft to run a newer version if it's unnecessary and fails.
There are a huge amount more commands in the newer busybox.

There is a risk that if it is removed and replaced with the older version could cause stuff to break, if anyone has built their scripts around it.

Max

Re: cifs samba mounting.

Posted: Mon May 21, 2012 9:40 pm
by offbeatdave
True, although I think that it's only on PnP stuff that busybox is updated anyway. Could you e-mail the older version to me please so I can give it a go. I've PM'ed you.

Re: cifs samba mounting.

Posted: Mon May 21, 2012 9:56 pm
by HopmanUK
That is great news.. will wait a bit to see if it gets included in PnP.

Good work

Rich

Re: cifs samba mounting.

Posted: Mon May 21, 2012 10:49 pm
by Slingshot72
Alekos PM'ed me earlier tonight about Max's success. Im happy to report that it works here too and LMS on my Joggler is currently (and, much more quickly then it ever used to) indexing all the music files on my media server :D

Many thanks Alekos & Max.

Re: cifs samba mounting.

Posted: Tue May 22, 2012 5:24 pm
by Max
One thing to be aware of, if you are indexing large amounts of files with tagged artwork is the size of the database. The artwork.db file on my LMS server on a separate linux box is 2 gig.

You might want to move this off to a mounted memory stick and sym link it if it gets too big. or maybe even a mounted smb share.

I would guess there maybe a wear issue with the internal flash also and might bring it to a premature demise. ;-(

Re: cifs samba mounting.

Posted: Wed May 23, 2012 3:21 pm
by papaiannis
I discovered a solution to the cifs mount issue with the current version of busybox. You simply shall use the following (funny) syntax:

mount -t cifs <dummy argument=whatever you want> <mountpoint> -o user=<username>,password=<password>,unc=<path of the remote share>

Example:

mount -t cifs thisforumisgreat /mnt -o user=joe,password=1234,unc=//192.168.1.2/share

Have fun.
Alekos

Re: cifs samba mounting.

Posted: Wed May 23, 2012 5:02 pm
by Max
How very odd!

Great find.

:-)

Re: cifs samba mounting.

Posted: Wed May 23, 2012 6:41 pm
by papaiannis
I noticed that the "dummy" argument is not so "dummy", as it is assumed as the name of the remote share.

If the remote share is the source of media content to be streamed, I suggest to add the read-only option. This improves performances a lot. Increasing the read buffer cache is of help. This is what I do:

When installing the kernel module:
insmod cifs.ko CIFSMaxBufSize=32768

When mounting the remote share:
mount -t cifs MyMusicLibrary /mnt -o ro,rsize=32768,user=joe,pass=1234,unc=//192.168.1.6/share

Have fun.
Alekos

Re: cifs samba mounting.

Posted: Wed May 23, 2012 10:25 pm
by gegs
I've loaded the CIFS kernel module and set up a mount point etc. but my problem remains what it's always been when I've tried to set up a network share in LMS. After indexing for about 20 mins, LMS crashes.

My LMS is on the Joggler itself. Is there anything I can do to prevent the crashes?

Re: cifs samba mounting.

Posted: Wed May 23, 2012 10:53 pm
by pukington
Ok i'm being a plum (doesn't take much) and my brain is a bit numb. Probably from all the rum (what a poet eh).

I want to mount a windows share on my joggler, i'm lost at how to do it. I'm not a newbie to nix, but its been a while. Is it the typical setup with fstab and mount? As i say its been a while, you say about installing the cifs kernel, i've come across its not found so guess i'm needed to do the same. Care to share?

Cheers!

Re: cifs samba mounting.

Posted: Thu May 24, 2012 11:48 am
by gegs
The CIFS kernel is available from one of the links on Max's posting here:
http://www.jogglerwiki.com/forum/viewto ... 9957#p9957

I hope you have better luck than me. I have set up the kernel, loaded the module and mounted a share to /mnt/music on the Joggler. When The Joggler starts up, LMS starts to index music files but then crashes after 10 to 20 minutes (it varies). When LMS crashes I obviously lose all my plugins on Squeezeplay, so I've commented out the CIFS module and the code mounting the share in my S99boot.hacks file.

It would be great to get this working properly.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 12:35 pm
by Max
Are you running out of space for the LMS database cache directory during the scan? Mine on my separate server is 2.2Gigs for around 700 albums. That's with every track containing artwork.

If your setup is similar it could be too much for the joggler.

Just a thought.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 2:26 pm
by gegs
Max wrote:Are you running out of space for the LMS database cache directory during the scan? Mine on my separate server is 2.2Gigs for around 700 albums. That's with every track containing artwork.

If your setup is similar it could be too much for the joggler.

Just a thought.
How would I go about setting up the cache on a USB stick? You suggested this in an earlier post but I'm not sure how to do it.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 3:10 pm
by Max
Right, off the top of my head (I don't have a joggler near me)

Assuming the usb stick is mounted as /mnt/usb.

It would be something like:

cd /media/gforums/apps/squeezeboxserver*
cp -Rvp Cache /mnt/usb
mv Cache Cache.old
ln -s /mnt/usb/Cache .
ls -la (Should show the symlink in the directory)
then reboot and rescan.

If it all goes wrong, then delete the symlink and move Cache.old back to Cache.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 4:11 pm
by gegs
Thanks for that. I'll give it a try in the next couple of days and report back.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 8:57 pm
by gegs
I had a go at this but the USB stick automounts as /mnt and it is a read only file system. It is designed for viewing images/videos from USB sticks as read-only, but I couldn't get anything to write to the device. Useless therefore as a server cache unless anybody knows how to change permissions. I tried chmod but the read-only error kept appearing and it wouldn't let me.

Re: cifs samba mounting.

Posted: Thu May 24, 2012 9:19 pm
by Max
What happens if you try:

mount -o remount,rw /dev/sda1

to make the stick writeable?

And change the path reference in my bit above from /mnt/usb to just /mnt

Not sure how the LMS DB would handle FAT32 on a stick, but I can't see any reason why a ext3 formatted stick wouldn't work.

There is possible the option of mounting a samba share and symlinking to that.