Posted by: Ian | June 20, 2010

Install Crashplan on a Qnap Atom (TS-x59)

This guide is a modified version of the original by Cokeman.dk as there are some bits that didn’t quite work.

How to install and enable CrashPlan on the QNAP nas (Atom models)

Install: Opware (qpkg, from qnap homepage)

From an SSH run this:

ipkg update
ipkg install nano
ipkg install cpio
ipkg install bash
ipkg install coreutils
cd /opt
ln -s /opt/bin/bash /bin/bash
wget http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_2010-03-08_Linux.tgz
tar zfx CrashPlan_2010-03-08_Linux.tgz
rm CrashPlan_2010-03-08_Linux.tgz
cd /opt/CrashPlan-install

Edit the install.sh (I use the command “nano install.sh“)

#!/opt/bin/bash
BINSLOC=”/bin /opt/bin /usr/bin /usr/local/bin”

Install Crashplan (command is: “./install.sh”) using “admin” user and into “/opt/crashplan”

Getting it to start on reboot

edit /etc/config/qpkg.conf, and add: (I use the command ”nano /etc/config/qpkg.conf”)

[CrashPlanStarter]
Name = CrashPlanStarter
Version = 0.1
Enable = FALSE
QPKG_File =
Date = 2009-12-06
Shell = /share/MD0_DATA/.qpkg/crashplan/cprun.sh
Install_Path = /share/MD0_DATA/.qpkg/crashplan
Author = Cokeman.dk

now we must create the “/share/MD0_DATA/.qpkg/crashplan/cprun.sh”:

mkdir /share/MD0_DATA/.qpkg/crashplan

use your favorite scp program to transfer the cprun.sh, attached to the guide. into “/share/MD0_DATA/.qpkg/crashplan”

Last but not at least, run the command:

chmod +x /share/MD0_DATA/.qpkg/crashplan/cprun.sh

In addition edit /opt/qpkg/crashplan/bin/CrashPlanEngine and add the line:

#!/opt/bin/bash
BINSLOC=”/bin /opt/bin /usr/bin /usr/local/bin”

To start crashplan use the webadmin of the QNAP, to start the QPKG, that we have just made.

or you can start crastplan manualy to test if it works. (It will not start on reboot, there you must enable it using the webadmin)

cd /opt/crashplan/bin

ln -s /opt/bin/bash /bin/bash

./crashplan start

Here is the cprun.sh file – Note I’ve modified the sleep intervals.

#!/bin/sh
RETVAL=0
QPKG_NAME=”CrashPlanStarter”
_exit()
{
/bin/echo -e “Error: $*”
/bin/echo
exit 1
}
# Determine BASE installation location according to smb.conf
BASE=
publicdir=`/sbin/getcfg Public path -f /etc/config/smb.conf`
if [ ! -z $publicdir ] && [ -d $publicdir ];then
publicdirp1=`/bin/echo $publicdir | /bin/cut -d “/” -f 2`
publicdirp2=`/bin/echo $publicdir | /bin/cut -d “/” -f 3`
publicdirp3=`/bin/echo $publicdir | /bin/cut -d “/” -f 4`
if [ ! -z $publicdirp1 ] && [ ! -z $publicdirp2 ] && [ ! -z $publicdirp3 ]; then
[ -d "/${publicdirp1}/${publicdirp2}/Public" ] && BASE=”/${publicdirp1}/${publicdirp2}”
fi
fi
# Determine BASE installation location by checking where the Public folder is.
if [ -z $BASE ]; then
for datadirtest in /share/HDA_DATA /share/HDB_DATA /share/HDC_DATA /share/HDD_DATA /share/MD0_DATA; do
[ -d $datadirtest/Public ] && BASE=”/${publicdirp1}/${publicdirp2}”
done
fi
if [ -z $BASE ] ; then
echo “The Public share not found.”
_exit 1
fi
QPKG_DIR=${BASE}/.qpkg/crashplan
case “$1″ in
start)
if [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` = UNKNOWN ]; then
/sbin/setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
elif [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` != TRUE ]; then
_exit  “${QPKG_NAME} is disabled.”
fi
/bin/echo “Enable CrashPlanStarter”
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
/bin/sleep 30
source /etc/profile
/bin/sleep 60
mkdir /var/lib/crashplan
cp /share/MD0_DATA/.qpkg/crashplan/.identity /var/lib/crashplan/
#    #sleep 120
/opt/crashplan/bin/crashplan start
;;
stop)
/bin/echo “Disable CrashPlanStarter”
/opt/crashplan/bin/crashplan stop
cp /var/lib/crashplan/.identity /share/MD0_DATA/.qpkg/crashplan/
;;
restart)
$0 stop
$0 start
;;
*)
echo “Usage: $0 {start|stop|restart}”
exit 1
esac
exit $RETVAL

One final thing is after starting and setting up crashplan as you want run the following command to save the identity for CrashPlan:

cp /var/lib/crashplan/.identity /share/MD0_DATA/.qpkg/crashplan/

Now it should work after a restart :)

Posted by: Ian | January 13, 2010

Baby due to arrive

Baby will likely be here Monday.  To follow the progress I’ll be tweeting away as the day progresses.

Posted by: Ian | January 4, 2010

Moved house and settling in

Well after moving house I knew the Kitty wouldn’t be under too much stress after the move.  Clearly I underestimated how relaxed she would be.

P1010564 P1010565 P1010566 P1010567

Posted by: Ian | December 1, 2009

Installing .Net 3.5 after a previous install fails

I’ve been building a 2008 Server base image in preparation for SQL 2008 and as part of the install .Net 3.5 is needed. Unfortunately first time round the server crashed mid way through the install. Any attempt after that failed to install or remove .Net 3.5.

So after a bit of digging around here’s what I did to get it all working again:

  • Clear out the %Temp% dir
  • Delete the following Reg keys
  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework Setup
  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv2.0.50727
  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.0
  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.5
  • Install .NET framework 3.0 from Role Management tool on the box.
  • Computer Management -> Features -> Add features ->.NET framework 3.0 framework
  • Then install .NET framework 3.5
Posted by: Ian | November 30, 2009

Google Wave

Got myself an invite to Google Wave this morning. Now I just need to figure out if it’s any use!

Posted by: Ian | November 25, 2009

Google Maps car spotted

Just on my way back to the office and spotted a Google Streetview camera car driving down Nelson street in Auckland. I had no idea they actually updated the streetview after the initial shots. I’ll have to monitor it now and see when I pop up on there!

Posted by: Ian | November 5, 2009

Squid access.log TCP_DENIED explainations

Just yesterday I had to diagnose some squid errors as some users couldn’t get to certain websites. Upon checking through the access.log there were a few TCP_Misses. I found some useful explanations for common Squid log messages:

If it’s TCP_DENIED/407 then your proxy is set up to use some form of authentication and the authentication is failing. Either an automated update tool doesn’t have the credentials to use or a user has forgotten their username/password. This is usually solved when the user tells you they can’t access the internet, or their auto-update is failing.

If it’s TCP_DENIED/400 then the syntax of the request was wrong. With this you might also see something like "error:invalid-request" or "error:unsupported-request-method". The user (or a link on a web page) did something wrong – look at the entries after these and see if there is a successful request.

If it’s TCP_DENIED/401 then the page requires authorisation. There’s probably an entry after these where they authenticated themselves. If there isn’t they probably don’t have a username/password for the site – it’s not really your problem (unless it’s your site).

Posted by: Ian | November 3, 2009

Xenapp 5 PNAgent connecting to the wrong/old URL

I’ve been building a new Citrix environment which heavily relies on PNagent to deliver applications to Users. After rebuilding some of the backend apps servers we ran in to an issue with PNagent picking up a wrong URL entry (I setup a round robin DNS with 0 TTL). After some googling here is the fix:

Modify your default user profile’s ntuser.dat file and then replace the original with the modified one on each workstation through a batch file, login script, Altiris, etc.

To modify the ntuser.dat file open regedit locally, select the HKEY_USERS hive, select File, then Load Hive, browse to c:\documents and settings\default user, select the ntuser.dat file here, name it defaultuser and click ok, expand HKEY_USERS and then expand defaultuser and drill down to: Software\CITRIX and change the following to correspond to the correct server url:

\CtxLogon\RecentServers
\Program Neighborhood Agent\Config URL
\Program Neighborhood Agent\Enum URL
\Program Neighborhood Agent\Enum_Smartcard URL
\Program Neighborhood Agent\Launch URL
\Program Neighborhood Agent\Launch_Smartcard URL
\Program Neighborhood Agent\Reconnect URL
\Program Neighborhood Agent\Reconnect_Smartcard URL

After completing this process, select the defaultuser hive then select File and then Unload Hive to save the modified ntuser.dat file. Locate this file and copy off to a network install point (file server) and use the process of your choice to deploy it to all workstations.

Posted by: Ian | October 22, 2009

Honda Jazz Sport intake

Here is another picture of the Jazzs’ Intake system I did. The picture is from a local NZHondas meet. So far the intake is performing very well, with definite low end torque improvement. I don’t expect to see MPG gains until the next tank of fuel, but will report when I start to see the difference, good or bad.

image0012

Posted by: Ian | October 16, 2009

Honda Jazz Sport Short Ram Intake

I’ve been following a thread on fitfreak (Fit is the Japan/US name for a Jazz) with regards to modifiying the stock air intake for a short ram. The benefits people are seeing are varied from a few miles per gallon extra, better throttle response and better low end torque. Whether I’ll see these on mine is yet to be seen.

Took this picture on my way out to work this morning but will upload some better ones.

image0011

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.