DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-11-28 06:22:45

unmesh
Member
Registered: 2008-03-26
Posts: 55

rsyncd woes

I'm trying to run ffp rsyncd on my DNS320 and am using a rsyncd.conf derived from my DNS323 viz.

Code:

uid=root
gid=root

strict modes = false

[vol1]
path = /mnt/HD/HD_a2
read_only = false

[vol2]
path = /mnt/HD/HD_b2
read_only = false

Unfortunately, I get an error message which says:

Code:

Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /var/run/rsyncd.pid)

Any help will be greatly appreciated.

Thanks.


DNS-323 FW1.10B7 WD20EARS_2TB Samsung_HD753LG_750G FFP_0.5
DNS-321 FW1.03  FFP_0.7 (Spare enclosure)
DNS-320 FW2.02 Hitachi_HDS5C3020ALA632_2TB Hitachi_HDS721010KLA330_1TB FFP_0.5

Offline

 

#2 2011-11-28 08:52:18

unmesh
Member
Registered: 2008-03-26
Posts: 55

Re: rsyncd woes

I was able to figure it out eventually!

The first was to look at the script for the error message and it turns out that the comparison is not evaluating correctly even though the values are identical as confirmed by embedding echo statements into the script

Code:

 if [ "$x" != "$pid_file" ]; then
                echo "Error: Missing or wrong pid file in $conf_file (expec$pid_file)"
                exit 1
        fi

I commented out the check; now there were no error messages but rsyncd was still not running

Reading various other threads revealed that rsync (at least the 3.0.9 version) requires the --ipv4 flag to be invoked on the DNS-320, otherwise it fails silently

With this change, things work great!

Last edited by unmesh (2011-11-28 08:57:05)


DNS-323 FW1.10B7 WD20EARS_2TB Samsung_HD753LG_750G FFP_0.5
DNS-321 FW1.03  FFP_0.7 (Spare enclosure)
DNS-320 FW2.02 Hitachi_HDS5C3020ALA632_2TB Hitachi_HDS721010KLA330_1TB FFP_0.5

Offline

 

#3 2011-12-04 17:54:36

ubergeek
New member
Registered: 2011-12-04
Posts: 1

Re: rsyncd woes

HOLY SMOKES! I've been tring to figure out why I could not start rsync daemon script or even rsync manually for days....this post was the only thing that came up for the script error. Thanks for posting!!! I wasn't sure ihoe this propblem developed...I had rsync 3.0.5 on my ffp but inactive...I did not update but instead removed and installed rsync 3.0.9-2....after that I realized I could not even get it to start....

I have a dns-323 and the ipv4 flag is what ultimately alllowed it to work for me...now to continue fuuring out rsync between my unraid and the dns-323:) Obviously I am a noob.

Thanks again for the documentation.

Offline

 

#4 2012-02-19 23:09:26

alxr101
New member
Registered: 2012-02-19
Posts: 2

Re: rsyncd woes

Solution is as follows:

rsyncd.conf  (from the example folder and move to the /ffp/etc folder

edit rsyncd.conf and change the following line:

pid file = /var/run/rsyncd.pid   (nb. the space after the = is causing issues with the grep operation in the rsyncd.sh script)

REMOVE the space after the equal sign and ALSO change the path to be under ffp:-

pid file =/ffp/var/run/rsyncd.pid

Offline

 

#5 2012-02-19 23:12:25

alxr101
New member
Registered: 2012-02-19
Posts: 2

Re: rsyncd woes

unmesh wrote:

Reading various other threads revealed that rsync (at least the 3.0.9 version) requires the --ipv4 flag to be invoked on the DNS-320, otherwise

Didn't find any issues with leaving this flag unspecified. See however the rsyncd.conf correction to ensure grep evaluates and also the correct var/run folder under ffp is used.

Offline

 

#6 2012-11-07 13:01:46

pacboy
New member
Registered: 2012-11-07
Posts: 1

Re: rsyncd woes

While removing the space after 'pid file =' in the rsyncd.conf file works, a 'better' solution is to modify the rsyncd.sh file as follows.
From:

Code:

        x=$(grep '^pid file' $conf_file | cut -d= -f2)
        if [ "$x" != "$pid_file" ]; then
                echo "Error: Missing or wrong pid file in $conf_file (expected: $pid_file)"
                exit 1
        fi

To:

Code:

        x=$(grep '^pid file' $conf_file | cut -d= -f2 | sed -e 's/^[[:space:]]//g')
        if [ "$x" != "$pid_file" ]; then
                echo "Error: Missing or wrong pid file in $conf_file (expected: $pid_file)"
                exit 1
        fi

i.e. Strip leading whitespace using sed

pac

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB