Red Hat Bugzilla – Bug 47058
kernel get_last_block ioctl fails
Last modified: 2007-04-18 12:34:23 EDT
Description of Problem:
On Fairfax, beta 1.
parted tries to read the last block of the disk via the get_last_sector
ioctl, which is failing. Looks like parted is fine, but the kernel
implementation of get_last_sector is failing.
Always on aacraid (all I've tried so far).
Steps to Reproduce:
1. Run fairfax beta1 installer (I'm using FTP installs)
2. Choose to use Disk Druid for partitioning. See screen gets screwed up
with "read failed: Operation not permitted" messages.
3. Switch to VT4 and see:
SCSI disk error: host 1 channel 0 id 0 lun 0 return code = 1
I/O error: dev 08:00, sector 35542272
get_last_sector ioctl: bread returned NULL.
parted /dev/sda print
reproduces this quite easily.
Can't partition the disk.
Can partition the disk.
Looks like the get_last_block ioctl is getting called, but doesn't work
for some reason.
It's not a Linux bug. I believe it to be a bug in the PERC 2/Si firmware. A
SCSI Read Capacity to a RAID10 logical drive with a 64K stripe size returns an
odd number of sectors (in fact it's 64K*x+1). That can't be right. I'm
pursuing this with Adaptec.
It's a bug in the aacraid driver which implements the READ CAPACITY command.
Here's a patch which fixes it. Arjan, please apply.
--- linux-2.4/drivers/scsi/aacraid/aachba.c~ Wed Jun 27 13:58:50 2001
+++ linux-2.4/drivers/scsi/aacraid/aachba.c Tue Jul 10 18:57:01 2001
@@ -663,7 +663,7 @@
cmn_err( CE_DEBUG, "READ CAPACITY command" );
- capacity = fsa_dev_ptr->ContainerSize[ContainerId];
+ capacity = fsa_dev_ptr->ContainerSize[ContainerId] - 1;
cp = scsi_cmnd_ptr->request_buffer;
cp = ( capacity >> 24 ) & 0xff;
cp = ( capacity >> 16 ) & 0xff;
Added to tree