castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Sat Nov 02, 2013 10:11 am

crochat wrote:Hi,

I'm totally novice. Can someone tell me how I can set the media folder in LMS if music is stored on an external HDD? I tried some sort of mount, but it got me nowhere...
You'll have to learn how to mount a folder on an external drive. It's the only way.

How is the drive located on your system? To start you need to know the ip address of the drive unit on your system.

User avatar
Gerrelt
Posts: 294
Joined: Sat Nov 10, 2012 9:01 am

Re: Logitech Media Server / Raspbian

Sat Nov 02, 2013 12:58 pm

crochat wrote:Hi,

I'm totally novice. Can someone tell me how I can set the media folder in LMS if music is stored on an external HDD? I tried some sort of mount, but it got me nowhere...
Maybe part of my tutorial can help you. Go to: http://www.raspberrypi.org/phpBB3/viewt ... 35&t=59233
And follow the steps "USB stick mounting:" and "Setup the LMS server".
my Raspberry Pi page: http://raspberry.gerrelt.nl

crochat
Posts: 6
Joined: Fri Nov 01, 2013 6:56 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 10:46 am

castalla wrote:
crochat wrote:Hi,

I'm totally novice. Can someone tell me how I can set the media folder in LMS if music is stored on an external HDD? I tried some sort of mount, but it got me nowhere...
You'll have to learn how to mount a folder on an external drive. It's the only way.

How is the drive located on your system? To start you need to know the ip address of the drive unit on your system.
It is an external USB hard drive. Raspbian automatically recognize it and seem to mount it. At least I have no problem accessing it with the file manager. However LMS doesn't see it. And if I try to mount it after creating a specific folder for it (mkdir) and using the mount command as presented in here: http://raspi.tv/2012/how-to-mount-and-u ... spberry-pi , I only get to the point that LMS sees the folder, but nothing inside it.

castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 12:23 pm

Okay - you have to point to the dir/folder you mounted using LMS gui and the Settings- Basic Settings - Media Folders. Then you need to let LMS scan the folder.

Have you done that?

crochat
Posts: 6
Joined: Fri Nov 01, 2013 6:56 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 12:27 pm

Yes I did that in LMS, but the scan resulted in 0 files.

castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 1:20 pm

The mount command is not persistent. The mount disappears if you switch the Pi off. There are ways around that - but read on first:

Also, are you sure the file system is ntfs (assuming you used the same commands given in your link).

Do the mount again. Then

dir /media/whateverfoldernameyougave

This should list the files.

Report back

crochat
Posts: 6
Joined: Fri Nov 01, 2013 6:56 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 2:16 pm

ntfs reported an error, so I did it with vfat after. The dir command reported the content but LMS wasn't still able to find anything in there. I thought it's maybe a matter of permission.

castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 2:57 pm

Strange. Are the files mp3?

Did you select Clear library and rescan ?

In LMS Information there'll be a link for the scanner log - maybe look there to see if any error reported.

Do

ls -ld /media/foldername

What does it report?

User avatar
Gerrelt
Posts: 294
Joined: Sat Nov 10, 2012 9:01 am

Re: Logitech Media Server / Raspbian

Tue Nov 05, 2013 4:28 pm

It's probably a permission problem, the LMS user is not permitted to read the directories/files.

You could try this on the usb directory containing your music:

Code: Select all

sudo chmod -R 0770 <your usb directory>
sudo chown -R squeezeboxserver:nogroup <your usb directory>
And then try again.
my Raspberry Pi page: http://raspberry.gerrelt.nl

crochat
Posts: 6
Joined: Fri Nov 01, 2013 6:56 pm

Re: Logitech Media Server / Raspbian

Sat Nov 09, 2013 1:11 pm

Hi,

I've done the ls -ld command. Result is below:

[email protected] / $ ls -ld /media/MYBOOK
drwx------ 14 pi pi 32768 Jan 1 1970 /media/MYBOOK


I've also done the chmod and chown. On chmod the HDD started working and did something (like when I attached it to a windows computer). Chown did a long list of operations in the LX Terminal, but as per the below it seems there's a problem:

chown: changing ownership of `/media/MYBOOK/': Operation not permitted

castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Sat Nov 09, 2013 1:53 pm

Are you saying that the HDD now works with LMS?

If yes, then the chown command is not needed.

crochat
Posts: 6
Joined: Fri Nov 01, 2013 6:56 pm

Re: Logitech Media Server / Raspbian

Sat Nov 09, 2013 5:19 pm

No. LMS still can't find anything. The scanner.log files reports the below:

[13-11-09 18:11:21.8406] main::main (200) Starting Logitech Media Server scanner (v7.7.3, 1375965195, Mon Aug 12 03:09:39 PDT 2013) perl 5.014002
[13-11-09 18:11:42.9622] Slim::Music::Import::runImporter (485) Starting Slim::Media::MediaFolderScan scan
[13-11-09 18:11:42.9810] Slim::Utils::Scanner::Local::rescan (171) Discovering audio files in /media/MYBOOK
[13-11-09 18:11:43.1280] main::main (327) Error: Failed when running main scan: [/media/MYBOOK: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
]
[13-11-09 18:11:43.1430] main::main (328) Error: Skipping post-process & Not updating lastRescanTime!

castalla
Posts: 558
Joined: Thu Jul 19, 2012 3:46 pm

Re: Logitech Media Server / Raspbian

Sun Nov 10, 2013 11:34 am

Did you use:

sudo chown -R squeezeboxserver:nogroup <your usb directory>

nahannidog
Posts: 11
Joined: Wed Feb 05, 2014 10:04 pm

Re: Logitech Media Server / Raspbian

Thu Feb 06, 2014 2:17 am

[quote="Gerrelt"]It's probably a permission problem, the LMS user is not permitted to read the directories/files.

You could try this on the usb directory containing your music:

Code: Select all

sudo chmod -R 0770 <your usb directory>
sudo chown -R squeezeboxserver:nogroup <your usb directory>
And then try again.

Hello, Linux Novice with essentially the same problem, except USB stick is not visible to LMS. Ditto it is visible to File Manager. Within Terminal I ran this chmod command with the added option of -v verbose and was echoed that directories and files changed from 0700 to 0770. Yet subsequent ls -l shows no change in permissions: (I removed -R recursive for illustration purposes...same problem with -R, no changes implemented). "Transcend" is the name of the USB stick. Any idea why permissions don't get changed? Same results when try to change from within File Manager.


[email protected] /media $ sudo chmod -v 0770 Transcend
mode of `Transcend' changed from 0700 (rwx------) to 0770 (rwxrwx---)
[email protected] /media $ ls -l
total 45
drwx------ 3 pi pi 2560 Dec 31 1969 BOOT
drwx------ 2 pi pi 1024 Dec 31 1969 BOOT_
drwxr-xr-x 24 root root 4096 Dec 31 1969 root
drwxr-xr-x 18 root root 4096 Dec 31 1969 rootfs
drwxr-xr-x 3 root root 1024 Dec 31 1969 SETTINGS
drwx------ 5 pi pi 32768 Dec 31 1969 Transcend

nahannidog
Posts: 11
Joined: Wed Feb 05, 2014 10:04 pm

Re: Logitech Media Server / Raspbian

Thu Feb 06, 2014 3:07 am

castalla wrote:Did you use:

sudo chown -R squeezeboxserver:nogroup <your usb directory>
Hello, same problem here, but trying to scan USB stick, not HDD.
Added -v verbose mode which indicated that modes had changes from 0700 to 0770, but subsequent ls -l indicated that no permissions had changed. Why don't the permissions change? And what is the name of the LMS user, is it "pi"??
(-R option removed for illustration purposes only; "Transcend" is name of USB stick)

[email protected] /media $ sudo chmod -v 0770 Transcend
mode of `Transcend' changed from 0700 (rwx------) to 0770 (rwxrwx---)
[email protected] /media $ ls -l
total 45
drwx------ 3 pi pi 2560 Dec 31 1969 BOOT
drwx------ 2 pi pi 1024 Dec 31 1969 BOOT_
drwxr-xr-x 24 root root 4096 Dec 31 1969 root
drwxr-xr-x 18 root root 4096 Dec 31 1969 rootfs
drwxr-xr-x 3 root root 1024 Dec 31 1969 SETTINGS
drwx------ 5 pi pi 32768 Dec 31 1969 Transcend

c_williamson
Posts: 7
Joined: Fri Sep 06, 2013 7:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 6:17 am

Not to hijack the thread but I am working on the same problem with a usb hard drive and after using "sudo chown -R squeezeboxserver:nogroup <your usb directory>" I received a string of "operation not permitted" for every dir and file in the dir.

Thank you all in advance for all you hard work this far and all future work on this problem. I am eagerly waiting a reply

c_williamson
Posts: 7
Joined: Fri Sep 06, 2013 7:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 6:31 am

c_williamson wrote:Not to hijack the thread but I am working on the same problem with a usb hard drive and after using "sudo chown -R squeezeboxserver:nogroup <your usb directory>" I received a string of "operation not permitted" for every dir and file in the dir.

Thank you all in advance for all you hard work this far and all future work on this problem. I am eagerly waiting a reply
A little more info. I tried to move the "media" dir to the desk top dir and change the owner and permissions and no luck. I think I need to look into loging in as a higher level user

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 8:43 am

Sounds like your USB hard drive is formatted with a filesystem that doesn't support Linux file permissions - what filesystem is your USB hard drive formatted with, FAT? NTFS? Try using a native Linux filesystem (eg. ext2/4).

Note that when using sudo, you temporarily become the highest level and most privileged user (aka root, the super-user).

c_williamson
Posts: 7
Joined: Fri Sep 06, 2013 7:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 4:08 pm

The drive was formated with FAT32. My windows pc only has the option for FAT32 and eFAT. My Mac machine has more options. Unfortunatly reformating means the loss of 14gb of data but its all backed up so its just the transfer time.
Thank you for your help I will try to reformat using your sugested file system.

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 4:14 pm

Just to add that you don't need to worry about file permissions if all you are storing on the USB HDD is media files - just disregard any instructions to change file ownership or set file permissions in future.

c_williamson
Posts: 7
Joined: Fri Sep 06, 2013 7:59 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 8:25 pm

milhouse wrote:Just to add that you don't need to worry about file permissions if all you are storing on the USB HDD is media files - just disregard any instructions to change file ownership or set file permissions in future.
I am not sure what you refer to as "that". I loaded gparted on my pi to work out the format issues. after formatting in ext4 It may have solved the problems. I am now able to change permissions but I can not just plug the USB hard drive into the other computer (windows and OSX don’t recognize the drive any more) to transfer the media I am using my network and transfer of that much data is going to take a long time.

Thank you for your help. Your tips have helped me develop a better picture of the environment I am working with when using a Pi

nahannidog
Posts: 11
Joined: Wed Feb 05, 2014 10:04 pm

Re: Logitech Media Server / Raspbian

Mon Feb 10, 2014 9:47 pm

For those of us that are struggling with the USB stick problem, I stumbled on this very instructive wiki:
http://wiki.slimdevices.com/index.php/M ... HardDrives

Not really understanding Linux, I will attempt to paraphrase that the problem is the USB stick is "auto-mounted" to the log-in user and not to the "slimserver" user. Apparently this prevents the possibility of changing permissions to include user slimserver. Supports the posts by Castalla and Gerrelt doing manual device mounts.

Linux guys, pls correct me if I got it wrong.

niels
Posts: 4
Joined: Fri Oct 05, 2012 3:28 pm

Re: Logitech Media Server / Raspbian

Mon Feb 24, 2014 9:09 am

Hi there.

I have used your great guide, and my LMS is running without any problems. Thanks!

But yesterday I tried to install Samba. Something didn't workout. And now when I try to uprade my system, I get the following error (some of it is in Danish, but hopefully you get the point):
Sætter samba (2:3.6.6-6+deb7u2) op...
insserv: warning: script 'mathkernel' missing LSB tags and overrides
insserv: There is a loop between service logitechmediaserver and mathkernel if s topped
insserv: loop involving service mathkernel at depth 2
insserv: loop involving service logitechmediaserver at depth 1
insserv: Stopping mathkernel depends on logitechmediaserver and therefore on sys tem facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: fejl under behandling af samba (--configure):
underproces installerede post-installation-script returnerede afslutningsstatus 1
It seemes like the LMS has messed up with something called mathkernel. Do anyone know a solution to this?

The same problem appeared when I tried to install Apache2 and Minidlna.

Best, Niels

User avatar
Gerrelt
Posts: 294
Joined: Sat Nov 10, 2012 9:01 am

Re: Logitech Media Server / Raspbian

Sat Mar 01, 2014 4:41 pm

Mathkernel is part of the Wolfram mathematical package, you could try to remove it:

Code: Select all

sudo apt-get remove -y wolfram-engine
my Raspberry Pi page: http://raspberry.gerrelt.nl

niels
Posts: 4
Joined: Fri Oct 05, 2012 3:28 pm

Re: Logitech Media Server / Raspbian

Sun Mar 02, 2014 3:59 pm

Gerrelt wrote:Mathkernel is part of the Wolfram mathematical package, you could try to remove it:

Code: Select all

sudo apt-get remove -y wolfram-engine
This worked! Tanks a lot!!!!

Return to “Graphics, sound and multimedia”