View previous topic :: View next topic |
Author |
Message |
chris.c.hogan Apprentice
Joined: 02 Oct 2005 Posts: 189
|
Posted: Thu Nov 22, 2012 4:46 pm Post subject: /dev/sda No Partitions on kernel upgrade |
|
|
I have an older desktop that I am using as a server. I had planned on retiring it to one of my kids. However, circumstances have mandated I put it back into service as a backup server. It has been offline for a while and needed updates to the software. In updating the kernel from gentoo-sources 2.6.38-gentoo-r6 to 3.5.7-gentoo, /dev/sda (attached to a HighPoint Technologies HPT370A RAID controller) lost access to its partition table. Thinking it a kernel bug, I then updated to 3.6.6-gentoo. However, that just added a new (not sure if related) error message. I can boot from 2.6.38-gentoo-r6 without problem. I have also found that hdparm -z /dev/sda restores access to the partition table without further problems.
From dmesg (3.6.6):
Code: |
[ 0.621238] sd 0:0:0:0: [sda] Write Protect is off
[ 0.621303] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 0.621342] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.843088] ACPI: Invalid Power Resource to register!
[ 1.061888] ACPI: Invalid Power Resource to register!<6>
[ 1.300027] tsc: Refined TSC clocksource calibration: 2391.136 MHz
[ 31.060034] ata1: lost interrupt (Status 0x58)
[ 31.070011] ata1: drained 65536 bytes to clear DRQ
[ 31.146317] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 31.146370] ata1.00: failed command: READ DMA
[ 31.146423] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[ 31.146423] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 31.146516] ata1.00: status: { DRDY }
[ 31.146694] ata1: soft resetting link
[ 31.540515] ata1.00: configured for UDMA/100
[ 31.540568] ata1.00: device reported invalid CHS sector 0
[ 31.540625] sd 0:0:0:0: [sda]
[ 31.540670] Result: hostbyte=0x00 driverbyte=0x08
[ 31.540718] sd 0:0:0:0: [sda]
[ 31.540761] Sense Key : 0xb [current] [descriptor]
[ 31.540898] Descriptor sense data with sense descriptors (in hex):
[ 31.540978] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 31.541535] 00 00 00 00
[ 31.541732] sd 0:0:0:0: [sda]
[ 31.541777] ASC=0x0 ASCQ=0x0
[ 31.541852] sd 0:0:0:0: [sda] CDB:
[ 31.541899] cdb[0]=0x28: 28 00 00 00 00 00 00 00 08 00
[ 31.542309] end_request: I/O error, dev sda, sector 0
[ 31.542358] Buffer I/O error on device sda, logical block 0
[ 31.542423] ata1: EH complete
[ 31.565252] sda: unable to read partition table
[ 31.565406] sda: detected capacity change from 0 to 120034123776
[ 31.565667] sd 0:0:0:0: [sda] Attached SCSI disk
|
After executing hdparm -z /dev/sda, the following is added:
Code: |
[ 2112.924949] sda: sda1 sda2 sda3
|
And all is well with the drive. Using the 2.6 kernel, this error doesn't happen at all.
Does anyone know if this is a known bug? Also, would it be possible to slip the hdparm into the boot process before udev loads, but after the root partition is mounted? I am shipping this server 4000 miles away and will only have remote access to it.
Oh, and no worries on this being /dev/sda. A few years ago the RAID controller decided it wanted to be the primary controller and all the drive letters rearranged themselves. So the system boots off of /dev/sdc now. |
|
Back to top |
|
|
chris.c.hogan Apprentice
Joined: 02 Oct 2005 Posts: 189
|
Posted: Tue Nov 27, 2012 1:37 am Post subject: |
|
|
I've put a work-around in place to make the drive functional. The error still happens. However, now the drive mounts on boot. I'll keep an eye on the system to see if the error ever happens after boot. However, so far, it has not.
Workaround: /etc/init.d/fixsda
Code: |
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Fix bug where sda partition is not usable on kernels above version 3"
depend()
{
provide fixsda
before dev-mount
}
start() {
local kv=$(uname -r)
if [[ ${kv:0:1} -gt 2 ]] ; then
ebegin "Forced reloading of /dev/sda partition table."
/sbin/hdparm -z /dev/sda
eend $? "Failed to load /dev/sda"
else
ewarn "Skipping fixsda on kernel less then V3"
fi
}
|
I also edit /etc/rc.conf and added:
Code: |
rc_dev-mount_need="fixsda"
|
This loads the fix before udev has a chance to load. This is a work-around, the error is still there. So I wouldn't consider this problem solved. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|