cifs samba mounting.

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

cifs samba mounting.

Post 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
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: cifs samba mounting.

Post 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.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: cifs samba mounting.

Post by papaiannis »

I tried the older busybox, as suggested by Max, and mount of cifs share works! Thank you so much, Max.
Alekos
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post 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
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: cifs samba mounting.

Post 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.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
HopmanUK
Posts: 5
Joined: Wed May 09, 2012 12:01 pm

Re: cifs samba mounting.

Post by HopmanUK »

That is great news.. will wait a bit to see if it gets included in PnP.

Good work

Rich
Slingshot72
Posts: 2
Joined: Tue May 15, 2012 8:58 am

Re: cifs samba mounting.

Post 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.
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post 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. ;-(
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: cifs samba mounting.

Post 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
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post by Max »

How very odd!

Great find.

:-)
papaiannis
Posts: 66
Joined: Tue May 15, 2012 9:53 pm

Re: cifs samba mounting.

Post 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
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: cifs samba mounting.

Post 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?
pukington
Posts: 37
Joined: Fri Aug 12, 2011 10:53 pm
Contact:

Re: cifs samba mounting.

Post 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!
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: cifs samba mounting.

Post 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.
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post 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.
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: cifs samba mounting.

Post 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.
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post 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.
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: cifs samba mounting.

Post by gegs »

Thanks for that. I'll give it a try in the next couple of days and report back.
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: cifs samba mounting.

Post 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.
Max
Posts: 30
Joined: Thu Jul 14, 2011 5:48 pm

Re: cifs samba mounting.

Post 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.
Post Reply