#249035 - 12/02/2005 17:29
Mp3TOFID and Rsync Woes
|
member
Registered: 09/12/2003
Posts: 150
|
Does anyone have a good guide on how to use rsync and mp3tofid the one on the mp3tofid isn't very complete.
I followed the instructions there and i get this error when i try to run rsync on my empeg
+ ./rsync --times --delete --verbose --recursive --copy-unsafe-links --exclude=config.ini --exclude=lost+found 192.168.0.180::empegfids/drive0 /
receiving file list ... rsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(229)
Any ideas?
On my Music server i created the file /etc/rsyncd.conf
inside of that i put
[empegfids]
path = /mnt/empegfids
read only = yes
hosts allow = 192.168.0.178
use chroot = no
Then i ran rsync --daemon
I transferred the file rsync-2.5.5-vfdhack-1.tar.gz to my empeg
and then unzipped it onto my empeg.
On my empeg i go into the rsync-2.5.5-vfdhack-1 directory where the rsync file resides and i run the command
+ ./rsync -auv --delete --dry-run rsync://192.168.0.180/empegfids .
receiving file list ...
And it just stops there.
Also when i run the command
./rsync --times --delete --verbose --recursive --copy-unsafe-links --exclude=config.ini --exclude=lost+found 192.168.0.180::empegfids/drive0 /
It does the same thing.
Any ideas?
Edited by kendrick (12/02/2005 18:05)
|
Top
|
|
|
|
#249036 - 12/02/2005 17:49
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Is that error copied-and-pasted, or did you re-type it by hand?
The IP address of the player is faulty in that error message, it's missing a period (I'm guessing it should be 1.80 instead of 180). Maybe that's the problem?
|
Top
|
|
|
|
#249037 - 12/02/2005 17:58
Re: Mp3TOFID and Rsync Woes
[Re: tfabris]
|
member
Registered: 09/12/2003
Posts: 150
|
Sup I did it again with teh correct ip 192.168.0.180
Same thing still happens.
|
Top
|
|
|
|
#249038 - 13/02/2005 06:22
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
member
Registered: 09/12/2003
Posts: 150
|
Hrmm Mp3TOFID and Rsync only seem to work for me if i first connect to the empeg via the hyperterminal with the serial cable connected.
After i do that, then i can connect through the microsoft telnet program without the serial cable connected and run the rsync.
Is that normal?
The only difference I can think of is that in Hypterminal i send the Q command to enter into developer mode.
Anyway you can enter into developer mode from the Microsoft Terminal Window?
Edited by kendrick (13/02/2005 07:06)
|
Top
|
|
|
|
#249039 - 13/02/2005 16:28
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
member
Registered: 09/12/2003
Posts: 150
|
Any ideas?
No one uses rsync and MP3toFID here?
I guess my main question at this point is there anyway to go into Development mode from Microsoft Telnet Program because that seems to be the only way i can get Rsync and Mp3toFID to work.
Edited by kendrick (13/02/2005 16:31)
|
Top
|
|
|
|
#249040 - 13/02/2005 17:09
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Perhaps it's simply the old networking bug. The empeg hardware/firmware have a problem with some networking setups, whereby they fail DHCP and fail to send packets out initially after each reboot. I usually just ping the player until it comes to life, and then everything else works until the next reboot. All of my various empeg scripts I use here now do that as a matter of course.
cheers
|
Top
|
|
|
|
#249041 - 13/02/2005 22:46
Re: Mp3TOFID and Rsync Woes
[Re: mlord]
|
member
Registered: 09/12/2003
Posts: 150
|
Ok, if i ping the player before the rsync command then it works.
However the next problem im having is. I do my initial mp3tofid and that takes about 45 minutes. Then i added a song to the directory and did the mp3tofid command again and it still takes the same amount of time?
I thought mp3tofid was supposed to run in less than a minute or somethin?
Edited by kendrick (13/02/2005 23:24)
|
Top
|
|
|
|
#249042 - 14/02/2005 01:35
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Dunno.. I've never used that s/w here. But the first thing to try would be to ensure that the date, time, and timezone on the player match that on the PC that's being used for the rsync. Shouldn't matter, but..
|
Top
|
|
|
|
#249043 - 14/02/2005 10:35
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote: I thought mp3tofid was supposed to run in less than a minute or somethin?
Yes, it should only rescan what is changed since the last run.
Are you using Linux, some other *ix, or cygwin? On what kind of filesystem are your tunes stored?
Pim
|
Top
|
|
|
|
#249044 - 14/02/2005 10:42
Re: Mp3TOFID and Rsync Woes
[Re: mlord]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote: Shouldn't matter, but..
Yes, it helps, but it doesn't matter. rsync will handle that.
But kendricks problem is not rsync inefficiency, but mp3tofid inefficiency. It shouldn't scan all tunes every run, it should rely on previously generated fids, if the corresponding tune has not changed.
There are a couple of checks like mtime, size, inode number and major/minor numbers of the filesystem that contains the tunes.
Pim
|
Top
|
|
|
|
#249045 - 14/02/2005 13:26
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
My Tunes are stored on NTFS file system on a windows machine.
The tunes are mounted to my linux box over the network.
Then I am using my linux box to perform the mp3tofid
Edited by kendrick (14/02/2005 13:27)
|
Top
|
|
|
|
#249046 - 14/02/2005 15:23
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote: My Tunes are stored on NTFS file system on a windows machine. The tunes are mounted to my linux box over the network.
I'm afraid that's the problem. mp3tofid uses a fid number allocation strategy based on the tune's inode number. The idea is that the inode number of a tune does not change when you rename or move it, or edit it. This is important, as you do not want the fid numbers of your tunes to change, otherwise rsync will be copying the files over and over.
Unfortunately, inode numbers are an alien concept in NTFS. cygwin knows how to emulate inode numbers in a consistent, persistent way, but smbfs does not.
You can check this for yourself. Do "ls -li mytune.mp3". Unmount the filesystem, remount it and repeat the ls command. You'll see different inode numbers.
Your best bet is to turn things round. Store your tunes on your linux box and use samba to share them to your windows clients. This is what I do.
Pim
|
Top
|
|
|
|
#249047 - 14/02/2005 15:35
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
Alright, i'll put my music on a linux filesystem
What rsync command do you use by the way, so that FIDS dont have to get deleted and replaced everytime?
Also is there anyway to make a script so that my empeg is being pinged while the rsync command is running thats the only way my box seems to do it without the serial cable hooked up?
|
Top
|
|
|
|
#249048 - 14/02/2005 16:04
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote:
What rsync command do you use by the way, so that FIDS dont have to get deleted and replaced everytime?
Moving your tunes to the linux box will cause yet another full rsync transfer, unless you're in for some hacking. But after that, fid numbers will remain persistent and rsync will be efficient.
For full transfers, it will be much faster to just delete the current fids on the player, as having rsync compare them all will slow things down seriously.
Quote:
Also is there anyway to make a script so that my empeg is being pinged while the rsync command is running thats the only way my box seems to do it without the serial cable hooked up?
I use telnetd without having to ping. I do use "ifconfig lo up" in my rsync script on the player. Maybe this helps too.
Pim
|
Top
|
|
|
|
#249049 - 14/02/2005 17:39
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
rsync \ $@ \ --times \ --delete \ --verbose \ --recursive \ --copy-unsafe-links \ --exclude=config.ini \ --exclude=lost+found \ ${rsyncserver}::${modulename}/drive0 /
Hey, PIM this is the rsync command that I am currnetly using? Is this similar to the one you use? If not could you post or attach the script you use?
|
Top
|
|
|
|
#249050 - 14/02/2005 20:03
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
I had to change my script to use one rsync run per drive. otherwise my player would crash, even when using swap. Now that have had a memory upgrade, it isn't necessary anymore, but I left it the way it is. It's probably a tad faster as well. Code:
#!/bin/sh
rsyncserver=192.168.101.1 modulename=empegfids
set -x killall -INT player
# only remount if drives are mounted read-only if grep -q "/dev/hd.4.* ro " /proc/mounts then remount=true else remount=false fi
sleep 5 test $remount = true && sh -x rwm ifconfig lo 127.0.0.1 up for i in 0 1 do rsync \ $@ \ --times \ --stats \ --delete \ --verbose \ --progress \ --recursive \ --empeg-progress \ --copy-unsafe-links \ --block-size=100000 \ --exclude=rsync \ ${rsyncserver}::${modulename}/drive${i} / done test $remount = true && sh -x rom
killall is not included on the player. I got it from debian. rsync itself is excluded in my script; that's because I sync all my tools from empegfids::drive0/local/bin Pim
|
Top
|
|
|
|
#249051 - 16/02/2005 05:16
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
PIM
when i do ifconfig lo 127.0.0.1 up
It says ifconfig command not found.
Also when i try do do ping
i get command not found
Edited by kendrick (16/02/2005 06:29)
|
Top
|
|
|
|
#249052 - 16/02/2005 07:06
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Right, my ping and ifconfig are also from debian, so it seems. I'm having trouble finding the link to the debian tarball I used, but I did find this on Roger's website. Hope this helps. Pim
|
Top
|
|
|
|
#249054 - 16/02/2005 07:10
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
|
Top
|
|
|
|
#249055 - 16/02/2005 07:52
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
Cool, Thanks. I'll include all of this in the instructions im trying to make also.
Hey PIM does that tarball you linked include the killall as well? All the extras needed to run your script?
Also I notieced your script has a {i} does that make it run the script for /drive0 then /drive1
|
Top
|
|
|
|
#249056 - 16/02/2005 13:23
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
member
Registered: 09/12/2003
Posts: 150
|
Hrmm, I haven't tried the ifconfig part of yoru script yet.
But for some odd reason when i run my script via Microsoft Telnet it runs extremely slow, to the point where it'll eventually just stop.
However if i run the script through Hyperterminal with the Serial Port connected it runs extremely fast.
|
Top
|
|
|
|
#249057 - 16/02/2005 14:50
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
If you use hyperterminal, you know for sure the player process is stopped. If you telnet, you don't. You need to make sure the player process is stopped.
Pim
|
Top
|
|
|
|
#249058 - 16/02/2005 17:27
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
Could I just install busybox to include all these commands that i need like ifconfig, killall, etc.
I have the busybox source, is there a special way you have to install it on the empeg or can I just do a regular ./configure, make , make install?
Edited by kendrick (16/02/2005 18:07)
|
Top
|
|
|
|
#249059 - 16/02/2005 21:23
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote:
Hey PIM does that tarball you linked include the killall as well? All the extras needed to run your script?
yes
Quote:
Also I notieced your script has a {i} does that make it run the script for /drive0 then /drive1
Yes, ${i} is a shell variable that will take values 0 and 1.
Pim
|
Top
|
|
|
|
#249060 - 16/02/2005 21:29
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Quote: Could I just install busybox to include all these commands that i need like ifconfig, killall, etc.
I suppose so, but it's a lot easier to just copy what you need from the tarballs.
Quote:
I have the busybox source, is there a special way you have to install it on the empeg or can I just do a regular ./configure, make , make install?
You cannot develop on the player itself. You need to set up a crosscompiler. Download the arm linux toolchain from the hijack site and prepare some time for getting it to work.
Some configure scripts make wrong decisions when running in a crosscompiler environment. I noticed that when building rsync.
Pim
|
Top
|
|
|
|
#249061 - 16/02/2005 21:34
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
I see, you know where I can find a killall tarball?
|
Top
|
|
|
|
#249062 - 16/02/2005 22:21
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Right, killall isn't in either tarball mantioned in this thread.
I probably downloaded it from debian directly.
For your convenience, here is my collection of arm tools.
Pim
Attachments
248960-empeg-tools.tar.gz (75 downloads)
Edited by pim (16/02/2005 22:23)
|
Top
|
|
|
|
#249063 - 16/02/2005 22:34
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
Awesome, thats very nice of you I appreciate it.
|
Top
|
|
|
|
#249064 - 16/02/2005 23:07
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
member
Registered: 09/12/2003
Posts: 150
|
To use your set of tools, do i need to use teh ARM cross compiler or can i just extract the tar.gz that you attached to /bin or something?
|
Top
|
|
|
|
#249065 - 16/02/2005 23:16
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Common practice is to install non-standard binaries in /usr/local/bin. This directory is in the PATH, so you can use the tools right away. No need to set up a cross compiler.
Pim
|
Top
|
|
|
|
#249066 - 17/02/2005 07:38
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
Hrmm, Well I guess my next problem is. I saw you speaking on thsi earlier not sure if its the same thing though.
I have my Music stored on an ext3 filesystem on my linux box.
My windows machine accesses the Music via samba share .
I add music to the Linux box from windows via the windows samba share.
Would this be the reason that mp3tofid seems to do a full run everytime I run it? Would I have to do everything from the linux box in order for mp3tofid to work correctly?
|
Top
|
|
|
|
#249067 - 17/02/2005 11:59
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Provided you did the following: - move your music to the linux ext3 filesystem - run mp3tofid - rsync to your player - add or change this through samba on a windows client - run mp3tofid again - run rsync again
then you should see mp3tofid only rescans changed and new tunes, unless you force it using a commandline switch.
If mp3tofid did not rescan unchanged tunes on the second run, then the second rsync should be fast too.
Pim
|
Top
|
|
|
|
#249068 - 23/02/2005 05:46
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
PIM thanks for all your help. i am currently putting together a guide to help those who were like me and dont know where to start.
I have rsync and mp3tofid working great thanks to you.
However my next question is. Is it possible to have a script on your local mp3 machine that runs mp3tofid and then sends a command that executes the rsync script on your empeg.
This way you wont have to run mp3tofid on your local mp3 machine. Then log into your empeg and run the rsync script.
It would be nice to have one script to run on your local mp3 machine.
I know that you would need rsh on the empeg and the local mp3 machine. Im not exactly sure where to get rsh for the empeg from.
Or what kind of script i would run. Do you have any experience setting this up or could give me assistance on doing so.
If thats not possible is it possible to run a cronjob on the empeg.
So i can have it periodically rsync.
Edited by kendrick (23/02/2005 06:00)
|
Top
|
|
|
|
#249069 - 23/02/2005 07:26
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
pooh-bah
Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
|
Quote: know that you would need rsh on the empeg and the local mp3 machine. Im not exactly sure where to get rsh for the empeg from.
I believe rsh for arm is included in the Debian for Arm tar-ball Pim linked in this post
_________________________
/Michael
|
Top
|
|
|
|
#249070 - 23/02/2005 20:59
Re: Mp3TOFID and Rsync Woes
[Re: mtempsch]
|
addict
Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
|
Yes, there's both rsh and in.rshd in this tarball. A daemon might be more difficult set up though.
You might also consider putting your script in a hijack menu.
Pim
|
Top
|
|
|
|
#249071 - 25/02/2005 16:38
Re: Mp3TOFID and Rsync Woes
[Re: pim]
|
member
Registered: 09/12/2003
Posts: 150
|
So how do I install the debian package without messing up my empeg install?
|
Top
|
|
|
|
#249072 - 25/02/2005 16:57
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
carpal tunnel
Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
|
Crossposted. See reply in troubleshooting thread. Thanks.
_________________________
Paul Grzelak 200GB with 48MB RAM, Illuminated Buttons and Digital Outputs
|
Top
|
|
|
|
#249073 - 06/03/2005 06:02
Re: Mp3TOFID and Rsync Woes
[Re: kendrick]
|
journeyman
Registered: 29/12/2001
Posts: 99
Loc: Riverside, CA
|
Quote: Would this be the reason that mp3tofid seems to do a full run everytime I run it? Would I have to do everything from the linux box in order for mp3tofid to work correctly?
I don't know if you found the answer to this already but when I was setting up mp3tofid I kept running it with the '-n' switch which is described as "force creation of new inode database". It was a dumb mistake but it's something that I overlooked for a while. Now without the -n switch, mp3tofid still takes a minute or so to run but it's much faster.
--Ajay
|
Top
|
|
|
|
|
|