Recommended Posts

Posted

Can anyone share there througput on a synology diskstation ? I'm using a 212j and I a bit disapointed because I only get 2Mbyte/s througput. I think the bottleneck must be the cpu because it always on 100% while syncing.

After syncing about 2.5TB, I've observed a rather consistent 2.5-3.0MB/s on both of my Synology DS-213+'s with the CPU at 50-60%. A tree of mostly large media files synced at a consistent 4.0MB/s, which is a big difference as it reduced the estimated initial sync time from about 90 hours to 60 hours.

Posted

The same here. BitTorrent Sync 1.1.70 on Synologys and 1.1.69 on ML OSX Macs. Gigabit ethernet cable network but just up to 10MB/s between Macs and both DS-1512+ or DS-2413+. No problem between Macs, up to 100MB/s.

Kai

Posted

Hi, I installed version 1.1.48 on my ARM bases NAS (ZyXEL NSA325). It works, and isntallations was straight forward. One ISSUE; debug logging is on, without having a Debug.txt file in the .sync directory. sync.log grows rapidly and keeps my NAS awake (no disk spin down). How to disable the logging???. Best regards, Eric

Posted

I was able to get this working with my Zyxel NSA-221.

1. InstappFFP - http://zyxel.nas-cen.../wiki/FFP-stick - this must be installed and setup first.

2. Copy btsync file that is located in the ARM compressed file to /ffp/bin using telnet. - http://syncapp.bitto...sync_arm.tar.gz

3. Create file /ffp/start/btsync.sh with the following text- this is to make it auto start when the NAS is rebooted.


#!/ffp/bin/sh
/ffp/bin/btsync

Then make btsync.sh executable with chmod.


chmod u+x /ffp/start/btsync.sh

Hope this helps someone

Eddie

Thanks, With this info I easily got version 1.1.48 running on my NSA325 (Zyxel)

I only changed /ffp/start/btsync.sh to support start, status and stop:


#!/ffp/bin/sh
. /ffp/etc/ffp.subr
command="/ffp/bin/btsync"
run_rc_command "$1"

Thanks

Posted

Have been struggling a bit with FreeNas and btsync.

Now that it all works without the need for a jail (I think), here are my findings.

I assume a volume has been set up on the FreeNas.

  • create a user 'btsync' with a homedir accessible for writing after the reboot.
  • log on to FreeNas using ssh (putty or shell) with the root user.
  • enable write access on the OS.

    mount -uw /


  • based on http://forums.freena...-install.12722/ I adapted a btsync_install.sh script :
    #!/bin/sh
    # Installs Bittorrent Sync (btsync) under a FreeNAS jail
    # based on http://forums.freenas.org/threads/bittorrent-sync-install.12722/
    # 2013-08-20
    # edited a bit by tim@chaubet.be on 2013-09-05

    cd /tmp

    echo -n "Would you like to install Bittorrent Sync (y/n)? [n] : "
    read install_btsync

    if [ $install_btsync = "y" ]; then
    echo "Initialization of btsync user"
    if [ `more /etc/passwd | grep btsync | wc -l` -gt 0 ]; then
    echo "The btsync user exists. Make sure the home_dir has RW access after boot."
    user_exists=1
    else
    echo "Creation of btsync user should be done via the GUI."
    echo "Set a home_dir which will have write access after reboot, so outside the boot OS."
    #pw useradd btsync -m -c "User Bittorrent Sync" -s /bin/sh -w yes
    user_exists=0
    fi
    if [ user_exists==1 ]; then
    home_dir=`more /etc/passwd | grep btsync | awk -F':' '{ print $6 }'`
    echo "home dir : $home_dir"
    if [ ! -e $home_dir ]; then
    mkdir $home_dir
    echo "home dir did not exist ! -> created."
    fi
    ls -hltrd $home_dir
    config_dir="$home_dir/.conf"
    config_btsync_dir="$config_dir/btsync"

    if [ ! -e $config_dir ]; then
    mkdir $config_dir
    echo "$config_dir created."
    fi
    if [ ! -e $config_btsync_dir ]; then
    mkdir $config_btsync_dir
    echo "$config_btsync_dir created."
    fi
    chown -R btsync $home_dir
    echo "owner of $home_dir changed to btsync."
    chmod -R 744 $home_dir
    echo "permissions on $home_dir changed to rwxr--r--."

    if [ -e btsync_freebsd_x64.tar.gz ]; then
    rm btsync_freebsd_x64.tar.gz
    fi
    echo "Downloading Bittorrent Sync: btsync_freebsd_x64 from amazonaws."
    fetch "http://btsync.s3-website-us-east-1.amazonaws.com/btsync_freebsd_x64.tar.gz"

    if [ -e btsync ]; then
    rm btsync
    echo "existing btsync removed."
    fi
    echo "Extraction of Bittorrent Sync."
    tar xvfz btsync_freebsd_x64.tar.gz
    echo "Copying Bittorrent Sync."
    cp btsync $config_btsync_dir
    chmod -R 755 $config_btsync_dir

    echo "Initialization of the daemon...ROAR"
    cat > "/etc/rc.d/btsync" <<EOF
    #!/bin/sh

    # PROVIDE: btsync
    # REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv

    # btsync service
    # Take from <https://gist.github.com/MendelGusmao/5398362>

    home_dir=`more /etc/passwd | grep btsync | awk -F':' '{ print $6 }'`
    config_dir="$home_dir/.conf"
    config_btsync_dir="$config_dir/btsync"

    # Replace with linux users you want to run BTSync clients for
    BTSYNC_USERS="btsync"
    DAEMON=$config_btsync_dir/btsync

    name="btsync"
    rcvar="btsync_enable"
    #command="$config_btsync_dir/\${name}"

    start() {
    echo "Starting btsync..."
    for btsuser in \$BTSYNC_USERS; do
    HOMEDIR=\`more /etc/passwd | grep \$btsuser | awk -F':' '{ print \$6 }'\`
    #echo "launched from \$HOMEDIR "
    if [ -d \$HOMEDIR/.conf ]; then
    command="\$HOMEDIR/.conf/btsync/btsync"
    echo "btsuser : \$btsuser running command : \$command"
    su -l \$btsuser -c "\$command --config \$HOMEDIR/.conf/btsync/config.json"
    fi
    done
    }

    stop() {
    echo "Stopping btsync..."
    for btsuser in \$BTSYNC_USERS; do
    HOMEDIR=\`more /etc/passwd | grep \$btsuser | awk -F':' '{ print \$6 }'\`
    if [ -d \$HOMEDIR/.conf ]; then
    dbpid=\`pgrep -u \$btsuser btsync\`
    if [ -z "\$dbpid" ]; then
    echo "btsync for USER \$btsuser: not running."
    else
    echo "Stopping btsync for USER \$btsuser: running (pid \$dbpid)"
    kill \$dbpid
    until [ -z "\$dbpid" ]
    do
    dbpid=\`pgrep -u \$btsuser btsync\`
    echo -n "."
    sleep 1
    done
    echo ""
    fi
    fi
    done
    }

    status() {
    for btsuser in \$BTSYNC_USERS; do
    dbpid=\`pgrep -u $btsuser btsync\`
    if [ -z "\$dbpid" ]; then
    echo "btsync for USER \$btsuser: not running."
    else
    echo "btsync for USER \$btsuser: running (pid \$dbpid)"
    fi
    done
    }

    case "\$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart|reload|force-reload)
    stop
    start
    ;;
    status)
    status
    ;;
    *)
    echo "Usage: $/etc/rc.d/btsync {start|stop|reload|force-reload|restart|status}"
    echo " service btsync {start|stop|reload|force-reload|restart|status}"
    exit 1
    esac
    exit 0

    EOF
    chmod 755 /etc/rc.d/btsync
    cp /etc/rc.d/btsync /conf/base/etc/rc.d/
    echo "created btsync startup process in /etc/rc.d/ and /conf/base/etc/rc.d/"

    if [ `more /etc/rc.conf | grep btsync | wc -l` -lt 1 ]; then
    echo "btsync_enable=\"YES\"" >> /etc/rc.conf
    fi

    echo "Web Interface configuration"
    echo -n "User login to the web interface : "
    read user
    echo -n "Password to connect to the web interface : "
    read pwd

    cat > "$config_btsync_dir/config.json" <<EOF
    {
    "device_name": "Freenas",
    "listening_port" : 0, // 0 - randomize port

    /* storage_path dir contains auxilliary app files
    if no storage_path field: .sync dir created in the directory
    where binary is located.
    otherwise user-defined directory will be used
    */
    "storage_path" : "$config_btsync_dir",

    // uncomment next line if you want to set location of pid file
    // "pid_file" : "/var/run/syncapp/syncapp.pid",
    "pid_file" : "$config_btsync_dir/syncapp.pid",

    "check_for_updates" : true,
    "use_upnp" : true, // use UPnP for port mapping

    /* limits in kB/s
    0 - no limit
    */
    "download_limit" : 0,
    "upload_limit" : 0,

    /* remove "listen" field to disable WebUI
    remove "login" and "password" fields to disable credentials check
    */
    "webui" :
    {
    "listen" : "0.0.0.0:8888",
    "login" : "$user",
    "password" : "$pwd"
    }

    }
    EOF
    chown btsync $config_btsync_dir/config.json
    chmod 744 $config_btsync_dir/config.json

    echo "Launching btsync :"
    /etc/rc.d/btsync start
    fi
    fi


    Create the file in the root homedir, give exe access and run it :


    cd /root
    vi installscript.sh


    [insert], paste the script and save (:wq)


    chmod +x installscript.sh
    sh installscript.sh


  • After that, add a post-init command via the freenas-gui that says

    service btsync start


Posted

Would love to know how you got it working. I have the 235 model, and once activated it just ramps up the CPU to 100% and stays there doing nothing.

 

There is nothing special to do, just untar de tar.gz file and launch btsync exec.  However it's true that when you have lot of files to sync, the btsync process goes to 100%. 
If you switch on debugging by touching debug.txt and restarts btsync, you should watch lot of activity in sync.log.
 
I have about 90.000 files, when btsync starts the first time, The NAS can be over 2 hours which CPU between 80-100%.
Posted

 

There is nothing special to do, just untar de tar.gz file and launch btsync exec.  However it's true that when you have lot of files to sync, the btsync process goes to 100%. 
If you switch on debugging by touching debug.txt and restarts btsync, you should watch lot of activity in sync.log.
 
I have about 90.000 files, when btsync starts the first time, The NAS can be over 2 hours which CPU between 80-100%.
 
I left it on overnight (about 8 hours), the CPU was still at 100% the next day and the web interface still refuses to work.
 
This happens if I install BTsync via FPP or via zpkg from the german mirror website.

 

  • 2 weeks later...
Posted

Based on the work of eseelke, erkr and others I was able to get btsync installed on a Zyxel NSA320.

 

Make sure you already have FFP installed. http://zyxel.nas-central.org/wiki/FFP-stick

 

Download the latest version of btsync for ARM (version 1.1.70 at the moment), untar/unzip the tar.gz file, and then place btsync at /ffp/bin/btsync. If you downloaded the file to your local computer you can SCP it to the NAS:

scp btsync root@NSA320:/ffp/bin/

Create the /ffp/start/btsync.sh file:

#!/ffp/bin/sh# PROVIDE: btsync# REQUIRE: LOGIN. /ffp/etc/ffp.subrname="btsync"command="/ffp/bin/btsync"btsync_flags="--config /ffp/etc/btsync.conf"required_files="/ffp/etc/btsync.conf"run_rc_command "$1"

Then set the start script to be executable:

chmod u+x /ffp/start/btsync.sh 

The default config file can be installed by:

/ffp/bin/btsync --dump-sample-config > /ffp/etc/btsync.conf

I recommend that you modify the config to move the btsync storage path out of the FFP root and onto one of your drives. The storage path will contain things like the sync.log which can get large and is accessed a lot, so a USB stick might not be the best place for it.

"storage_path" : "/i-data/md0/.btsync"

I ran into the unreachable web UI and 100% CPU issue that some people are reporting. What I found is that if you change the web UI port to something other than 8888, such as 8080, then this issue goes away. I'm not sure why port 8888 is unavailable on my NAS, but it appears that if btsync can't listen on the port, it gets into a loop that eats the CPU.

Posted

Based on the work of eseelke, erkr and others I was able to get btsync installed on a Zyxel NSA320.

 

Make sure you already have FFP installed. http://zyxel.nas-central.org/wiki/FFP-stick

 

Download the latest version of btsync for ARM (version 1.1.70 at the moment), untar/unzip the tar.gz file, and then place btsync at /ffp/bin/btsync. If you downloaded the file to your local computer you can SCP it to the NAS:

scp btsync root@NSA320:/ffp/bin/

Create the /ffp/start/btsync.sh file:

#!/ffp/bin/sh# PROVIDE: btsync# REQUIRE: LOGIN. /ffp/etc/ffp.subrname="btsync"command="/ffp/bin/btsync"btsync_flags="--config /ffp/etc/btsync.conf"required_files="/ffp/etc/btsync.conf"run_rc_command "$1"

Then set the start script to be executable:

chmod u+x /ffp/start/btsync.sh 

The default config file can be installed by:

/ffp/bin/btsync --dump-sample-config > /ffp/etc/btsync.conf

I recommend that you modify the config to move the btsync storage path out of the FFP root and onto one of your drives. The storage path will contain things like the sync.log which can get large and is accessed a lot, so a USB stick might not be the best place for it.

"storage_path" : "/i-data/md0/.btsync"

I ran into the unreachable web UI and 100% CPU issue that some people are reporting. What I found is that if you change the web UI port to something other than 8888, such as 8080, then this issue goes away. I'm not sure why port 8888 is unavailable on my NAS, but it appears that if btsync can listen on the port, it gets into a loop that eats the CPU.

 

 

Great Step by step! but... it's not working on my DNS-320 I have this error in my ffp log:

 

**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
**** fun_plug script modded by Uli (2012-02-21 ffp@wolf-u.li) ****
Mon Sep 23 17:42:46 CEST 2013
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Running /ffp/etc/fun_plug.init ...
* Running /ffp/etc/rc ...
rcorder: requirement `LOGIN
' in file `/ffp/start/btsync.sh' has no providers.
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh ...
Starting /ffp/sbin/telnetd -l /ffp/bin/sh
* /ffp/start/sshd.sh ...
Generating public/private ecdsa key pair.
/ffp/etc/ssh/ssh_host_ecdsa_key already exists.
Overwrite (y/n)? Starting /ffp/sbin/sshd 
* /ffp/start/rsyncd.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
* /ffp/start/fp_master.sh inactive
* /ffp/start/btsync.sh ...
/ffp/start/btsync.sh: line 3: /mnt/HD/HD_a2/ffp/etc/ffp.subr
: No such file or directory
*  OK
 
I've tried also leaving the script as you suggest with: . /ffp/etc/ffp.subr but it's the same.
 
Any advise?
Posted

Hi guys, forget it, 

 

the guide posted by rwohleb works perfectly I was having problems with the endlines of my notepad++ they was configured as Windows endlines instead of UNIX endlines... after changing this... all works fine!!

  • 2 weeks later...
Posted

Hello everybody,

 

I can confirm that it works with Synology:

DS413 (PPC CPU, Glib Version 2.8)

DS211 (ARM CPU, Glib Version 2.5)

both DS installed via the packages.synocommunity.com.

 

It does not run on a Synology:

DS209+II  (PPC CPU, Glib 2.3.4)

I tried to install it to the DS209+II as well, but it didn't work.

The package won't start.

 

I tried the download package ppc, but it tell me that it needs Glib 2.4.

If somebody does know a way to install it on a DS209+II, i would be really happy, but i guess we need a ppc version from btsync with glib 2.3, like the x86 version.

 

Mats

Posted

hello, i have installed btsync package, on my Zyxel NSA320 from (internal package manager)

 

and i can't acces to gui page, then in info-page i saw my CPU=100% loaded,  top command showed  btsync use +/- 95-98%CPU ..... 

 

anyone hase the same problem ?

 

Edit----------

sorry ... didn't saw the previus posts about zyxel.... i'll try to change the port

Posted

After changing port number, 8888 to 8080 .. can acces GUI, but i can't make Sync  my NAS (nsa320) with PC, and mobile..? who need to setup sync folder first ..?

You need to setup folders on one of your devices. Create a folder on your pc than add this also on the NAS, sync will start.

Posted

NAS: Synology DS1812+

DSM: 4.3-3776-2

Connection: Gigabit LAN

 

I've installed the BT Sync package via the package manager.

I'm currently testing it out between my computer and NAS.

And it all seems to work, except the NAS doesn't detect new files automatically, it only detects and syncs on the predefined 10 minute interval. (ex. If I add an empty text file, it can take up to 10 minutes before it even shows in the Web GUI).

The PC syncs files to the NAS (not from) ~20 seconds after creation. (These files are then immediately visible in the BT Sync Web GUI on the NAS).

 

Isn't the NAS supposed to detect and sync new and changed files the same way the PC does?

 

If so, any ideas how to fix this?

If not, how can I make the NAS folder rescan interval shorter (I haven't found any option in the Web GUI nor any config file on the NAS)?

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.