Andy Loughran

P2P Local Network File Storage & Syncronisation

I thought I'd put this one out to the blog to see if anyone can offer me advice.

I'm trying to work out the best way to share files between 2 Macs, 1 Ubuntu box, and 3 XP machines.

Initially, I thought a central NAS drive would make sense, however, because of the need for backup (and the lack of a decent internet connection) - backing up remotely is going to be too costly.

My next thought was that the clients should sync the NAS locally, as to avoid disaster should the NAS be unavailable/broken. I'm using Ubuntu ONE - and something like this would be useful, providing I could run it on my local network w/out internet connection.

I've also looked at iFolder (by Novell) but haven't got time to waste trying to get it to work and play nice..

So if anyone can offer me some advice, I'm ready to take it.

I have a Buffalo LinkStation acting as my NAS at the moment, but it's simply serving a USB-attached 320GB Drive.

Network Attached Storage - Open Style

After a few months of pretty much no action on kitting out our home recording-studio with what's required, today the family sat down and we're finally making progress.

My brother is the guy who's sorted out all the recording kit (which includes pro-tools and a mac) so my tech stuff is more or less on the periphery.  This suits me, as not being in the country 75% of the year means I probably wouldn't be able to support it anyway.

The only thing I've been asked to do is to create a home NAS, for both the PCs/Macs/Ubuntu boxes around the house, and also for much of the material we're going to be recording in the studio.

I had a little chat in the #ubuntu-uk room, with the idea of building my own server, and just having plenty of diskspace and the ability to expand it.  However, with me not being in the country, the idea of letting others shut down the PC and play with a RAID card isn't particularly enticing.  Looking at other options, I took a more detailed look at the drobo.

Drobo, you look awesome.  In fact, it does look too good to believe - but the main drawbacks I have with it are price and scalability.  I'd need a droboshare to put it on the network, and the price of the empty chassis with the droboshare is £388 on amazon - which is pretty borderline.  If it extended to more than 4 disks then it'd be a no brainer.  I love the simplicity of the device, and the whole family appreciated the ease of use when I made them watch the little promotional video.

I even took a look at the drobopro, but that's £939.12 exc. VAT which is just too much, given that max capacity is 16TB.. will I need more than that once people start recording loads of samples to disk.. I'm not sure.  That's why the expandability options of the drobo appeal.

However, I'm a big ubuntu fan (as I hope you know by now) and surely there's got to be a way to do it myself, and use a chassis which enables hotswappable disks - even if I have to log in remotely to add a new disk to the storage.  I'm not looking for a budget machine, as this is probably going to hold some pretty important data - but what's the best option.

I'd love to hear a few peoples views on this, so please leave me your feedback in the comments.   Andy

PXE Server - Beyond Network Installations

A few weeks back I re-published a great article on setting up a PXE server.  Since then I've had to use this server for a number of other tasks, from cloning 15 machines to running Ubuntu LiveCD over a PXE network.  I'd like to share with you a couple more tips on getting the most from your PXE Server.

NFS

In order to get the most out of your PXE, I recommend install nfs on your machine.

apt-get install nfs-kernel-server

With this you'll be able to share more than just the initial boot - but mount directories after boot to have a fat-client setup.
My exports file (directories which I've explicitly shared via NFS looks like this:

/exports/clonezilla *(ro,sync)
/exports/ubuntu *(ro,sync)
/exports/images *(rw,sync)

I don't currently have a fat-client setup, but the above directories are a good introduction to two ways of extending the PXE Server.

Clonezilla

Clonezilla Live, based on DRBL, Partition Image, ntfsclone, partclone, and udpcast, allows you to do bare metal backup and recovery.  That means it reads the physical hard disk, and copies the blocks one-for-one.  This is pretty useful when cloning identical machines (which is what I was doing) - but there's also a Server Edition - which uses multicasting and is capable of cloning a 5.6GB Disk Image onto 42 machines simulteneously in around 10 minutes.

I downloaded Clonezilla Live! from the UK Mirror Service.

cd /tmp

wget http:////www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/c/cl/clonezilla/clonezilla-live-1.0.11-19.iso
Once that's done, I mounted it at /media/clonezilla

mkdir /media/clonezilla

mount -t loop /tmp/clonezilla-live-1.0.11-19.iso /media/clonezilla
then copied the entire iso into /exports/clonezilla

cp -r /media/clonezilla/* /exports/clonezilla

Since that was now setup - and using the PXE configuration from the previous post, I created the folder clonezilla in /var/lib/tftpboot/ and copied the kernel and initrd there.

mkdir /var/lib/tftpboot/clonezilla
cp /exports/clonezilla/live/initrd.img /var/lib/tftpboot/clonezilla
cp /exports/clonezilla/live/vmlinuz /var/lib/tftpboot/clonezilla

I then edited /var/lib/tftpboot/pxelinux.cfg/default to include the following

LABEL clonezilla
kernel clonezilla/vmlinuz1
append initrd=clonezilla/initrd1.img boot=live union=aufs netboot=nfs nfsroot=192.168.1.12:/exports/clonezilla

Once that was saved, I could then boot up a machine over the network - and typing 'clonezilla' at the prompt allowed me to boot into clonezilla and clone my computers :)

Ubuntu LiveCD

The Ubuntu live CD pretty much followed the same configuration as the Clonezilla setup (except, of course, downloading the iso of ubuntu, not Clonezilla).

The pxelinux.cfg/default entry is also slightly different (NB: casper), and as I already had ubuntu intrepid and hardy directories in the tftpboot directory - I created a new directory called /live (which has the latest iso in it).

LABEL ubuntulive
kernel ubuntu/live/vmlinuz
append initrd=ubuntu/live/initrd boot=casper netboot=nfs nfsroot=192.168.1.12:/exports/ubuntu

The next stage for me is to set up the /var/lib/tftpboot dir to automatically rsync the latest version of all the files, and for the /exports/ directories for the isos to do the same.  However, as this is currently a 'work setup,' I don't have the time available to implement this.  I hope that I can get something sorted for India though, as I've been asked to look into setting up a mini computer suite - and having second hand computers booting over PXE would be a pretty good way of managing them (and lowers the overhead in setting up the PCs individually).  I'm also looking at ltsp, so if anyone can give me some advice I'm sure it'd be welcome in the not-to-distant future.