Messages in this thread Patch in this message | | | Date | Sun, 01 Nov 1998 13:54:46 -0500 | From | Tomasz Przygoda <> | Subject | Re: 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]); } | |