# Kernel 3.* cannot see my SATA disk

## binro

I am trying to upgrade from kernel 2.6.35 to 3.1.5 but when I boot the initrd program fails during vgscan with a message it cannot find one of the physical volumes. The UUID corresponds to my SATA disk, which according to hwinfo is PIIX:

  Serial ID: "9ND1F29J"                                                                 

  Driver: "ata_piix", "sd"

  Device File: /dev/sda

  Device Files: /dev/sda, /dev/disk/by-id/ata-ST3250824AS_9ND1F29J, /dev/disk/by-id/scsi-SATA_ST3250824AS_9ND1F29J, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0

My kernel config for SATA is unchanged from the old kernel:

CONFIG_ATA=y

CONFIG_ATA_VERBOSE_ERROR=y

CONFIG_ATA_ACPI=y

CONFIG_SATA_PMP=y

CONFIG_ATA_SFF=y

CONFIG_ATA_BMDMA=y

CONFIG_ATA_PIIX=y

CONFIG_ATA_GENERIC=y

I also, in desperation, tried turning on all the likely other options in the ATA set up, but it did not help. I have tried kernels 3.0.3, 3.1.5 and 3.1.6 but they all fail. I suspected the latest genkernel might be the problem, but when I generated a new ram disk for my 2.6.35 kernel it worked OK. 

The good news is that when I booted the SystemRescueCD, which uses a 3.0.3 kernel, it found all the disks correctly! So this problem has a solution but I just don't know which damn option is missing. Can anyone point out what I have missed out?

TIA and a happy New Year to all.  :Smile: 

----------

## teika

It may be an lvm and initrd issue.

When I forgot to pass the boot option real_root=/dev/vg/foobar, which is handled by the initramfs made by genkernel, I receive a similar message, IIRC.

Thailand... I'm sorry for the flood. Best wishes to all Thais.

----------

## binro

 *teika wrote:*   

> 
> 
> When I forgot to pass the boot option real_root=/dev/vg/foobar, which is handled by the initramfs made by genkernel, I receive a similar message, IIRC.
> 
> 

 

Thanks for response but I have real_root specified but the kernel can't find it because the VG is incomplete. 

We live in central Bangkok and missed the floods - just.  :Smile: 

----------

## Hu

If you think that missing driver support is likely, paste the output of lspci -n into the Debian GNU/Linux device driver check page to get a list of required kernel options.  If you think it is an initramfs problem, try to drop into an interactive shell in the initramfs.  Once there, check whether all the device nodes showed up.  If they did, run pvscan by hand.  If that works, then the drive did not become ready fast enough for the automated pvscan to find it.

----------

## binro

Thanks, that's a very useful link but unfortunately it just told me what I already know: I need the ata-piix module. Dropping to the ash shell I cannot find the lvm commands. They must be there somewhere because linuxrc just did a vgscan. Anyway I tried adding a scandelay parameter but it made no difference. I am out of ideas.  :Sad: 

----------

## Hu

Your initrd may have shipped only a single binary named lvm, which has all the lvm subcommands built in.  If this is the case, then lvm pvscan is the equivalent of running pvscan on a full system.  The same behavior applies to all the other lvm commands.

----------

## binro

Thanks, lvm <command> works.

I tried kernel-2.6.38 and got the same result. The whole point of this exercise is too remove the use of the deprecated IDE drivers. When I reenabled this option in kernel 3.1.6 the VG got mounted correctly, so disabling the old drivers seems to confuse LVM. The current VG consists of:

  PV /dev/sda3   VG vg00   lvm2 [213.79 GiB / 59.79 GiB free]

  PV /dev/hda4   VG vg00   lvm2 [170.73 GiB / 84.73 GiB free]

When I disable the IDE drivers I get:

  PV unknown     VG vg00   lvm2 [213.79 GiB / 59.79 GiB free]

  PV /dev/sda4   VG vg00   lvm2 [170.73 GiB / 84.73 GiB free]

Now, bear in mind, the sysrescd can mount this configuration correctly, I get (IIRC):

  PV /dev/sdb3   VG vg00   lvm2 [213.79 GiB / 59.79 GiB free]

  PV /dev/sda4   VG vg00   lvm2 [170.73 GiB / 84.73 GiB free]

So where do I go from here?

----------

## qium

Have you configured devtmpfs correctly? See here

----------

## binro

 *qium wrote:*   

> Have you configured devtmpfs correctly? See here

 

Seems a bit of a long-shot; previous kernels didn't need it. Anyway, I am no longer near the machine, so the point must remain moot for a few weeks.

----------

