pata_via with software raid1: "attempt to access beyond end of device"
Linux 2.6.22
Intel(R) Celeron(R) CPU 2.26GHz
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06) Reiserfs3
I have 2 PATA HDs and they always worked perfectly with
software (kernel) raid1 using the old IDE kernel drivers. Now I use the new libata drivers (VIA), and it keep giving those erros messages:
attempt to access beyond end of device
md1: rw=0, want=155284112, limit=155284096
Is it raid's fault? Or libata's fault? The raid1 is ok:
/dev/md1:
Version : 00.90.03
Creation Time : Wed Jul 11 03:38:05 2007
Raid Level : raid1
Array Size : 77642048 (74.05 GiB 79.51 GB)
Used Dev Size : 77642048 (74.05 GiB 79.51 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Wed Jul 18 23:22:24 2007
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 6aed7615:3574770f:268e26d7:19872c99
Events : 0.29260
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
Signature · 4 lines
Linux 2.6.22: Holy Dancing Manatees, Batman! http://www.lastfm.pt/user/danielfraga http://u-br.net The Pointer Sisters - "Automatic" (Platinum & Gold Collection Series)
Quoted 11 lines · On Wed, 18 Jul 2007 23:23:19 -0300 Dâniel Fraga <[email protected]> wrote:
Linux 2.6.22
Intel(R) Celeron(R) CPU 2.26GHz
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06) Reiserfs3I have 2 PATA HDs and they always worked perfectly with
software (kernel) raid1 using the old IDE kernel drivers. Now I use the new libata drivers (VIA), and it keep giving those erros messages:attempt to access beyond end of device
md1: rw=0, want=155284112, limit=155284096
Are their host protected areas on the two disks ?
Quoted 1 line · On Fri, 20 Jul 2007 00:17:14 +0100 Alan Cox <[email protected]> wrote:
Are their host protected areas on the two disks ?
I don't know, but hdparm returns this:
/dev/sda:
ATA device, with non-removable media
Model Number: ST3802110A
Serial Number: 5LR2DA69
Firmware Revision: 3.AAE Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 156301488
LBA48 user addressable sectors: 156301488
device size with M = 1024*1024: 76319 MBytes
device size with M = 1000*1000: 80026 MBytes (80 GB)Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 1
Standby timer values: spec'd by Standard, no device specific minimum R/W multiple sector transfer: Max = 16 Current = 1 Recommended acoustic management value: 208, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
SET MAX security extension
* DOWNLOAD MICROCODE cmd
* General Purpose Logging feature set
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct
***
/dev/sdb:
ATA device, with non-removable media
Model Number: ST3802110A
Serial Number: 5LR3ZQ6A
Firmware Revision: 3.AAE Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 156301488
LBA48 user addressable sectors: 156301488
device size with M = 1024*1024: 76319 MBytes
device size with M = 1000*1000: 80026 MBytes (80 GB)Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 1
Standby timer values: spec'd by Standard, no device specific minimum R/W multiple sector transfer: Max = 16 Current = 1 Recommended acoustic management value: 208, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
SET MAX security extension
* DOWNLOAD MICROCODE cmd
* General Purpose Logging feature set
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct
*** Both HDs are identical. How can I determine if it's a Host
Protected Area?
SMART information, if needed:
fraga@abusar ~$ sudo ide-smart /dev/sda
Id= 1 Status=15 {Prefailure Online } Value=100 Threshold= 6 Passed
Id= 3 Status= 3 {Prefailure Online } Value= 99 Threshold= 0 Passed
Id= 4 Status=50 {Advisory Online } Value=100 Threshold= 20 Passed
Id= 5 Status=51 {Prefailure Online } Value=100 Threshold= 36 Passed
Id= 7 Status=15 {Prefailure Online } Value= 85 Threshold= 30 Passed
Id= 9 Status=50 {Advisory Online } Value= 93 Threshold= 0 Passed
Id= 10 Status=19 {Prefailure Online } Value=100 Threshold= 97 Passed
Id= 12 Status=50 {Advisory Online } Value=100 Threshold= 20 Passed
Id=187 Status=50 {Advisory Online } Value= 1 Threshold= 0 Passed
Id=189 Status=58 {Advisory Online } Value=100 Threshold= 0 Passed
Id=190 Status=34 {Advisory Online } Value= 66 Threshold= 45 Passed
Id=194 Status=34 {Advisory Online } Value= 34 Threshold= 0 Passed
Id=195 Status=26 {Advisory Online } Value= 69 Threshold= 0 Passed
Id=197 Status=18 {Advisory Online } Value=100 Threshold= 0 Passed
Id=198 Status=16 {Advisory OffLine} Value=100 Threshold= 0 Passed
Id=199 Status=62 {Advisory Online } Value=200 Threshold= 0 Passed
Id=200 Status= 0 {Advisory OffLine} Value=100 Threshold= 0 Passed
Id=202 Status=50 {Advisory Online } Value=100 Threshold= 0 PassedOffLineStatus=130 {Completed}, AutoOffLine=Yes, OffLineTimeout=7 minutes OffLineCapability=91 {Immediate Auto SuspendOnCmd} SmartRevision=10, CheckSum=177, SmartCapability=3 {SaveOnStandBy AutoSave}
fraga@abusar ~$ sudo ide-smart /dev/sdb
Id= 1 Status=15 {Prefailure Online } Value=104 Threshold= 6 Passed
Id= 3 Status= 3 {Prefailure Online } Value= 99 Threshold= 0 Passed
Id= 4 Status=50 {Advisory Online } Value=100 Threshold= 20 Passed
Id= 5 Status=51 {Prefailure Online } Value=100 Threshold= 36 Passed
Id= 7 Status=15 {Prefailure Online } Value= 84 Threshold= 30 Passed
Id= 9 Status=50 {Advisory Online } Value= 94 Threshold= 0 Passed
Id= 10 Status=19 {Prefailure Online } Value=100 Threshold= 97 Passed
Id= 12 Status=50 {Advisory Online } Value=100 Threshold= 20 Passed
Id=187 Status=50 {Advisory Online } Value=100 Threshold= 0 Passed
Id=189 Status=58 {Advisory Online } Value=100 Threshold= 0 Passed
Id=190 Status=34 {Advisory Online } Value= 66 Threshold= 45 Passed
Id=194 Status=34 {Advisory Online } Value= 34 Threshold= 0 Passed
Id=195 Status=26 {Advisory Online } Value= 66 Threshold= 0 Passed
Id=197 Status=18 {Advisory Online } Value=100 Threshold= 0 Passed
Id=198 Status=16 {Advisory OffLine} Value=100 Threshold= 0 Passed
Id=199 Status=62 {Advisory Online } Value=200 Threshold= 0 Passed
Id=200 Status= 0 {Advisory OffLine} Value=100 Threshold= 0 Passed
Id=202 Status=50 {Advisory Online } Value=100 Threshold= 0 PassedOffLineStatus=130 {Completed}, AutoOffLine=Yes, OffLineTimeout=7 minutes OffLineCapability=91 {Immediate Auto SuspendOnCmd} SmartRevision=10, CheckSum=193, SmartCapability=3 {SaveOnStandBy AutoSave}
Thank you very much.
Signature · 4 lines
Linux 2.6.22: Holy Dancing Manatees, Batman! http://www.lastfm.pt/user/danielfraga http://u-br.net Dave Matthews Band - "When the World Ends" (Everyday)
Quoted 1 line · On Thu, 19 Jul 2007 21:25:24 -0300 Dâniel Fraga <[email protected]> wrote:
Thank you very much.
Neil Brown from raid mailing-list asked me to:
fraga@abusar ~$ sudo od -D -j 65536 -N 4 /dev/md1
Password:
0200000 19410528
0200004
Then multiply 19410528 by 4 which is equal to 77642112. As 77642112 is higher than 77642048 (from mdadm -D /dev/md1:
array size), reiserfs thinks the device is bigger than what it really is. Does it help? Thanks.
Ps: the difference is small: 77642112 - 77642048 = 64
Signature · 4 lines
Linux 2.6.22: Holy Dancing Manatees, Batman! http://www.lastfm.pt/user/danielfraga http://u-br.net Exodus - "I Am Abomination" (Shovel Headed Kill Machine - 2005)
Quoted 6 lines · On Thu, 19 Jul 2007 21:25:24 -0300 Dâniel Fraga <[email protected]> wrote:
Quoted 1 line · On Fri, 20 Jul 2007 00:17:14 +0100 Alan Cox <[email protected]> wrote:
Are their host protected areas on the two disks ?
I don't know, but hdparm returns this:
Ok try booting with
libata.ignore_hpa=1
Alan
Quoted 3 lines · On Fri, 20 Jul 2007 16:37:09 +0100 Alan Cox <[email protected]> wrote:
Ok try booting with
libata.ignore_hpa=1
I used that option:
fraga@abusar ~$ dmesg|grep hpa
Kernel command line: auto BOOT_IMAGE=linux rw root=902 panic=5 libata.ignore_hpa=1
and tried to makereiserfs again, but got the same results:
Guessing about desired format.. Kernel 2.6.22 is running. Format 3.6 with standard journal
Count of blocks on the device: 19410528
Number of blocks consumed by mkreiserfs formatting process: 8804
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
19410528 x 4 = 77642112 which is higher than
Used Dev Size : 77642048 (74.05 GiB 79.51 GB)
The "solution" was to reduce 64K from the reiser partition, as
suggested by Neil Brown. This way the raid stopped to complain.
But I really don't know why mkreiserfs is creating a filesystem
with 64k more than allowed by the device... maybe a bug in mkreiserfs?
The strange is that it didn't happen with the OLD IDE
drivers... could it be a pata_via bug?
To determine if it is mkreiserfs' fault I used mke2fs just
to see if it will create the same number of blocks as reiserfs:
fraga@abusar ~$ sudo mke2fs /dev/sda2 mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9715712 inodes, 19410536 blocks
970526 blocks (5.00%) reserved for the super user First data block=0
593 block groups
32768 blocks per group, 32768 fragments per group 16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424Writing inode tables: done
Writing superblocks and filesystem accounting information: done
*** As you can see it created 19410536 blocks (19410536 x 4 =
77642144, exactly as mkreiserfs did).
So I suppose it's a bug in some other place.
Or mdadm is determining the incorrect size of the device,
64K less than the real size? Just for your convenience, mdadm returns:
Array Size : 77642048 (74.05 GiB 79.51 GB)
Used Dev Size : 77642048 (74.05 GiB 79.51 GB)
and mkreiserfs, mke2fs etc return 77642144. In other words, 64K
more. Which one is correct? mkreiserfs/mke2fs or mdadm?
According Neil Brown, mdadm is correct and we don't know why
mkreiserfs is creating a filesystem 64k larger than the device... so it could be a pata_via bug... is there any other test I can do to get rid of the possibility of a pata_via bug? If you need i can apply patches in the kernel or activate some other option.
And it seems that mdadm's method to determine the size of the
partition is different from mkreiserfs/mke2fs etc, right?
Thank you!
Signature · 5 lines
Linux 2.6.22: Holy Dancing Manatees, Batman! http://www.lastfm.pt/user/danielfraga http://u-br.net Marilyn Manson - "Cruci-Fiction in Space" (Holy Wood (In the Shadow of the Valley of Death) - 2000)
Quoted 5 lines
But I really don't know why mkreiserfs is creating a filesystem
with 64k more than allowed by the device... maybe a bug in mkreiserfs?The strange is that it didn't happen with the OLD IDE
drivers... could it be apata_viabug?
pata_via doesn't deal with disk sizes. That is handled by the core libata code (and on the whole by the scsi midlayer)
Once you've created a raid volume the sizing is however handled by the raid code not by the underlying code at all so it suggests a bug (or some kind of shared misbehaviour) in the various mk* tools. However I've no idea what that should suddenly show up now, and not with every scsi user.
Quoted 2 lines
And it seems that mdadm's method to determine the size of the
partition is different from mkreiserfs/mke2fs etc, right?
You would need to ask someone familiar with those applications or take a look at the source.