Openfiler archives - Open Source Software and Linux

Open Source Software and Linux:

openfiler

Jan 6 2009   8:33PM GMT

Installing Openfiler NAS as a Xen virtual host



Posted by: John Little
openfiler, xen, virtual machine, rpath, centos, red hat, NAS

If you’ve ever tried to install the Openfiler NAS frontend as a Xen virtual host you probably found that 1) it was not as straightforward as it would seem, 2)getting the right combination of information that is on the web correct in the openfiler config file is difficult and 3)documentation at the Openfiler web site is nonexistent for this setup.

The OS that I use is Centos 5.2 with the native Red Hat Xen virtualization utilities. This should also be good for RHEL 5.2 as well. I downloaded and installed openfiler-2.3-x86.tar.gz as the NAS frontend for my Xen virtual server. The information that I provide here is good for that version. I have a feeling that it may change some from version to version as many of the config files that I found were very similar but enough off to keep the machine from booting.

I use physical volumes for all of my Xen virtual machines. All of this should apply except for the way that file images are defined in the config file.

You will need approximately 3 GB of disk space for the Openfiler front end and swap. You probably should add a little more in case you find that you want some applications installed that don’t come with Openfiler. By default Openfiler will use about 1 GB of that space for swap.

[root@openfiler ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 6.0G 2.3G 3.4G 40% /
none 130M 0 130M 0% /dev/shm


[root@openfiler ~]# free
total used free shared buffers cached
Mem: 264596 218432 46164 0 84448 55240
-/+ buffers/cache: 78744 185852
Swap: 1048568 0 1048568

After deciding how much disk space that you want to use create it using your desired method-physical disk or file image. Once you have it created format it with ext3 or with your favorite file system. Now mount it and extract the tar ball from where you saved it into mounted directory. I created the directory openfiler under /mnt and mounted the disk there.

lvcreate -L+6G -n openfiler linux-virtuals.hdd1
mkfs -j -L openfiler /dev/linux-virtuals.hdd1/openfiler
mkdir /mnt/openfiler
mount /dev/linux-virtuals.hdd1/openfiler /mnt/openfiler
cd /mnt/openfiler
tar xzvf /srv/secure/openfiler-2.3-x86.tar.gz #path to saved tarball

You need to create a directory to hold the boot files on your Xen host machine. I called mine boot-openfiler. Copy all of the files from /mnt/openfiler/boot/* to /boot-openfiler. Next copy the openfiler kernel modules to /lib/modules.

mkdir /boot-openfiler
cp -a /mnt/openfiler/boot/* /boot-openfiler/
cp -a /mnt/openfiler/lib/modules/2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU /lib/modules/

Now we need to create our openfiler NAS config file. cd to /etc/xen and create the config file for openfiler. You can use the one shown below as a template. Be sure that you create a unique uuid, MAC address and adjust your disk paths.

cd /etc/xen
vim openfiler

Start config file

name = “openfiler”
uuid = “203e2874-b08c-4066-7166-cada1b5b7341″
maxmem = 256
memory = 256
vcpus = 1
kernel=”/boot-openfiler/vmlinuz-2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU”
ramdisk=”/boot-openfiler/initrd-2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU.img”
root=”/dev/xvda1 ro”
#bootloader = “/usr/bin/pygrub”
on_poweroff = “destroy”
on_reboot = “restart”
on_crash = “restart”
vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]
disk = [ "phy:/dev/linux-virtuals.hdd1/openfiler,xvda1,w", "phy:/dev/sda,xvdb,w" ]
vif = [ "mac=00:16:3e:38:75:88,bridge=xenbr0" ]

End config file


Notice that the kernel= and and ramdisk= point to the /mnt/openfiler/boot/* files that we copied point to the boot-openfiler directory that we created. You will also need to add your root=xvda1 ro to the config file. The “phy:/dev/sda,xvdb,w” entry that you see above is the 1TB SimpleTech external drive for which I am using the Openfiler NAS frontend.

Now unmount the partition that you mounted for the Openfiler files and start the domain with the typical xm create -c openfiler or the virsh command.

A cautionary note: Don’t copy the config file from above. WordPress seems to do something to the lines and they don’t start and end correctly ie. they won’t be parsed correctly when starting the domain.

Have fun with your new Openfile NAS!

-j

Dec 25 2008   11:23PM GMT

Merry Christmas!



Posted by: John Little
NAS, SAN, openfiler, rpath, Wii, rbuilder

I hope all you geeks and nerds and people who generally like hi tech toys got all that you wanted for Christmas.

I know that I did. I got a 1TB external drive that I can use to back up all of my family’s computers on the server. I’ll probably create a virtual host using the rpath Openfiler NAS/SAN appliance for the virtual machine image. If you’ve never visited rpath you should give them a look. They have all kinds of appliance images for different makes of virtual machines. Most of these are located on a subweb of rpath called rbuilder.

On rbuilder you can find lots of information about the virtual applicance that you want to download. If you are unsure of which image file that you need for an appliance they have a list that explains how each image installs and under what conditions it should be installed. All in one paragraph and in plain english. Very nice!

I also got a Wii. Well actually it is for my daughter and I. We got Wii Sports, Wii Fit and Wii music. I never new that this gaming system could be so much fun!. We play it everyday and are always finding new things to do on it. If you’ve never tried the Wii you should get one. You won’t be sorry!

I need to get busy setting up my new external drive and virtual machine. Merry Christmas everyone!

-j