PDA

View Full Version : SlimServer not scanning



khuongkt
2007-07-08, 14:20
Hello,

I'm having problems getting SlimServer to scan my music folder on MEPISLite. I'm pretty sure the directory is correct (it would say otherwise if it weren't, I've checked), and I've tried multiple locations on both an IDE and USB drive. At first, I tried connecting my existing music disk (NTFS) as a slave drive to my boot disk. MEPIS appropriately assigned the label 'hdb1' to it, so the location should be /mnt/hdb1. Later I attempted the same through an IDE-to-USB adapter (/mnt/flash), and then again by copying one song to the /root/Documents folder (partition formated in the native ext3 file system). Every time the disk fails to spin, and within seconds SlimServer would report 0 albums/songs/artists on the home page. This is on a new system based around a VIA EPIA motherboard with a 40GB Seagate 7200.7 OS disk and the latest stable versions of software.

Can anybody give an insight into what's wrong? Thanks.

bukharin
2007-07-10, 01:54
2 things to try:

1) Are you sure that the drive is mounted at /mnt/hdb1? Most distributions wouldn't mount /dev/hdb1 there. Check that you can see the music files with a file manager (or ls on the command line).

2) You could try scanning from the command line, with debugging options set. For example:
/path/to/scanner.pl --rescan --cleanup --d_scan /mnt/hdb1/

Mark Lanctot
2007-07-11, 06:14
At least on Debian-based distros, mounted external drives appear at /media/sdXY where X = a, b, c, etc. and Y = 1, 2, 3, etc.

Also does SlimServer have permission to read from the external drive? I tried several times to do it the "right" way, i.e. give user slimserver permissions to read, but I guess I really don't understand user-specific permissions, so I just chmod 777 the drive.

khuongkt
2007-07-11, 14:46
Thank you both for the replies.

Indeed, all my internal/external drives (save the active Linux partition) are mounted at /mnt, and there's no such directory as /media. (I've checked using both the file manager and the command line.) One oddity is that while the external drive is labeled 'sda1' on the desktop, its actual location is /mnt/flash. While logged in as root, I tried the command "chmod 777 flash" and got this message:

chmod: changing permissions of 'flash': Read-only file system.

Its current permissions are dr-x------, and I can't change it any other way. As for the internal drives, I've changed their permissions once before (though without using 777), and when I checked today, they reverted back! I did 777 this time around... are they going to stick?

bukharin, I got this message when I executed that command:

bash: path/to/scanner.pl: No such file or directory.

Do I need to be in a specific directory to do that?

Mark Lanctot
2007-07-11, 14:54
chmod: changing permissions of 'flash': Read-only file system.

You sure it isn't NTFS-formatted? Looking at your original message, I'm not sure.

khuongkt
2007-07-11, 15:02
Mark, it is NTFS-formatted, but can't Linux write to NTFS (maybe not reliably, but still)?

khuongkt
2007-07-12, 00:59
OK, I just updated to 6.5.3 and still no changes to the scanning behavior. I must admit, though, that the MEPISLite beta I'm running is a bit wonky. Sometimes there are discrepancies between what the file manager shows and what the command line shows with respect to folder contents. The CLI at times displays what used to be there and not what is there. Still, I've made sure that my music is recognized in both places. Also, my reconnected external drive now carries the label 'sda1' and not 'flash' anymore, which should have been the case earlier.

Should I just migrate to a different distro? This scanning issue is the last obstacle in getting my file/music server going, so I'd like to stay with Linux if I can.

egd
2007-07-12, 01:49
Should I just migrate to a different distro? This scanning issue is the last obstacle in getting my file/music server going, so I'd like to stay with Linux if I can.

If you're looking for an easy/user friendly out of the box distribution I'd recommend Ubuntu or Kubuntu. (most) Linux distros will not allow writing to NTFS partitions out of the box. To write to NTFS you need to install NTFS-3G from http://www.ntfs-3g.org/

should you opt for U/Kubuntu, ubuntuguide.org is an excellent reference point for figuring out how to do things most users are likely to want to do, but may not be familiar with in a Linux environment.

In regards to mounting USB drives, assuming a FAT32 formatted USB HDD shows up as /dev/sdd1 and you want to mount it as /media/sdd1, the following fstab entry will mount the drive with read/write permission on insertion:

/dev/sdd1 /media/sdd1 vfat rw,user,iocharset=utf8,umask=000 0 0

I'm not sure what the syntax would be for NTFS though I would presume it would be identical other that substituting vfat with whatever the NTFS-3G driver expects, which I'm guessing is "ntfs" --- you'd need to check this though, I'm merely speculating as I've never tried writing to NTFS from Linux.

khuongkt
2007-07-12, 13:04
egd, I've tried Ubuntu and a couple derivatives (Xubuntu and Linux Mint) on this VIA system and others, and I often get CRC errors even with an official Ubuntu disk and a fresh HDD. More to the point, MEPISLite was chosen because it was the only one tested that worked with the VIA system.

Thanks for the tip on mounting drives in the /media folder. I will look into it.

khuongkt
2007-07-12, 14:28
I think I have a breakthrough here! SlimServer recognized a .mp3 test file I downloaded to /mnt/hdb2 (my Music partition). Apparently it skips through .flac files? Why is this?

khuongkt
2007-07-14, 14:44
Bump for a still-unresolved issue. I tried reinstalling both SlimServer and the FLAC package via Synaptic, to no avail. Perhaps complete removal and installation is the answer?

bukharin
2007-07-14, 17:45
It's starting to sound like a permissions problem. Is the music still at /mnt/hdb2? If so, what do you get if you try:
ls -l /mnt/hdb2

Another thing to sort out the FLAC problem - you could also try this again:
/path/to/scanner.pl --rescan --cleanup --d_scan /mnt/hdb2/

However, you need to change /path/to/ to the actual path to where slimserver is installed. (and the final argument has to reflect where your music is).

khuongkt
2007-07-14, 21:01
bukharin, hdb2 was given 777 permissions. And the FLAC file that was not recognized is in the exact same location (/mnt/hdb2) as the test MP3 file (which was recognized). So it's definitely not a permissions problem.

Do you know what the default installation location for SlimServer is on Linux? I think it is /usr/sbin/slimserver, but executing the command returns the same "no such file or directory" message. Thanks a lot for your help.

EDIT: I searched for the scanner.pl file (a Perl script?) but couldn't find it.

egd
2007-07-14, 22:02
bukharin, hdb2 was given 777 permissions. And the FLAC file that was not recognized is in the exact same location (/mnt/hdb2) as the test MP3 file (which was recognized). So it's definitely not a permissions problem.

I'm in the airport lounge atm so cannot tell you where slimserver is installed on a Ubuntu based distro, however, recall it was something along the lines of /user/bin/slimserver/. An easy way to ascertain where it is installed is to use the package manager and then have a look at the properties tab for slimserver.

if you open a terminal window and execute "ls -la /mnt/hdb2", does the flac file you refer to in fact show up?

If it does, check to see whether its permissions are the same as the mp3 file you refer to. If these are the same, have a look at slimserver's file type preferences and ensure flac files are selected for inclusion in slimserver's operations.

You referred in an earlier post to CRC errors when running U/K/Xbuntu. Can you elaborate - are these CRC errors when writing to the drive? Seems strange that Mepis has better support for the mobo in question as Mepis is built off the back of Ubuntu.

khuongkt
2007-07-14, 23:15
SUCCESS! Thank you, egd; you are right. The two files, while in the same folder, have different permissions. The MP3 file has read permission for all, while the FLAC one has read permission for user (root) only. I'm logged in as root, but apparently SlimServer does not run as such. Is there a way to make it do that upon boot? I'd rather not have to change permissions for all of my music files...

And one other thing. If a file's user is "nobody," which is what happens when I copy the file from a remote computer, does that mean anybody can do anything with it, or is it the opposite? If it's the former, I may not have to make SlimServer run as root after all, since I'm writing files from my desktop PC.

As for your inquiry about the CRC errors, that's what I get when Ubuntu/Xubuntu/Linux Mint loads the kernel (reading from the drive) after presenting the boot menu. This has happened on multiple computers, but I got Xubuntu running once. MEPIS 6.5 runs flawlessly on all other PCs I've tried but IIRC gets stuck at some point when loading on the VIA system (no reported CRC error). MEPISLite, though, is still based on Debian, I think.