× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Bitcasa on Readynas?

irv1
Aspirant

Bitcasa on Readynas?

Does anyone know if its likely that Bitcasa will ever be available as an addon for readynas?

info http://www.bitcasa.com/about, they are planning a linux release.

invites https://portal.bitcasa.com/invited/42506020b3104578b154dbb067186d26/ - 7 left at time of posting

Cheers
Message 1 of 11
mdgm-ntgr
NETGEAR Employee Retired

Re: Bitcasa on Readynas?

What are the system requirement for Bitcasa for Linux?

How is Bitcasa managed? Via web-interface, CLI (command line interface) or something else?
Message 2 of 11
Readyboi
Aspirant

Re: Bitcasa on Readynas?

--BUMP!--

The Bitcasa product is now fully public and there is a Linux app. Is there any movement on the above does anyone know?
Message 3 of 11
super_poussin
Virtuoso

Re: Bitcasa on Readynas?

Bitcasa is alpha on Linux
Message 4 of 11
JMehring
Apprentice

Re: Bitcasa on Readynas?

If anyone is interested, I do have the Bitcasa Alpha running on the ReadyNAS OS6 (kind of headless). I can detail instructions how to get it running. I have also set it up so the bitcasa drive can be shared to other computers.

So far its being running great.
Message 5 of 11
Readyboi
Aspirant

Re: Bitcasa on Readynas?

Yes please JMehring!
Message 6 of 11
JMehring
Apprentice

Re: Bitcasa on Readynas?

I will do this is two steps. The first step will be getting Bitcasa to run semi-headless where you will need to set up an ssh tunnel from another machine to start it. This will help in debugging any problems since I may have forgotten a step.

I assume you have ssh access to NAS.

Grab 'bitcasa_0.9.6.99_amd64.deb' from somewhere and put it on NAS 🙂

We need to install a few things first

apt-get update
apt-get install x-window-system
apt-get install xvfb
apt-get install liblog4cxx10 libprotobuf7 libqtgui4
dpkg -i bitcasa_0.9.6.99_amd64.deb

cp Xvfb /etc/init.d/
cp bitcasa /etc/init.d/
update-rc.d Xvfb defaults
update-rc.d bitcasa defaults


The Xvfb and bitcasa script refereed to are going to be in next post.

Once everything is installed, can test by ssh tunnel from another linux box, which will display Bitcasa control panel on that machine to set it up for the initial time and test its working.

Note that all the Bitcasa mounts will be set up in the home directory of the user you connect to. If you connect as root, they will be in '/root/Bitcasa'. I created a new user at first called bitcasa. Be sure you can log in a user first (you may need to edit '/etc/passwd' and choose shell '/bin/bash' if its set to 'bin/false' and be sure its pointed to correct home directory.

Also be sure user is in fuse group.

Line that begin with '#' are just comments.

ssh -X s

# Add user 'bitcasa' to fuse group
usermod -a -G fuse bitcasa

# Start Bitcasa
Bitcasa


Now just set up Bitcasa and test to make sure it works. I noticed you can not gracefully shutdown Bitcasa it seems so you will need to do something like 'ps ax | grep Bitcasa' to get pid and kill it like 'kill -9 pid'

Next post will contain scripts to have it start automatically.
Message 7 of 11
JMehring
Apprentice

Re: Bitcasa on Readynas?

I will include the scripts I use. I assume you already have a working Bitcasa now.

I have my Bitcasa start as user admin where the user admin home directory is at /data/bitcasa. The above example I added the bitcasa user to fuse, but I also added admin since I use admin so things like rsync can access share. I had to also change '/etc/passwd' to allow admin to have a '/bin/bash' shell and changed the home directory to '/data/bitcasa'. admin is the owner if '/data/bitcasa'. You do not need to have admin as the user though. Following is my '/etc/passwd' entry for both bitcasa and admin. Choose one. Only change home folder path and or shell. IMPORTANT. You can really mess stuff up editing '/etc/passwd' directly so be careful; maybe make a backup. You may never be able to login again if you really mess it up.

admin:x:98:98::/data/bitcasa:/bin/bash
bitcasa:x:2222:2000::/data/bitcasa:/bin/bash


I have this script located as /data/bitcasa/Bitcasa.sh. This could have been done in the /etc/init.d/bitcasa script by setting display and just running Bitcasa in background but I am too lazy to change it sine it works now 🙂
#!/bin/sh
DISPLAY=:0 /usr/bin/Bitcasa
#su -c "DISPLAY=:0 /usr/bin/Bitcasa" -s /bin/sh bitcasa


I have another script called /etc/init.d/Xvfb. That allow Bitcasa to run headless
#! /bin/sh

### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO

N=/etc/init.d/Xvfb

set -e

case "$1" in
start)
Xvfb :0 -screen 0 1024x768x24 &
;;
stop|reload|restart|force-reload)
;;
*)
echo "Usage: $N {start|stop|restart|force-reload}" >&2exit 1
;;
esac

exit 0


Then, my last main script is /etc/init.d.bitcasa. Note at the present time I need to list which folders will be unmount manually and you would have to edit the file to reflect locations on your filesystem since it was a quick hack to get it working for only me. Its still a work in progress but normally works. Sometimes I need to go '/etc/init.d.bitcasa stop' twice to get everything to stop if there was an error.

#!/bin/sh
#
### BEGIN INIT INFO
# Provides: bitcasa
# Required-Start: $local_fs $network $remote_fs $Xvfb
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of Bitcasa
# Description: starts instance of Bitcasa using start-stop-daemon
### END INIT INFO

# Script name
NAME=bitcasa

# App name
DESC=Bitcasa

## The defaults
# Run as username
RUN_AS=admin

# Path to app SB_HOME=path_to_app_SickBeard.py
# APP_PATH=${SB_HOME-/opt/sickbeard}
APP_PATH=/data/bitcasa

# Path to store PID file
PID_FILE=${SB_PIDFILE-/var/run/bitcasa/bitcasa.pid}
#PID_FILE="/var/run/bitcasa/bitcasa.pid"

# path to python bin
DAEMON="/data/bitcasa/Bitcasa.sh"

PID_PATH=`dirname $PID_FILE`
TARGET_DIR="/data/bitcasa"

##
###test -x $DAEMON || exit 0
set -e

# Make sure the app dir is owned by us
#chown -R $RUN_AS $APP_PATH

# Create PID directory if not exist and ensure the SickBeard user can write to it
if [ ! -d $PID_PATH ]; then
mkdir -p $PID_PATH
chown $RUN_AS $PID_PATH
fi

if [ -e $PID_FILE ]; then
PID=`cat $PID_FILE`
if ! kill -0 $PID > /dev/null 2>&1; then
echo "Removing stale $PID_FILE"
rm $PID_FILE
fi
fi

case "$1" in
start)
echo "Starting $DESC"
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --exec $DAEMON -- $TARGET_DIR
;;
stop)
echo "Stopping $DESC"
#start-stop-daemon --stop --pidfile $PID_FILE --retry 15
echo "killing /usr/bin/Bitcasa"
if /bin/pidof /usr/bin/Bitcasa; then
kill -9 `/bin/pidof /usr/bin/Bitcasa`
fi
echo "killing Bitcasa.sh"
if /usr/bin/pgrep Bitcasa.sh; then
kill -9 `/usr/bin/pgrep Bitcasa.sh`
fi
echo "Unmounting /data/bitcasa/Bitcasa/Bitcasa\ Infinite\ Drive"
if ! /bin/fusermount -u /data/bitcasa/Bitcasa/Bitcasa\ Infinite\ Drive; then
echo "Could not dismount (maybe it was already dismounted)"
fi
echo "Stopped $DESC"
;;

restart|force-reload)
echo "Restarting $DESC"
#start-stop-daemon --stop --pidfile $PID_FILE --retry 15
echo "killing /usr/bin/Bitcasa"
if /bin/pidof /usr/bin/Bitcasa; then
kill -9 `/bin/pidof /usr/bin/Bitcasa`
fi
echo "killing Bitcasa.sh"
if /usr/bin/pgrep Bitcasa.sh; then
kill -9 `/usr/bin/pgrep Bitcasa.sh`
fi
echo "Unmounting /data/bitcasa/Bitcasa/Bitcasa\ Infinite\ Drive"
if ! /bin/fusermount -u /data/bitcasa/Bitcasa/Bitcasa\ Infinite\ Drive; then
echo "Could not dismount (maybe it was already dismounted)"
fi
echo "Stopped $DESC"
start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --exec $DAEMON -- $TARGET_DIR
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0


If you make it better, let me know 🙂 I may add code to find all directories contained in Bitcasa directory and unmount them all automatically at some point.

This all works for me just fine. Please just be careful if you are not used to tinkering in Linux.

I also heard that using Bitcasa Alpha in Linux and Windows many mess up the Windows Bitcasa files. Since I do not use Windows I don;t know if this is true or not.
Message 8 of 11
JMehring
Apprentice

Re: Bitcasa on Readynas?

BTW, To reliability upload initial mass data to Bitcasa use the ReadyNAS Backup system using rsync. It works really well!!!

Just a note though that the ReadyNAS will create a snaphot when backing up, so if you delete files or cancel the download before it is finished the snapshot will still be present and you will not be able to free up space on the shares.

I can also provide info on how to remove the temporary snapshots the backup program creates if needed since i noticed the backup program does not remove them for me if I cancel the backup before its completed.
Message 9 of 11
Readyboi
Aspirant

Re: Bitcasa on Readynas?

Is it possible to use the ReadyNAS backup functionality from the web frontend to backup/copy files to bitcasa? I.e. to avoid installing the app. Is there an RSync/ftp/smb/etc that you can connect to and drop files?
Message 10 of 11
JMehring
Apprentice

Re: Bitcasa on Readynas?

Not that I know of. Although the developer API was released about a week ago for Bitcasa so there may end up being more options soon. Bitcasa is going to be releasing a new Linux driver soon as well, but it will only be available for new customers or those that decide to upgrade to there more expensive packages.
Message 11 of 11
Top Contributors
Discussion stats
  • 10 replies
  • 4782 views
  • 0 kudos
  • 5 in conversation
Announcements