Tuesday, October 09, 2012

Installing Gluster on CentOS 6.3

Download the packages,
wget -l 1 -nd -nc -r -A.rpm http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS
 Install the packages, including RDMA packages for InfiniBand,
yum install glusterfs-3.3.0-1.el6.x86_64.rpm glusterfs-fuse-3.3.0-1.el6.x86_64.rpm glusterfs-geo-replication-3.3.0-1.el6.x86_64.rpm glusterfs-rdma-3.3.0-1.el6.x86_64.rpm glusterfs-server-3.3.0-1.el6.x86_64.rpm

To create a volume that works on both RDMA and TCP, below command should be used:
gluster volume create VOLNAME  transport tcp,rdma BRICKS
Later, to mount it on RDMA transport, use mount command like below:
mount -t glusterfs IP:/VOLNAME.rdma /mount/point
To mount the tcp volume it will be just,
mount -t glusterfs IP:/VOLNAME /mount/point
gluster> volume create test-volume transport tcp,rdma
Creation of volume test-volume has been successful. Please start the volume to access data.
gluster> volume list
gluster> volume info
Volume Name: test-volume
Type: Distribute
Volume ID: 07153b66-06ea-4025-97cf-8ae8f0cfc09a
Status: Created
Number of Bricks: 1
Transport-type: tcp,rdma
gluster> volume start test-volume
Starting volume test-volume has been successful

Sunday, October 07, 2012

Installing "ZFS on Linux" on CentOS 6.3 with DKMS and L2ARC Caching

Prepare the system with the following packages,
yum groupinstall "Development Tools" 
yum install kernel-devel zlib-devel libuuid-devel libblkid-devel libselinux-devel e2fsprogs-devel lsscsi parted lsscsi nano mdadm bc 

Obtain the latest DKMS RPM package from Dell. Note that you need the latest version 2.x above for the installation to proceed properly.
wget http://linux.dell.com/dkms/permalink/dkms-
Install the RPM package,
rpm -Uvh dkms-

Obtain the latest version of DKMS RPM modules for SPL and ZFS,
wget http://github.com/downloads/zfsonlinux/spl/spl-modules-dkms-0.6.0-rc11.noarch.rpm
wget http://github.com/downloads/zfsonlinux/zfs/zfs-modules-dkms-0.6.0-rc11.noarch.rpm
Install SPL module first,
rpm -Uvh  spl-modules-dkms-0.6.0-rc11.noarch.rpm
Obtain SPL RPM, rebuild and install,
wget http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc11.src.rpm
rpmbuild --rebuild spl-0.6.0-rc11.src.rpm
rpm -Uvh rpmbuild/RPMS/x86_64/spl-0.6.0-rc11.el6.x86_64.rpm
Install ZFS module,
rpm -Uvh zfs-modules-dkms-0.6.0-rc11.noarch.rpm

Obtain ZFS RPM, rebuild and install,
wget http://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc11.src.rpm
rpmbuild --rebuild zfs-0.6.0-rc11.src.rpm
rpm -Uvh rpmbuild/RPMS/x86_64/zfs-0.6.0-rc11.el6.x86_64.rpm
rpm -Uvh rpmbuild/RPMS/x86_64/zfs-devel-0.6.0-rc11.el6.x86_64.rpm
rpm -Uvh rpmbuild/RPMS/x86_64/zfs-dracut-0.6.0-rc11.el6.x86_64.rpm
rpm -Uvh rpmbuild/RPMS/x86_64/zfs-test-0.6.0-rc11.el6.x86_64.rpm
Restart your system. DKMS might automatically rebuild the SPL and ZFS package during the system boot up if your kernel is updated.

To check ZFS is properly loaded, run:
lsmod | grep -i zfs
zfs                  1104868  0
zcommon                43286  1 zfs
znvpair                47487  2 zfs,zcommon
zavl                    6925  1 zfs
zunicode              323120  1 zfs
spl                   253420  5 zfs,zcommon,znvpair,zavl,zunicode
Check installed hard disk properties,
fdisk -l | grep GB
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
Disk /dev/sdc: 64.0 GB, 64023257088 bytes
Disk /dev/sda: 64.0 GB, 64023257088 bytes
Disk /dev/mapper/vg_azure0-lv_root: 50.2 GB, 50189041664 bytes
Create ZFS storage pool with name as "tank" consisting of sdb sdd and sde. The -f is to override any errors,
zpool create tank raidz -f sdb sdd sde
Check the pool,
zpool status
  pool: tank
 state: ONLINE
 scan: none requested

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sde     ONLINE       0     0     0

errors: No known data errors
Setup sdc as L2ARC cache drive (the -f is to override any errors),
zpool add tank cache -f sdc
Finally, let's check our ZFS pool status,
zpool status
  pool: tank
 state: ONLINE
 scan: none requested

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sde     ONLINE       0     0     0
          sdc       ONLINE       0     0     0

errors: No known data errors
Additionally, let's put some tuning to the file system to obtain a better performance,
zfs set compression=on tank
zfs set dedup=on tank
zfs set atime=off tank
Yeay! Now things are working great! For further info, please refer to the following links:

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)
Solaris 11 uses POSIX definition for "DIR"

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.)


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.

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

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/ 

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 

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 :)



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.
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:





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:

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!

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

Saturday, March 24, 2012


Alhamdulillah, semalam dapat beli tanah berdekatan Plaza Tol Gombak pada keluasan yang sesuai untuk 3 lot rumah banglo, dan dapat lokasi tanah seperti yang diinginkan. Mungkin ini rezeki saya. Sejak sebulan lepas lagi berkomunikasi dgn agen tanah yg bagi tahu ada tanah untuk dijual kat Sungai Pusu berdekatan Plaza Tol Gombak. Masa tu saya berminat, tapi saya tak tahu macam mana nak kumpul ~RM200k untuk beli tanah tu sebab semua kena bayar terus, bukan melalui loan bank.

Kebetulan, Alhamdulillah, Abg Yie dan Kak Ros pun berminat dengan tanah kat situ. Lepas tu, tanya Adik Li, dia pun minat. Lepas semua confirm ada duit, 2 minggu lepas, saya call agen tanah tu. Tapi, agak hampa sebab dia bagi tahu sudah habis orang ambik.

Tapi Alhamdulillah, Selasa lepas, dia SMS bagi tahu ada lot yang kosong sebab ada orang yg sudah book tak mampu nak bayar. Rabu petang, lepas kerja saya pergi ke office dia di Maluri. Dapat semua info tentang tanah ni.

Tanah ni pegangan kekal selama-lamanya (freehold), bersebelahan dengan tanah kerajaan sebelah plaza tol gombak, dan tepi bukit dengan kecerunan tanah 30%. Agak cerun, tapi OK untuk banglo selepas datarkan setiap lot. Kalau buat rumah atas tanah ni, memang akan boleh nampak dari Plaza Tol Gombak. Accessablity pun agak senang sebab bersebelahan dengan jalan utama saja, dan bukan jauh ke belakang UIA sana. Cuma masalah adalah bagi saya bukit di belakang tu terlalu tinggi, dan saya takut kalau tanah runtuh boleh rosakkan rumah. So, daripada 4 lot (dgn saiz setiap lot ~20,000 kps) yang ingin dijual, saya kurang prefer lot belakang berdekatan bukit.

Hari Khamis, selepas siapkan banker's cheque, saya pergi untuk bayar deposit RM10k. Tapi, bila sampai sana, saya diberitahu oleh agen tu orang dah ambik dan bayar untuk lot depan yang saya berminat tu melalui agen lain. Tinggal lot belakang saja, yang saiznya paling besar sehingga 23,000 kaki persegi. Dikira dengan RM12 sekaki persegi, kosnya jadik ~RM300k. Call balik Abg Yie, Adik Li, hmmm... mereka susah sikit dengan kos banyak tu. Dan masalah dengan bukit kat belakang tu. So, takde rezeki, saya balik dengan tangan kosong...

Jumaat semalam, Alhamdulillah, masa discussion dengan students saya kat makmal, dapat SMS dari agen tanah tu lagi, bagi tahu tanah depan tu dah kosong balik. Saya call dia, dia bagi tahu tanah depan tu book dengan RM500 sahaja, dia mintak bayar 3% segera tapi tak dapat, so dia cancelkan org tu. Jadi lot depan tu kosong balik. Lepas habis discussion dlm pukul 6:45pm gitu baru saya tolak pergi office dia. Alhamdulillah, memang betul tanah yg kosong tu tanah yg kami semua nak. Dan mujur lagi, sebab ikut pelan terbaru, tanah ni kecik skit dari pelan asal ~21k kaki persegi, jadik ~17k kaki persegi saja, sebab dia besarkan lot belakang yg dekat dgn bukit sbb nak bagi ruang utk jalan kalau pemilik tanah tu nak buat jalan nanti pada masa depan. Pada ~17k kps, memang kami pun takde masalah sebab share 3 orang, so boleh bahagi 3 dgn keluasan 5k+ setiap orang. Kos yg kena keluar pun jimat dlm RM50k daripada perancangan awal. Alhamdulillah... memang rezeki kami rasanya...

Setelkan booking dan semua documentation, dan balik...

Masa balik tu, saya singgah sekejap semayang Maghrib di Masjid Klang Gate kat situ. Tapi pelik, kenapa dah pukul 8 lebih pun still ramai orang dan banyak sgt kereta parking berdekatan. Lepas semayang Maghrib, alang2, tunggu Isya' je lah terus. So, kebetulah ada orang bagi ceramah, macam menarik, so join je lah...

Rupa-rupanya, yang bagi ceramah tu adalah Ustaz Dato' Ismail Kamus. Patut aa menarik! Haha, rezeki kot ekk :)

Thursday, March 15, 2012

Received Official Approval from MoF for MOCVD Purchase

Alhamdulillah, after 3 months of waiting, finally, I received official approval letter yesterday evening from Ministry of Finance on our application for direct negotiation procurement of TNSC MOCVD equipment from the manufacturer itself through their Tokyo-based sole distributor. We also receive approval for direct negotiation purchase of gas distribution, gas purification, gas abatement and gas safety system through TNSC Malaysian wholly owned subsidiary.

The MOCVD has to be direct from Japan to allow for direct payment in Yen currency to the manufacturer, to prevent any occurrence of "currency exchange risk" and any third party charges. We save more than RM800,000 of Malaysian taxpayers' money by doing this kind of direct negotiation purchase.

The approval shows that the project is strongly supported by all top parties in Malaysia. At the same time, the project is also strongly supported by Japanese parties (including Japanese government) for the benefit of Japanese industrial investment in Malaysia.

Insya'Allah, we do the best for the future of Malaysia.