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

ஒரே காமடி…

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

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

Powered by ScribeFire.

ஒரே காமடி…

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

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

Powered by ScribeFire.
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 bytesDevice Boot Start End Blocks Id System
/dev/sda1 * 1 121602 976768033+ 83 LinuxDisk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDisk /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.
