From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116
Description of problem:
We have a large (ca. 1.5 TB) external disk array attached to an
AIC-7899 SCSI HBA.
Relevant excerpts from boot messages:
SCSI subsystem driver Revision: 1.00
(scsi1) <Adaptec AIC-7899 Ultra 160/m SCSI host adapter> found at PCI
(scsi1) Wide Channel B, SCSI ID=7, 32/255 SCBs
(scsi1) Downloading sequencer code... 396 instructions downloaded
scsi1 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.5/5.2.0
<Adaptec AIC-7899 Ultra 160/m SCSI host adapter>
Vendor: transtec Model: Rev: 0001
Type: Direct-Access ANSI SCSI revision: 03
Attached scsi disk sdc at scsi1, channel 0, id 0, lun 0
(scsi1:0:0:0) Synchronous at 160.0 Mbyte/sec, offset 31.
SCSI device sdc: -1012908032 512-byte hdwr sectors (-518608 MB)
So the kernel thinks the device has a negative size.
Any attempt to read from the device returns EOF after 0 bytes:
[root@ryqvy root]# dd if=/dev/sdc of=/dev/null count=1
0+0 records in
0+0 records out
[root@ryqvy root]# cat < /dev/sdc
[root@ryqvy root]# uname -a
Linux ryqvy.wsr.ac.at 2.4.9-e.38smp #1 SMP Wed Feb 11 00:09:01 EST
2004 i686 unknown
The machine was previously running Redhat Linux 7.3 (with a recent
kernel) for about half a year without problems, so the problem has
been fixed in 2.4.20.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Attach SCSI device > 1 TB to Adaptec SCSI adapter
3. Look at reported size in boot messages and try to read from device
Actual Results: Negative size, device cannot be read.
Expected Results: Positive size matching the actual size of the
device, device can be read (and written).
I think I found the relevant patch:
- Leonard Zubkoff: 2TB disk device fixes
and the patch changes start_sect and nr_sects in struct hd_struct from
long to unsigned long. (linux/include/linux/genhd.h).
I applied only the changes to hd_struct and ignored all the changes in
put_user calls (AFAICS they are only cosmetic, as an unsigned long has
the same size as a signed long). This seems to do the trick. I can
access the device and mount the filesystem (haven't tried more yet).
I just noticed a strange behaviour in the current kernel
(2.4.9-e.59smp): fdisk -l fails on the large device (a read from
/dev/sdc returns 0 bytes), but the ext3 file system on /dev/sdc1 can
be mounted and seems to work (I haven't tried to read all 1.6 TB, though).
Is this issue still present in -e.70? I see that the mentioned fields in
hd_struct are still signed, so I would expect that the problem persists.
We upgraded the server in question to RHEL 3 a few months ago, so I can't check
Since we seem to have been the only ones who ever tried to use devices > 1TB
with RHEL 2.1 and we moved everything to RHEL 3 and later now, I guess the bug
can be closed.
Ah, after reviewing 2.1 product documentation, I noticed that 1TB is the
supported limit for block devices in RHEL2.1. Moving to RHEL3 was your best
bet. Thanks for the response.