Archive

Archive for February, 2009

நாராயனா இந்த கொசு தொல்லை தாங்க முடியலேப்பா…

February 26th, 2009 1 comment

ஒரே காமடி…

ஒபாமா இதை பார்த்தா, தூக்கு மாட்டி கொள்ளவேண்டும்…

என்னபா கொழப்புறீங்க.. விஜய்தான் சிவன்னு கன்ஃபாமே பண்ணிட்டீங்களா.. 😮

Powered by ScribeFire.

Tags:

/dev/mapper empty after reboot

February 26th, 2009 No comments

I had configured raid STRIPE on 2 500Gb hard disks to create a 1TB stripped disk using Intel Raid controller on Asus D5Q motherboard.  When I loaded CentOS 5.2, it identified the stripped disk correctly and formatted that too.  After the installation is completed, CentOS 5.2 was not able to detect the disk array at all.

dmesg was showing messages like the following:

device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.11.5-ioctl (2007-12-12) initialised: dm-devel@redhat.com
attempt to access beyond end of device
sda: rw=0, want=1953535936, limit=976773168
Buffer I/O error on device sda1, logical block 1953535872
attempt to access beyond end of device

When I tried “fdisk -l”, I got the following:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      121602   976768033+  83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn’t contain a valid partition table

The above is natural as RAID STRIPE is built using /dev/sda and /dev/sdb.

When I tried “dmraid -r”, I got

[root@tstsrv12 sudar]# dmraid -r
/dev/sda: isw, “isw_djiaeaj”, GROUP, ok, 976773166 sectors, data@ 0
/dev/sdb: isw, “isw_djiaeaj”, GROUP, ok, 976773166 sectors, data@ 0

Till this point, my /dev/mapper directory is:

[root@tstsrv12 sudar]# ll /dev/mapper/
total 0
crw——- 1 root root  10, 63 Feb 26 13:24 control

To enable the RAID multi-device, I had to run “dmraid -v -d -ay”, which returned:

[root@tstsrv12 sudar]# dmraid -v -d -ay
DEBUG: _find_set: searching isw_djiaeaj
DEBUG: _find_set: not found isw_djiaeaj
DEBUG: _find_set: searching isw_djiaeaj_Volume0
DEBUG: _find_set: searching isw_djiaeaj_Volume0
DEBUG: _find_set: not found isw_djiaeaj_Volume0
DEBUG: _find_set: not found isw_djiaeaj_Volume0
DEBUG: _find_set: searching isw_djiaeaj
DEBUG: _find_set: found isw_djiaeaj
DEBUG: _find_set: searching isw_djiaeaj_Volume0
DEBUG: _find_set: searching isw_djiaeaj_Volume0
DEBUG: _find_set: found isw_djiaeaj_Volume0
DEBUG: _find_set: found isw_djiaeaj_Volume0
DEBUG: checking isw device “/dev/sda”
DEBUG: checking isw device “/dev/sdb”
DEBUG: set status of set “isw_djiaeaj_Volume0” to 16
DEBUG: set status of set “isw_djiaeaj” to 16
RAID set “isw_djiaeaj_Volume0” already active
INFO: Activating GROUP RAID set “isw_djiaeaj”
DEBUG: _find_set: searching isw_djiaeaj_Volume0(null)1
DEBUG: _find_set: not found isw_djiaeaj_Volume0(null)1
RAID set “isw_djiaeaj_Volume0(null)1” already active
INFO: Activating partition RAID set “isw_djiaeaj_Volume0(null)1”
DEBUG: freeing devices of RAID set “isw_djiaeaj_Volume0”
DEBUG: freeing device “isw_djiaeaj_Volume0”, path “/dev/sda”
DEBUG: freeing device “isw_djiaeaj_Volume0”, path “/dev/sdb”
DEBUG: freeing devices of RAID set “isw_djiaeaj”
DEBUG: freeing device “isw_djiaeaj”, path “/dev/sda”
DEBUG: freeing device “isw_djiaeaj”, path “/dev/sdb”
DEBUG: freeing devices of RAID set “isw_djiaeaj_Volume0(null)1”
DEBUG: freeing device “isw_djiaeaj_Volume0(null)1”, path “/dev/mapper/isw_djiaeaj_Volume0”

Now, my “/dev/mapper” directory is:

[root@tstsrv12 sudar]# ll /dev/mapper/
total 0
crw——- 1 root root  10, 63 Feb 26 13:24 control
brw-rw—- 1 root disk 253,  0 Feb 26 13:25 isw_djiaeaj_Volume0
brw-rw—- 1 root disk 253,  1 Feb 26 13:25 isw_djiaeaj_Volume0(null)1

Now, I am able to mount the RAID array on to my folder:

mount LABEL=/vendors /vendors

The output of “df” is now:

[root@tstsrv12 sudar]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdc1             29753556   3516168  24701576  13% /
/dev/sdc3            410600744  26227400 363179596   7% /opt
/dev/sdd1            473086160    202800 448464160   1% /backup
tmpfs                  8154532         0   8154532   0% /dev/shm
/dev/mapper/isw_djiaeaj_Volume0(null)1
                     946176360    204572 897133388   1% /vendors

See, the RAID drive is mapped to /vendors folder.The Real Issue behind the problem is identified and a solution is presented at http://www.linuxquestions.org/questions/linux-kernel-70/centos-kernel-upgrade-breaks-dmraid-on-intel-software-raid-638450/. I am summarizing the changes here:

1. The real problem is the way dmraid is initialized at initrd’s init script. There is a bug in ‘mkinitrd’ script that generates ‘initrd**img’.
2. Open ‘/sbin/mkinitrd’ and search for “dmraid -ay -i -p”; It may appear something like “dmraid -ay -i -p “isw_cfgaijfacg_Volume0”.  Look at the suffix “Volume0”, this suffix attachment has become the problem for us.  dmraid does not like the Volume% suffix.  It should have been initialized as “dmraid -ay -i -p “isw_cfgaijfacg””.
3. Let’s change the script to the following from:
emit “dmraid -ay -i -p \”$dmname\”” 

to

dmnamecore=$(echo $dmname | sed -e ‘s/_Volumn[0-9]\+//;’)
emit “dmraid -ay -i -p \”$dmnamecore\””
4. Generate a new initrd image by running “mkinitrd /boot/initrd-2.4.18-92.el5.img.dmraid `uname -r`”
5. Edit your /etc/grub.conf to use the newly created initrd image instead of the old one by editing the following line from “initrd /boot/initrd-2.4.18-92.el5.img” to “initrd /boot/initrd-2.4.18-92.el5.img.dmraid”
6. Reboot your machine.

Powered by ScribeFire.

Tags:

Error: Can not start thread: error writing TLS. (error 87: the parameter is incorrect.)

February 18th, 2009 No comments

When I tried building an multi-thread TUI application using wxWidgets framework, I got the following error while executing the application.

Error: Can not start thread: error writing TLS. (error 87: the parameter is incorrect.)

I was not able to reason out this behavior. I tried changing between THREAD_DETACHABLE and THREAD_JOINABLE, but was not able to get through.  When I search for hints from the web, I got the following link.

http://osdir.com/ml/lib.wxwindows.general/2004-01/msg00759.html

It was advised to create a dummy wxInitializer object so that the wxWidgets platform does the necessary initialization.  wxInitializer class is an undocumented class and called internally when a wxFrame or wxDialog based GUI application is built.  Typically, wxInitializer object is instantiated internally by the wxApp class.  Since, in my application there is no wxApp object which led to the above problem

When I dug the declaration of wxInitializer class, I found it declared at wx/init.h;  Also I found that instead of instantiating the object, we may call the following function.

extern bool WXDLLIMPEXP_BASE wxInitialize(int argc = 0, wxChar **argv = NULL);

In my application, I did the following:

main( int argc, char **argv )
{
      extern bool wxInitialize( int, char ** );
      wxInitialize( argc, argv );
      ….
      ….
}

It worked like piece of cream.

Powered by ScribeFire.

Tags:

Software Engineers Lose in Marriage Market

February 13th, 2009 1 comment

Powered by ScribeFire.

Tags:

அய்யய்யோ Birthday..

February 13th, 2009 No comments

எங்கள் அலுவலகத்தில் வேலை பார்க்கும் சக ஊழியர் கென்னடிக்கு அன்று பிறந்த நாள்.  அவருக்காக வாங்கிய கேக்கில் “Happy” என்பதை எப்படி எழுதியிருக்கிறார்கள் என்று பாருங்கள்.  நான் அதை படிக்கும்போது, Ha-10-10-y birthday என்று படித்தேன். ஆனால், குழுவில்யிருந்த ஒரு சகா, அதையே ஹா-அயோ-அயோ-அயோய் (அய்யய்யோ) என்று படிக்க, அனைவரும் சத்தமாக சிரித்துவிட்டோம்..

Powered by ScribeFire.

Tags:

திருகண்டலம்

February 12th, 2009 No comments


திருகண்டலம் திருக்கோயில்


திருகண்டலம் செல்லும் சாலை..

Powered by ScribeFire.

Tags: