lkml.org 
[lkml]   [1998]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Large DPT RAID-5 "drive" reporting wrong size under fdisk... (help)
I made this patch some time ago when I run into a problem with 68GB
RAID5 drive being seen as only 4GB :(.
Unfortunately you need to recompile a kernel with this patch and put it
on the RedHat install diskette, as well as to substitute the kernel that
will be installed.


-- Tomek,
"In theory there's no difference between theory and practice, but in practice...."


--- linux/drivers/scsi/scsicam.c.orig Mon Jun 29 15:33:48 1998
+++ linux/drivers/scsi/scsicam.c Mon Jun 29 15:32:58 1998
@@ -45,6 +45,7 @@
struct buffer_head *bh;
int ret_code;
int size = disk->capacity;
+ unsigned long temp_cyl;

if (!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024)))
return -1;
@@ -67,6 +68,11 @@
if (ret_code || ip[0] > 255 || ip[1] > 63) {
ip[0] = 64;
ip[1] = 32;
+ temp_cyl = size / (ip[0] * ip[1]);
+ if (temp_cyl > 65534) {
+ ip[0] = 255;
+ ip[1] = 63;
+ }
ip[2] = size / (ip[0] * ip[1]);
}
\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.056 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site