This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO] Install Crasplan in jail

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
erik
experienced User
experienced User
Posts: 83
Joined: 14 Jul 2014 09:45
Status: Offline

[HOWTO] Install Crasplan in jail

Post by erik »

I spend some time to get this working. This works on 10.2.0.2 - Prester (revision 2268) embedded configuration
It contains the following parts:
Enabling Linux emulation in the freeBSD core
Installing TheBrig as jail manager
Creating a jail to run crashplan
Build all required SW inside the jail and install Crashplan
Setup the connection between the desktop ui app and the crashplan engine in N4F

Enabling Linux emulation:
Goto system/advance/loader.conf and add

Code: Select all

linprocfs_load=YES 
linsysfs_load=YES 
linux_load=YES 
and restart n4f
ssh into n4f and run

Code: Select all

kldstat
and check if the linux modules are loaded

Installing jail manager:
Create a zfs dataset so you can snapshot and rollback if you make mistakes.
I created

Code: Select all

/tank/jails
Start with installing TheBrig.
ssh into n4f and run

Code: Select all

cd /tmp
fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh
/bin/sh thebrig_install.sh /tank/jails 3
Refresh the nas4free web control page, move to extensions/TheBrig/Maintenance/Rudimentary_config and hit "save"
Now load all tarballs.
Go to extensions/TheBrig/Maintenance/Tarbal_management and hit "query"
Select all 4 tarbals of the 10.2 release and hit "fetch"
Wait till the tarbals are downloaded
Now you have to create the jail that runs crashplan
Go to extensions/TheBrig/Jails and hit the "+" to create a new jail.
Set name to

Code: Select all

crashplan
And add a network connected to your main network card (not to a bridge) as

Code: Select all

192.168.0.85/24
Select all 4 tarbals
Hit "more" and select add

Code: Select all

allow.mount.procfs
allow.mount.nullfs
allow.mount.zfs
Hit "add" and wait till the build is finished
Hit "apply changes" and "start" to start the jail
If the starting of the jail fails you have to look in the /tmp folder for a file with the name crashplan.log to search for the error.

Install crashplan:
Use ssh to go into the jail

Code: Select all

jls
jexec 1 chs
(the number of the jail may be different)
and run

Code: Select all

portsnap fetch extract
cd /usr/ports/emulators/linux_base-f10/ && make install clean
cd /usr/ports/sysutils/linux-f10-procps/ && make install clean
cd /usr/ports/editors/nano && make install clean
Hit OK when asked while building nano
Exit the jail, stop the jail. Go to extensions/TheBrig/Jails and click the pencil after the "Crashplan" jail, hit "more" and add to the fstab

Code: Select all

linprocfs /tank/jails/crashplan/compat/linux/proc linprocfs rw 0 0
Save, apply changes
Download from http://www.oracle.com/technetwork/java/ ... 80-oth-JPR the file

Code: Select all

jre-7u80-linux-i586.tar.gz
and rename to

Code: Select all

jre-7u80-linux-i586.tar.gz
This because the file downloaded will have a different name.
Upload the file into

Code: Select all

/tank/jails/crashplan/usr/ports/distfiles
Start the jail and ssh back into it
If the jail does not start there is an error in either the new fstab entry (linprocfs) or building linprocfs failed.
Run

Code: Select all

cd /usr/ports/sysutils/linux-crashplan && make install
Hit ENTER (OK) at every configuration question (bash, bison, m4, perl)

Use nano to edit

Code: Select all

/usr/local/share/crashplan/conf/my.service.xml
and change after <serviceHost> "localhost" or "127.0.0.1" to "0.0.0.0" and look at the port number behind <servicePort>
The ui token you need for the desktop application connection can be found here

Code: Select all

/compat/linux/var/lib/crashplan/.ui_info
If it does not exist it will be generated after starting crashplan.

Do

Code: Select all

nano /etc/rc.conf
and add

Code: Select all

crashplan_enable=YES
Start crashplan with

Code: Select all

/usr/local/share/crashplan/bin/CrashPlanEngine start
Run top and see if there are many java processes as evidence crashplan is running
Stop crashplan with

Code: Select all

/usr/local/share/crashplan/bin/CrashPlanEngine stop
and exit from the jail (will be done automatically when jail stops)
Stop the crashplan jail (this will take a couple of seconds, be patient) and edit the jail configuration and set as startupscript

Code: Select all

/usr/local/share/crashplan/bin/CrashPlanEngine start
and stop script

Code: Select all

/usr/local/share/crashplan/bin/CrashPlanEngine stop
Enable autostart of the jail, hit save and apply changes

Link to folder to backup:
Now you have to add the folder you want crashplan to backup
Create folder /tank/jails/crashplan/tank/shared and add an fstab entry

Code: Select all

/tank/shared /tank/jails/crashplan/tank/shared nullfs ro 0
Assuming you want crashplan to backup /tank/shared, set to read-only just to be sure.
Save, apply changes
Now you have the crashplan engine fully setup.
If you ever use the "house" icon in the desktop application to change system settings this will reset the servicehost to 127.0.0.1 and may break the connections between desktop and engine

Connect with desktop GUI:
Go to your desktop windows computer and install crashplan 4.5.2
Follow https://miketabor.com/install-crashplan-synology/ guide on how to connect your desktop crashplan gui to you freebsd crashplan engine or use the instructions below
You can find the gui token in

Code: Select all

/compat/linux/var/lib/crashplan/.ui_info
While you look at it check if the listen address is 0.0.0.0 and not 127.0.0.1
Edit the desktop crashplan UI.Properties files to point to the jails IP address (192.168.0.85 in this case)
Edit the desktop .ui_info to have the same GUI token and the IP address of the crashplan jail. Port number should be 4243 (at least same as in the crashplan engine .ui_info
Start the crashplan desktop and use top inside the jail to see if the java process start to use cpu time. if not the connection between desktop and engine is not established
After some 10 or more seconds the desktop app will request you to login.
The main purpose of this post is to have a record for myself on how I did enable crashplan. Hope it helps some other people.
Last edited by erik on 09 Nov 2016 10:53, edited 1 time in total.
primary NAS: 2*8Tb raidz1, backup NAS: 6*2TB raidz2, remote backup NAS: 3*2TB raidz1 : All NAS4Free 11.0

mamisano
NewUser
NewUser
Posts: 8
Joined: 25 Mar 2014 17:22
Location: New York
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by mamisano »

Very cool, I need to find some time to try this. I currently have my home movies on NAS, with a shared folder soft-linked to my PC's C: drive so I can have crashplan back it up.

Will be nice to have crashplan running natively. I tried the install using the older blog post found on the web but could never get it to work. Will report back my installation experience.

Nas4Free 11.1.0.4 - Atomics (revision 4517) Embedded
MB: Biostar TA790GXE
CPU: AMD Athlon X2 245 (65w)
RAM: 8gb DDR2
NIC: Onboard Realtek 1Gbit
Controller: Onboard 6x SATA II
Storage: Raid Z1 2x 3TB Seagate Barracuda ST3000DM001, 1x 3TB HGST HDN724030ALE640

tomwaller
NewUser
NewUser
Posts: 2
Joined: 14 Aug 2015 17:05
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by tomwaller »

Thanks for the write up.

I followed your guide and now have CrashPlan running in the jail which I can connect to. The only issue I am seeing is I can't see my mounted folders in the CrashPlan GUI to select them for backup.

I have them mounted to the jail under /mnt/users and /mnt/shared (they are ZFS datasets) and I can see the files if I SSH or WinSCP to the jail so I know they are mounted, but when I select a folder in the CP GUI I try to expand the /mnt folder but no folders are listed.

Any one seen this before?

tomwaller
NewUser
NewUser
Posts: 2
Joined: 14 Aug 2015 17:05
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by tomwaller »

OK - Ignore my previous comment. It seems that I needed to mount the folders elsewhere. In my case I changed the jail mount from /mnt to /cp and it worked fine.

One other thing I am noticing is about the unique identity that the GUI needs from the server to operate headless. I just bounced my NAS4Free server and the port and identity changed so I had to re-do the GUI config. Is that correct?

erik
experienced User
experienced User
Posts: 83
Joined: 14 Jul 2014 09:45
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by erik »

Yes,

I added a cron entry to copy the UID to a shared location so in case I have a connection problem I easily can update the UID in the crashplan GUI
primary NAS: 2*8Tb raidz1, backup NAS: 6*2TB raidz2, remote backup NAS: 3*2TB raidz1 : All NAS4Free 11.0

danzi
Starter
Starter
Posts: 66
Joined: 11 Nov 2012 23:24
Location: Budapest
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by danzi »

I am trying this in a VirtualBox install before replicating it to the live system.

Anyone tried this yet with 10.3.0.3 - Pilingitam (revision 2987) ?
----------------------------------------------
Dell T130 - 32Gb ECC - ESXi 6.7
VM Full Instal - 11.2.0.4 - Omnius (revision 6005)
HP/LSI 9121-4i SAS2008 Pass Through mode
2 x 2Tb ZFS mirror
1 x 3Tb UFS
----------------------------------------------

erik
experienced User
experienced User
Posts: 83
Joined: 14 Jul 2014 09:45
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by erik »

Upgraded to Crashplan 4.8 on Nas4free 10.3.
Had to do a complete re-install.
No need to install linux emulator before crashplan as crashplan port installation will install correct linux emulator
Added to run.conf the switch -Djava.net.preferIPv4Stack=true
Make sure your /etc/hosts contains the name of the server hosting crashplan
Had to change findpid in Crashplanengine to

Code: Select all

_findpid() {
	/bin/ps | grep 'app=CrashPlan' | grep -v grep | awk '{ print $1 }'
}
When I have more time I will update the [HOWTO]
primary NAS: 2*8Tb raidz1, backup NAS: 6*2TB raidz2, remote backup NAS: 3*2TB raidz1 : All NAS4Free 11.0

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by raulfg3 »

thanks a lot.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

MasterBlaster
NewUser
NewUser
Posts: 8
Joined: 11 Feb 2016 18:06
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by MasterBlaster »

erik wrote:
10 Nov 2016 16:11
Upgraded to Crashplan 4.8 on Nas4free 10.3.
Had to do a complete re-install.
No need to install linux emulator before crashplan as crashplan port installation will install correct linux emulator
Added to run.conf the switch -Djava.net.preferIPv4Stack=true
Make sure your /etc/hosts contains the name of the server hosting crashplan
Had to change findpid in Crashplanengine to

Code: Select all

_findpid() {
	/bin/ps | grep 'app=CrashPlan' | grep -v grep | awk '{ print $1 }'
}
When I have more time I will update the [HOWTO]
So I'm running nas4free 11.0.0.4 trying to follow this guide. I already have TheBrig successfully installed and a Jail setup. I'm assuming we can skip the part regarding fetching the emulators as well as installing nano? I didn't read your comment until after performing the fetch and that's when I found out there are no Fedora builds listed, there only appears to be CentOS ones.

Image

So can I just continue with attempting to install crashplan? Do I still need to install jre? An updated guide sure would be helpful if someone would be so kind to oblige.

erik
experienced User
experienced User
Posts: 83
Joined: 14 Jul 2014 09:45
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by erik »

I stopped using crashplan in a jail. Too many conflicting dependencies to solve with every upgrade. I now run a small virtualbox VM using lubuntu and crashplan on lubuntu. Much simpler to install and maintain
primary NAS: 2*8Tb raidz1, backup NAS: 6*2TB raidz2, remote backup NAS: 3*2TB raidz1 : All NAS4Free 11.0

MasterBlaster
NewUser
NewUser
Posts: 8
Joined: 11 Feb 2016 18:06
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by MasterBlaster »

erik wrote:
02 Feb 2017 14:06
I stopped using crashplan in a jail. Too many conflicting dependencies to solve with every upgrade. I now run a small virtualbox VM using lubuntu and crashplan on lubuntu. Much simpler to install and maintain
How are you attaching your storage to the VM? I have a RSV-L4500 full of disks booting nas4free off a usb. Ultimately I want to consolidate all my data to the NAS and have it backed up with some sort of cloud service so I'm not just relying on hardware. Any ideas or suggestions?

erik
experienced User
experienced User
Posts: 83
Joined: 14 Jul 2014 09:45
Status: Offline

Re: [HOWTO] Install Crasplan in jail

Post by erik »

I have one very large volume storing everything (backups, shares, etc...) mounted under /tank
I share and mount /tank readonly in the VM using samba (could also be done with nfs)
primary NAS: 2*8Tb raidz1, backup NAS: 6*2TB raidz2, remote backup NAS: 3*2TB raidz1 : All NAS4Free 11.0

Post Reply

Return to “Jails”