Tag Archives: server

Installing Crashplan 4.5 on Headless Ubuntu Server with X11 Forwarding

Running Crashplan on a Headless Server is Officially Unsupported

A while ago my Crashplan installation stopped working (probably became out of date) and I’ve recently migrated the rest of my services and applications over to Docker containers, which I have been very happy with. So I didn’t anticipate too much trouble when trying to move Crashplan into a docker container as well, however I was running into difficulties because Crashplan requires the GUI for configuration. The xeor/crashplan (https://hub.docker.com/r/xeor/crashplan/) image seemed like the perfect fit, it would make Crashplan Desktop accessible via VNC. However after fiddling with this, it turns out Crashplan has made some updates which has broken this image.

And it’s clearly not a priority for them to properly document because I couldn’t even manage to get their published (year old) instructions (https://support.code42.com/CrashPlan/4/Configuring/Using_CrashPlan_On_A_Headless_Computer) working. Even if I managed to get this working, the workflow was not ideal, requiring port forwarding and copying data from the server to local PC that seems to change every time the service restarts – a much more kludgy process than I remember going through last time, which only involved updating the IP on a Windows PC to point to the remote headless machine.

Recommendation: Use X11 Forwarding

X11 forwarding is simple to setup and it allows Linux GUI windows from a remote machine that you are SSH’d into to be displayed on your local machine. I went ahead and installed Crashplan natively on my Ubuntu server and followed the steps below to get it installed on Ubuntu and configured remotely from my Windows machine.

Install Crashplan

  1. Download the latest Crashplan Linux installer
    wget http://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_4.5.0_Linux.tgz
  2. Unzip the package
    tar -xvf CrashPlan_4.5.0_Linux.tgz
  3. Go into the installation directory and run the install command
    cd crashplan-install/
    sudo ./install.sh
  4. Follow the installation steps and proceed as you wish. I used the default installation options.

Configure Ubuntu Server for X11 Forwarding

  1. Install xterm if it’s not already installed
    sudo apt-get install xterm

Note: If at the end of this guide you are having any troubles, there are a ton of guides on setting up X11 so I suggest reviewing those to make sure the rest of your Ubuntu SSH settings are configured properly.

Configure Windows PC for X11 Forwarding

  1. You will first need an SSH client, for this I suggest Putty (http://www.putty.org/)
  2. You will also need an X Windows System. There are also multiple options but I used Xming (http://sourceforge.net/projects/xming/)
  3. Open Putty and fill in the Hostname/IP of your server and make sure SSH and PORT 22 are specified.
  4. Next, go to the Connection > SSH > X11 option in the Category tree and check “Enable X11 forwarding”x11 forwarding for Crashplan Headless Server
  5. Then hit open and login to your machine.
  6. You can test that X11 forwarding is working by opening an application like firefox or just go straight ahead and launch the Crashplan UI by typing `CrashPlanDesktop`. Wait a few seconds and the welcome screen should pop up.

Configure Crashplan Normally

Now that you have the Crashplan UI displayed, you can login normally and specify the directories that you want to backup. You’ll now have the same level of control that you’d typically have from a PC with a GUI.

During my research I encountered a lot of people trying to get Crashplan working with Unraid as well, maybe one day Crashplan will develop a WebUI for those of us running servers or NAS’s, but if you haven’t chosen a cloud backup provider already, I’d suggest looking at others that are more Linux-friendly. Until then, its a simple enough process to launch Xming, SSH into my server and run a single command.

Installing Xen or Xen Cloud Platform from USB

When downloading Xen or Xen Cloud Platform you get an iso which I initially tried loading on my usb stick using unetbootin which is my typical go-to for linux installations. However, I was having troubles and wasn’t able to boot into the installation.

I found the following directions from darkod on the Ubuntu forums here which enabled me to successfully complete the installation.

1. Open the usb stick and in the root rename syslinux.cfg to syslinux.old
2. In the folder boot/isolinux, find and rename isolinux.bin to syslinux.bin, isolinux.cfg to syslinux.cfg
3. Go back and rename the whole folder isolinux to syslinux

PS3 Media Server on Ubuntu

I have my fileserver set up to run a variety of tasks since it is always on. One of the things I like is the ability to stream a variety of videos to my PS3. Natively the PS3 has limited file support for streaming so transcoding using a great open source program called PS3 Media Server is necessary.

A member of the PS3 Media Server forum, Paissad put together this script below (that is no longer hosted on the forums, so I have a mirror below) that goes through the entire installation process.

The only configuration that needs to be done is going to /etc/pms-linux/PMS.conf and specifying what folders you want to share.

Here you can find the script that goes into the init.d folder to auto-start PS3 MS upon bootup if it is not placed there automatically.

Installing Ventrilo Server on Ubuntu 10.10

I found a great guide to installing Ventrilo on Ubuntu 9.10, I followed the steps and it worked perfectly on my installation of 10.10 as well. It fills in all the gaps that official ventrilo installation guide has.

Source: Brandon Williams @ http://rocketeerbkw.com/content/installing-ventrilo-server-ubuntu-910-karmic-koala

If you’re running a 64bit version of Ubuntu, you must install the 32bit libs

# sudo apt-get install ia32-libs

Create a user for ventrilo to run under

# sudo useradd ventrilo

Download the linux version to your home directory (or another temp directory of your choosing), extract the files and change current directory to what we just extracted

# tar -xzf ventrilo_srv-3.0.3-Linux-i386.tar.gz
# cd ventsrv

Move the vent binaries to /usr/bin and make them executable

# sudo mv ventsrv/ventrilo_srv /usr/bin/ventrilo_srv
# sudo mv ventsrv/ventrilo_status /usr/bin/ventrilo_status
# sudo chmod +x /usr/bin/ventrilo_srv /usr/bin/ventrilo_status

Make a directory for the config files and then move them there.
Give ventrilo user access

# sudo mkdir /etc/ventrilo
# sudo mv ventrilo_srv.ini /etc/ventrilo/ventrilo_srv.ini
# sudo chown -R ventrilo:ventrilo /etc/ventrilo

Make vent start when computer boots

  • Create the init.d script
  • Copy the contents of  this init.d script to that file
  • Make it executable and add it to boot sequence

    # sudo nano /etc/init.d/ventrilo
    # sudo chmod 755 /etc/init.d/ventrilo
    # sudo update-rc.d ventrilo defaults

Test to see if it works

# sudo /etc/init.d/ventrilo start

You should see something like the following, where 21626 will be the process ID of vent server

* Starting VOIP server ventrilo
21626: old priority 0, new priority -5
[ OK ]

MediaPortal

MediaPortal on Windows Home Server

MediaPortal is a PVR/media application that handled TV recording as well as media management like Windows Media Center. It is a free open source program that can be found here.

I initially thought it would be very simple to install the TV Server portion of the applicaiton on my WHS in order to handle the recording and streaming, but unfortunately WHS is not supported by MediaPortal and there are a few hoops to jump through in order to get this to work.

I downloaded the latest version of MediaPlayer and when trying to install it said that WHS (recognized as Windows Server 2003 SP2) was not supported, but lets you continue with the installation anyway. I selected ‘advanced installation’ so that I can just install the ‘Dedicated TV-Server (master)’ component and not the MediaPortal client application. During the installation it says you need to install Windows Media Player 11, since WMP 11 is not supported by WHS you will need to follow the directions below in order to successfully install it.

To install Media Player 11:

  1. Download wmp11-windowsxp-x86-enu.exe
  2. Open this file in an extraction program such as WinZip or 7-Zip (I used 7-Zip)
  3. Extract the wmfdist11.exe and wmp11.exe and place them in separate folders on the C: drive of your WHS (not on a share). (this step was adapted from instructions I was following elsewhere – I’m not certain of the separate folders requirement, but I did it anyway)
  4. From the WHS admin desktop, right-click the wmfdist11.exe file and click properties.
  5. Go to the Compatibility tab and ticket the “Run this program in compatibility mode for:” box, and select Windows XP from the drop down.
  6. Click OK, and run the wmfdisk11.exe. Choose not to restart at the end.
  7. Repeat 4-7 for the wmp11.exe

Source: Jay Schlackman

After this is complete, run through the MediaPortal installer, if you have any issues check the ones that I ran into (below) for my solutions.  Once installation is complete, launch the “TV-Server Configuration” and now you can follow the official guide for setting up a MediaPortal TV-Server or various other guide that you can find online.

I will post back with my thoughts on MediaPortal after I have some time to play around with it.

Issues along the way

Failed to startup tvserviceSystem.Net.Sockets.SocketException

At the end of the installation or when I try to launch the TV-Server configuration, I got the following lengthy error message (my PC’s IP address is blacked out). I tried a number of suggestions that I found online but to no avail. After a number of hours troubleshooting this issue, I decided to revert to version 1.0.1 which can be found on their SourceForge page and everything worked fine.

Failed to startup tvserviceSystem.Net.Sockets.SocketException

Your platform is not supported by MediaPortal

Whenever you try to launch the application you will get an error message saying that the platform is not supported, but you can ignore this message.

mySQL – set password error: 1

Since I ran into some issues getting Media Portal installed on WHS I ended up going through the install/uninstall process a number of times. While doing this I ran into an error message when installing MySQL that said “mySQL – set password error: 1” and quit the installation. In order to fix this you must uninstall MySQL from the Control Panel>Add/Remove Programs and the navigate to the C:\Program Files\MySQL directory and delete it. After this, reboot your PC and try the installation again and it should work just fine. If you are still having issues, in the advanced installation you can choose too install Microsoft SQL Express 2005 as your database instead of MySQL to circumvent this message.

WHS v2 Vail

From what I have read MediaPortal should install without much hassle on the newer version of WHS codename Vail. The beta is out for WHSv2, but I do not have the extra hardware to run those tests at this time.

Complete Overview of Installing FlexRAID in Windows 7

If you are not familiar with FlexRAID, it is essentially an alternative to the traditional RAID and more similar to unRAID, except that it is free. FlexRAID offers a number of benefits over traditional RAID. Currently FlexRAID is a snapshot RAID and not real-time, making it suitable for data that does not change very often (eg. movie/music archive) as you are only able to revert to a state when a snapshot was taken, not the most recent state before disk failure. However, a real-time version of FlexRAID is under development called FlexRAID Live.

[TABLE=2]

I put together this guide because I was looking all over the place for a comprehensive, beginning-to-end, guide to running and installing FlexRAID so I could evaluate the software and decide if I wanted to move to FlexRAID for my filestorage.

This guide will take you through the process of installing FlexRAID on a Windows 7 computer. This will include managing the configruation through the WebUI and installing FlexView so that all your drives show up as a single instance of pooled storage. This guide was written when FlexRAID version 1.4 beta was the most up to date release.

FlexRAID Installation (Host, CMD, and WebUI)

  1. If UAC (user account control) is enabled you must disable it during this installation process but it can be re-enabled afterwards. A guide can be found here.
  2. Install the FlexRAID Basic Host Service 1.4 with default settings so that it installs FlexRAID as a service.
  3. Install the FlexRAID CMD client for Windows
  4. Launch the CMD Client.
  5. It will prompt you to Connect to: and here you type “localhost“.
  6. It should connect immediately and leave you with a command prompt where you want to type “view install” to install FlexView. You will see a message saying FlexRAID-View was successfully installed and you can proceed.
  7. Download and save the WebUI 1.4 beta for Windows client to your Desktop
  8. Unzip the WebUI folder and move it to C:\FlexRAIDWebUI. You can move it wherever you want, but you need to make sure there are no spaces in the path.
  9. To launch the WebUI you need to open the folder C:\FlexRAIDWebUI and run start.cmd, this will open a command prompt that will begin to startup the WebUI. The first time you run this you will be prompted by Windows Firewall to Allow access to java.exe, you must click Allow.
  10. Give the webserver a few moments to start up and then you can type http://localhost:8080 into your browser to bring up the FlexRAID login screen.
  11. The default login and password are admin, admin

FlexRAID WebUI Configuration

  1. This is a very good guide by FlexRAID’s author, Brahim, about how to go through configuring a FlexRAID setup through the WebUI, so I will not bother to re-explain these steps. If you have just added hard drives to the computer and they do not show up in the WebUI, you must go into Computer Management>Disk Management to Initialize and Format the disks. The WebUI will only show the disks that are visible in the My Computer window.
  2. For my setup I am running the T1+ RAID engine and have 2 DRU’s set up, H:\ and I:\ and drive J:\ is the single PPU. I have decided to dedicate entire disks to this array, but one of the features of FlexRAID is the ability to put certain folders in the array if you wanted.

FlexRAID-View Configuration

From the other guides I read on the topic, I found this portion to be the most confusing and it took experimenting in order to get it to display the way I had wanted and expected. The official guide can be found here and includes more details and tweaks than I will discuss.

  1. Open the FlexRAID CMD window, login to “localhost”, and then enter the following 2 commands to install patches to make it work on Windows 7 and then close out of the command window.
    • patch install view-sys-patch
    • patch install view-cl-patch
  2. We need to change the permissions of the FlexRAID Host folder so that we can create a View Configuration file. In order to do this. navigate to the OpenEgg directory which by default is “C:\Program Files (x86)\OpenEgg.org” and right click on the “FlexRAID Basic Host Service 1.4” folder and select Properties. Click on the “Security” tab and click “Edit” to change the permissions. Click on Users and check off Allow for the Modify and Write permissions and press Apply.
  3. Now open the “FlexRAID Basic Host Service 1.4” folder and Right Click>New>Text Document and name this file “ViewConfig”.
  4. The contents of my ViewConfig.txt file are below. With FlexRAID-View you have to model every folder join that is taking place, even in the sub-folders. This is a simple example, but what is happening is that I have specified drive Z to be the drive that shows up with the specified “virtual” view, using DRU’s H: and I:. Then I go on to model Z: which contains the virtual folders Music and Videos. Then each of those virtual folders are defined below. The syntax for this file can be found in the guide FlexRAID-View guide mentioned above, but for me a simple example really helped get a basic understanding.
  5. The config file below allows me to open the Z: drive and see 2 folders, Music and Videos. The contents of those folders will be a combination of the files and folders found within the respective folders on the H: and I: drives.

    Note: FlexRAID View does not manage load balancing the drives or distributing your files in a smart method, but rather all the files you move into a folder will be on your first drive specified, in this case for Videos it is drive H: and then once H: is full it will overflow to drive I:.

DRIVE=Z UNIQUE=H:\;I:\ RESTRICT= RESERVE=2GB THREAD=5 REMOVABLE=false -Z:\ |-<Music> |-<Videos> -Z:\Music |-*H:\Music |-*I:\Music -Z:\Videos |-*H:\Videos |-*I:\Videos

FlexRAID Data Recovery Simulation/Test

Before you decide to transition to FlexRAID it is a good idea to test the recovery to make sure it works and make sure you understand the proper procedure to recover from various failures. I was initially unsure about how to go about these tests but I have documented them below. All my testing is being done with VMWare Workstation so I can easily simulate suddenly disconnecting (eg. failure) and adding disks but the same can be done using physical hardware.

  1. In order to test a simulated failure, copy some files to the disks you want to be fault resistant.
  2. Enter the web-ui and run an update to rebuild the parity.
  3. After the build is complete, disconnect any one of the disks and you will be unable to access the files from the disconnected disk.
  4. Insert a new disk (or you can just use a new folder on one of the disks if you do not have a spare drive laying around).
  5. Map the new drive to replace the failed drive.
  6. In the web-ui, restore the data to the newly added drive.
  7. If it restores the data that was on the original drive, you are all set.

I hope this was helpful.

NOTE: The author of FlexRaid is working on v2 of the application and from the screenshots on his website it looks like a very sleek new interface. The core part of this guide seems like it will still be applicable, but many of the steps will likely be simplified with the new Web-UI.

Test Read/Write speed in FreeNAS

Navigate using the ‘cd’ command into your zpool which is in the /mnt directory.

Run the following command to test Write speed
# dd if=/dev/zero of=testfile bs=1024 count=50000

Run the following command to test Read speed
# dd if=testfile of=/dev/zero bs=1024 count=50000

The first test will write a file called ‘testfile’ to your zpool and then the second test will read back that same file. You can change the count in order to change how large a file to create.