[5039] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Large DPT RAID-5 "drive" reporting wrong size under fdisk... (help)

daemon@ATHENA.MIT.EDU (Tomasz Przygoda)
Sun Nov 1 14:04:18 1998

Date: 	Sun, 01 Nov 1998 13:54:46 -0500
From: Tomasz Przygoda <tprzyg@securities.com>
To: Jeff Wiegley <jeff@la.usweb.com>
CC: linux-scsi@vger.rutgers.edu, linux-kernel@vger.rutgers.edu

This is a multi-part message in MIME format.
--------------31318CB379E8E67DCEB2DE17
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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...."



--------------31318CB379E8E67DCEB2DE17
Content-Type: text/plain; charset=us-ascii;
 name="bigdrives.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bigdrives.patch"

--- 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]);
     }
 

--------------31318CB379E8E67DCEB2DE17--


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post