I just succeeded in applying the patch to kernel 2.2.10 using redhat 6.0
First, I got a virgin kernel and uncompressed it under /usr/src. Then I
applied the kernel patch raid0145-19990421-2.2.6.gz to it. It should complain
of a failed chunk. I was able to find the failed chunk below:
[root@merchant linux]# find . -name \*.rej -ls
520588 1 -rw-r--r-- 1 root root 948 Jul 9 15:56
./include/linux/fs.h.rej
After examining fs.h.rej, I realized that a small routine needed to be added
below line 259 of the mostly-patched fs.h file. I have included a couple of
lines above and below my changes so you can find the same spot:
...
#define buffer_page(bh) (mem_map + MAP_NR((bh)->b_data))
#define touch_buffer(bh) set_bit(PG_referenced, &buffer_page(bh)->flags)
/* Here is what I added */
static inline int buffer_lowprio(struct buffer_head * bh)
{
return test_bit(BH_LowPrio, &bh->b_state);
}
/* end of my addittion */
#include <linux/pipe_fs_i.h>
...
After I made this change, I was able to configure and compile the kernel with
no trouble, and was able to raid together two 18 gig drives raid0 with no
problems so far:
[root@merchant linux]# cat /proc/mdstat
Personalities : [linear] [raid0]
read_ahead 1024 sectors
md0 : active raid0 sdc1[1] sdb1[0] 35840768 blocks 4k chunks
unused devices: <none>
[root@merchant linux]# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda1 2679650 899311 1641780 35% /
/dev/sda7 4400383 6694 4165970 0% /home
/dev/sda5 995115 21 943688 0% /tmp
/dev/md0 34107871 13 32315820 0% /data
Don't forget to change the partition IDs of each physical disk partition in
your raid group to 0xFD if you want Linux to autodetect the raided partition and
mount it on boot up from your fstab.
If anyone is interested I could diff the two kernels and make a new patch, but
I won't be able to get around to it until next week some time, and I don't want
to duplicate anyone elses work, so if anyone else is feeling motivated before
then, please feel free.
Happy RAIDing!!!
-Theron
On Sat, 10 Jul 1999, Johan Ankarloo wrote:
> Hi, i have a problem with setting up raid-0 or linear on a Redhat 6.0 with
> the new 2.2.10 kernel. I have tried to path the kernel with the path for
> 2.2.5 but with no luck. I get no specific error code. What am i doing
> wrong?? Please help me.
>
> My conf file for the raid disks
>
> ## /etc/raidtab ##
> raiddev /dev/md0
> raid-level linear
> nr-raid-disks 2
> nr-spare-disks 0
> chunk-size 16
> device /dev/hdc
> raid-disk 0
> device /dev/hdd
> raid-disk 1
>
> This is what happends when i tries to make the raidchain.
>
> [root@localhost ~]#mkraid /dev/md0
> handling MD device /dev/md0
> analyzing super-block
> disk 0: /dev/hdc, 8257032kB, raid superblock at 8256960kB
> disk 1: /dev/hdd, 16896616kB, raid superblock at 16896512kB
> mkraid: aborted
>
> [root@localhost ~]# more /proc/mdstat
> Personalities : [1 linear] [2 raid0] [3 raid1] [4 raid5]
> read_ahead not set
> md0 : inactive
> md1 : inactive
> md2 : inactive
> md3 : inactive
>
> Johan Ankarloo
> [EMAIL PROTECTED]
> Chalmers University of Technology