public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* using 2 TB  in real life
@ 2002-12-12 11:12 Anders Henke
  2002-12-12 12:03 ` Mike Black
  0 siblings, 1 reply; 7+ messages in thread
From: Anders Henke @ 2002-12-12 11:12 UTC (permalink / raw)
  To: linux-kernel

I've just added a 1.9 TB array to one of my servers (running 2.4.20,
the device is an 12bay-IFT IDE-to-Fibre-RAID connected via a 
Qlogic 2300 HBA):

Disk /dev/sdb: 255 heads, 63 sectors, 247422 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1    247422 1987417183+  83  Linux
[...]
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
SCSI device sdb: -320126976 512-byte hdwr sectors (-163904 MB)
 sdb: sdb1


Another array (1.2 TB) gives almost the same effect:
Disk /dev/sdb: 255 heads, 63 sectors, 157450 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1    157450 1264717093+  83  Linux
[...]
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
SCSI device sdb: -1765523456 512-byte hdwr sectors (195564 MB)
 sdb: sdb1

These issues arise when using arrays larger than around 0.5 T;
nevertheless, these devices do work fine with both xfs or ext3, 
it's "just" a cosmetical issue. However, this negative
values make one feel like Linux isn't truely capable of using up to
2 TB of disk devices and so this should be resolved.
To me it seems that sd.c doesn't know how to calculate the
correct values for such beasts - any ideas?


Regards

Anders
-- 
http://sysiphus.de/

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: using 2 TB  in real life
@ 2002-12-12 23:15 Andries.Brouwer
  2002-12-13 14:43 ` Anders Henke
  0 siblings, 1 reply; 7+ messages in thread
From: Andries.Brouwer @ 2002-12-12 23:15 UTC (permalink / raw)
  To: anders.henke, linux-kernel; +Cc: marcelo

> SCSI device sdb: -320126976 512-byte hdwr sectors (-163904 MB)

Yes, the code in 2.4.20 works up to 30 bits.
A slight modification works up to 31 bits.
[This is cosmetic only.]

Andries

--- /linux/2.4/linux-2.4.20/linux/drivers/scsi/sd.c	Sat Aug  3 02:39:44 2002
+++ ./sd.c	Fri Dec 13 00:12:00 2002
@@ -1001,7 +1001,7 @@
 			 */
 			int m;
 			int hard_sector = sector_size;
-			int sz = rscsi_disks[i].capacity * (hard_sector/256);
+			unsigned int sz = (rscsi_disks[i].capacity/2) * (hard_sector/256);
 
 			/* There are 16 minors allocated for each major device */
 			for (m = i << 4; m < ((i + 1) << 4); m++) {
@@ -1009,9 +1009,9 @@
 			}
 
 			printk("SCSI device %s: "
-			       "%d %d-byte hdwr sectors (%d MB)\n",
+			       "%u %d-byte hdwr sectors (%d MB)\n",
 			       nbuff, rscsi_disks[i].capacity,
-			       hard_sector, (sz/2 - sz/1250 + 974)/1950);
+			       hard_sector, (sz - sz/625 + 974)/1950);
 		}
 
 		/* Rescale capacity to 512-byte units */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-12-13 14:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-12 11:12 using 2 TB in real life Anders Henke
2002-12-12 12:03 ` Mike Black
2002-12-12 17:22   ` Bryan O'Sullivan
2002-12-12 17:48     ` Anders Henke
2002-12-12 19:03       ` Bryan O'Sullivan
  -- strict thread matches above, loose matches on Subject: below --
2002-12-12 23:15 Andries.Brouwer
2002-12-13 14:43 ` Anders Henke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox