Monday, July 30, 2012

Installing Glusterfs 3.3 on OpenIndiana 151

[This is still under testing. I did based on XinFeng Liu's installation on Solaris 11. The Glusterfs 3.3.0 worked well on OpenIndiana 151a5 x64, but might need some fine tuning by others. Comments are welcomed!]

I started with new clean installation of OpenIndiana 151a.
Login as root and update the system to the latest version,
su -
pfexec pkg image-update -v
(All proceeding commands assume that you are root.)

Add SFE repository,
pkg set-publisher -p http://pkg.openindiana.org/sfe
pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered
If you have the legacy gcc-4 runtime from the opensolaris.org publisher installed, you will run into trouble. Uninstall it by running,
pkg uninstall pkg://opensolaris.org/developer/gcc/* 
Install gcc-dev, libfuse, ntfs-3g,
pkg install gcc-dev 
pkg install libfuse
pkg install ntfs-3g
Download Glusterfs 3.3.0 sources,
wget http://download.gluster.org/pub/gluster/glusterfs/LATEST/glusterfs-3.3.0.tar.gz
Untar it,
tar -xvzf  glusterfs-3.3.0.tar.gz

Need to perform the following patch otherwise compilation will fail,
(all the commands assume that you are in the extracted glusterfs-3.3.0 directory)

1) nano rpc/xdr/src/nlm4-xdr.h
Add the following 2 lines:
#define  u_int32_t       uint32_t
#define  u_int64_t       uint64_t

2) nano ./libglusterfs/src/compat.h
Add the following patch at the end of the file:
/* This patch is not present in Solaris 10 and before */
/*
#ifndef dirfd
#define dirfd(dirp)   ((dirp)->dd_fd)
#endif
*/
Solaris 11 uses POSIX definition for "DIR"
(https://blogs.oracle.com/paulie/entry/compiling_alpine_on_solaris_11)

3) nano cli/src/cli-cmd-volume.c
In cli_get_detail_status (), add the following in between each of Linux-related attributes for "device", "mount_options", "fs_name" and "inode_size". (The #ifdef and #endif is already there for "device". Follow the same format for other attributes.)

#ifdef GF_LINUX_HOST_OS
..
#endif

Now, things are ready for compilation. We start with configure,
CFLAGS=-m64 ./configure

Need pass -m64 in CFLAGS above, or otherwise libtool will use 32-bit and you will end up with error during gmake.

Then,
gmake
After patching the source code as in 1) until 3) above, gmake should proceed until it finishes (without error).

Then,
gmake install

Installation should complete properly, with executable files installed in /usr/local/sbin directory.

Lets's check the installation,
/usr/local/sbin/glusterfs --version
glusterfs 3.3.0 built on Jul 29 2012 21:08:18
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GlusterFS under the terms of the GNU General Public License. 
Let's play around with glusterfs,
cd /usr/local/bin/ 
./gluster 
gluster>

Create a volume with name "test-volume" on server with hostname "storage0":
gluster> volume create test-volume storage0:/test-vol
Creation of volume test-volume has been successful. Please start the volume to access data.


gluster> volume list 
test-volume 


gluster> peer status  
No peers present 


gluster> peer probe storage0  
Probe on localhost not needed 


gluster> volume info  
Volume Name: test-volume Type: Distribute Volume ID: b1cee565-c940-4ac5-8d66-a449518f5dfd Status: Created Number of Bricks: 1 Transport-type: tcp Bricks: Brick1: storage0:/test-vol 


gluster> volume start test-volume  
Starting volume test-volume has been successful 


Seems like things are working well. Alhamdulillah :)


References:
http://permalink.gmane.org/gmane.comp.file-systems.gluster.devel/2645
http://download.gluster.com/pub/gluster/glusterfs/3.2/Documentation/IG/html/ch03s03.html

http://kaivanov.blogspot.com/2012/07/deploying-glusterfs.html

Monday, July 16, 2012

LSI 9211-8i Firmware and BIOS Update

I had problem with this LSI card after putting it on Supermicro X7DBN with 3 x Seagate SAS drives, with this error message: "Message Unit Reset failed on adapter #0!"

Spent the whole day figuring how to solve this out. Many suggested to update the BIOS and firmware on the card, using EFI Script during BIOS boot. One of the write-up is here: http://hardforum.com/showthread.php?t=1660130

But, there is no EFI boot available in the Phoenix BIOS for my motherboard.

I found this great write-up on how to update the LSI firmware and BIOS by USB boot the system using an open-source FreeDOS. To do it,
1. Format a USB stick with FAT 32.
2. Download UNETBOOTIN-WINDOWS-575.
3. Download FreeDOS USB Boot 1.1
4. Using Unetbootin, image the USB stick with the FreeDOS image.
5. Put the following files into the USB stick:
2118it.bin

DOS4GW.EXE

MEGAREC.EXE

SAS2FLSH.EXE

mptsas2.rom

6. Boot FreeDOS from USB thumb drive.
7. Clean controller flash memory:
sh megarec -cleanflash 0

8. Reboot FreeDOS from USB thumb drive.
9. Flash firmware and OptionROM images:
sas2flsh -o -f 2118it.bin -b mptsas2.rom

10. Set controller SAS address (replace 500605bxxxxxxxxx with the actual SAS address of your controller):
sas2flsh -o -sasadd 500605bxxxxxxxxx

11. Reboot into OS

VOILA! Now my LSI card could find all the hard disks installed for the system! And, the original -IR (RAID) type firmware is now converted to -IT (passthrough) type firmware, which is more suitable for ZFS. Yeay!

More details can be found here:
http://blog.grem.de/sysadmin/LSI-SAS2008-Flashing-2012-04-12-22-17.html
http://www.servethehome.com/ibm-serveraid-m1015-part-4/
http://www.lsi.com/support/Pages/Download-Results.aspx?productcode=P00049&assettype=0&component=Storage%20Component&productfamily=Host%20Bus%20Adapters&productname=LSI%20SAS%209211-8i
http://zfsonlinux.org/docs/SC10_BoF_ZFS_on_Linux_for_Lustre.pdf

Friday, July 06, 2012

Lavina - Pilihan Hatiku


I came across this song while surfing for some music videos on You Tube. I like the simple piano and tune, and the lyric is awesome!



LIRIK:
Berdiriku disini hanya untukmu
Dan yakinkan ku untuk memilihmu

[*]
Dalam hati kecil ku inginkan kamu
Berharap untuk dapat bersamamu

[**]
Aku ‘kan ada untuk dirimu
Dan bertahan untukmu

[***]
Terlukis indah raut wajahmu dalam benakku
Berikan ku cinta terindah yang hanya untukku
Tertulis indah puisi cinta dalam hatiku
Dan aku yakin kau memanglah pilihan hatiku

Back to [*][**]

Back to [***] 2x

Terlukis indah raut wajahmu dalam benakku
Berikan ku cinta terindah yang hanya untukku
Tertulis puisi cinta dalam hatiku
Dan aku yakin kau memanglah pilihan hatiku