Skip to contentSkip to conversation

libata question

DISCUSSION Roger Oberholtzer 4 participants 16 messages Aug 1, 2006 – Aug 3, 2006 libata

lore
Share & tools
lore
#0 lore raw

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

I have been trying the warmplug stuff. But I am not convinced it is acting as I expect. If I remove a disk and then do a scan, shouldn't the disk entry go away? I know about the problems with just removing a disk. But this is with one that is not mounted. I just want to see if the disks are properly sensed as coming and going. I am using the warmplug instructions on your web site.

Thanks for any help.

Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#1 lore raw
Quoted 5 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

I have been trying the warmplug stuff. But I am not convinced it is acting as I expect. If I remove a disk and then do a scan, shouldn't the disk entry go away?

Eventually, yes. Do you mind to send me the dmesg?

Quoted 4 lines

I know about the problems with just removing a disk. But this is with one that is not mounted. I just want to see if the disks are properly sensed as coming and going. I am using the warmplug instructions on your web site.

There are some complications with piix PCS register (port enable/disable) which always seems to have some problem. If you can use AHCI mode, it will be *much* better.

If you think the driver doesn't do the right thing(tm), please send me detailed info. I'll try to fix the problem if possible or explain why it can't be fixed at the very least.

Signature · 1 line
tejun
#2 lore raw
Quoted 9 lines · Tejun Heo
Quoted 6 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

I have been trying the warmplug stuff. But I am not convinced it is acting as I expect. If I remove a disk and then do a scan, shouldn't the disk entry go away?

Eventually, yes. Do you mind to send me the dmesg?

I have picked out the lines related to this. Some of the complaints at the end are probably when I moved the disk.

Quoted 8 lines
Quoted 4 lines

I know about the problems with just removing a disk. But this is with one that is not mounted. I just want to see if the disks are properly sensed as coming and going. I am using the warmplug instructions on your web site.

There are some complications with piix PCS register (port enable/disable) which always seems to have some problem. If you can use AHCI mode, it will be *much* better.

OK. How do I get it in ahci mode? I see that both the ata_piix and achi drivers are loaded. This is what is loaded:

Module                  Size  Used by
xfs                   465784  0
af_packet              28040  2
ipv6                  238368  18
nfsd                  202244  9
exportfs                9600  1 nfsd
lockd                  57992  2 nfsd
nfs_acl                 7680  1 nfsd
sunrpc                142524  9 nfsd,lockd,nfs_acl
edd                    12740  0
loop                   18824  0
dm_mod                 54936  0
usbhid                 47328  0
ehci_hcd               32008  0
shpchp                 38304  0
uhci_hcd               24588  0
e1000                 104888  0
pci_hotplug            31548  1 shpchp
usbcore               115968  4 usbhid,ehci_hcd,uhci_hcd
ide_cd                 39712  0
cdrom                  36640  1 ide_cd
i2c_i801               12172  0
i2c_core               23552  1 i2c_i801
parport_pc             39780  1
lp                     15140  0
parport                37320  2 parport_pc,lp
ext3                  125576  2
jbd                    64032  1 ext3
sg                     35996  0
ata_piix               15492  0
ahci                   18436  0
processor              30056  0
libata                 65676  2 ata_piix,ahci
piix                   13444  0 [permanent]
sd_mod                 22656  0
scsi_mod              127624  4 sg,ahci,libata,sd_mod
ide_disk               19072  4
ide_core              118344  3 ide_cd,piix,ide_disk
Quoted 3 lines

If you think the driver doesn't do the right thing(tm), please send me detailed info. I'll try to fix the problem if possible or explain why it can't be fixed at the very least.

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

--
Roger Oberholtzer

#3 lore raw
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

I have been trying the warmplug stuff. But I am not convinced it is acting as I expect. If I remove a disk and then do a scan, shouldn't the disk entry go away?

Eventually, yes. Do you mind to send me the dmesg?

I have picked out the lines related to this. Some of the complaints at the end are probably when I moved the disk.

Yeap, those look pretty normal for the previous code. :p

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines

I know about the problems with just removing a disk. But this is with one that is not mounted. I just want to see if the disks are properly sensed as coming and going. I am using the warmplug instructions on your web site.

There are some complications with piix PCS register (port enable/disable) which always seems to have some problem. If you can use AHCI mode, it will be *much* better.

OK. How do I get it in ahci mode? I see that both the ata_piix and achi drivers are loaded. This is what is loaded:

Plain ICH7 doesn't support ahci. ICH7R supports ahci mode and usually configurable in the BIOS menu. On my board (P5LD2), it's in the first page (the left-most one where the clock setting is and hard disks are enumerated), it's called IDE configuration or something.

Quoted 5 lines
Quoted 1 line

If you think the driver doesn't do the right thing(tm), please send me detailed info. I'll try to fix the problem if possible or explain why it can't be fixed at the very least.

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Signature · 1 line
tejun
#4 lore raw
Quoted 9 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

Quoted 19 lines
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines

I have been trying the warmplug stuff. But I am not convinced it is acting as I expect. If I remove a disk and then do a scan, shouldn't the disk entry go away?

Eventually, yes. Do you mind to send me the dmesg?

I have picked out the lines related to this. Some of the complaints at the end are probably when I moved the disk.

Yeap, those look pretty normal for the previous code. :p

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

I know about the problems with just removing a disk. But this is with one that is not mounted. I just want to see if the disks are properly sensed as coming and going. I am using the warmplug instructions on your web site.

There are some complications with piix PCS register (port enable/disable) which always seems to have some problem. If you can use AHCI mode, it will be *much* better.

Quoted 7 lines
Quoted 2 lines

OK. How do I get it in ahci mode? I see that both the ata_piix and achi drivers are loaded. This is what is loaded:

Plain ICH7 doesn't support ahci. ICH7R supports ahci mode and usually configurable in the BIOS menu. On my board (P5LD2), it's in the first page (the left-most one where the clock setting is and hard disks are enumerated), it's called IDE configuration or something.

I will look. I have a SuperMicro motherboard.

Quoted 9 lines
Quoted 7 lines
Quoted 3 lines

If you think the driver doesn't do the right thing(tm), please send me detailed info. I'll try to fix the problem if possible or explain why it can't be fixed at the very least.

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

--
Roger Oberholtzer

#5 lore raw
Quoted 10 lines · Roger Oberholtzer
Quoted 6 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. It contains most of new stuff.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

I tried hard to make things just work. If you find things unnecessarily complicated, please let me know.

Good luck.

Signature · 1 line
tejun
#15 lore raw

31244 PCI Card

In reply to Roger Oberholtzer

Hello,

Does anyone know the info of Intel GD31244 PCI/X SATA card? I searched with Google but no luck. I mean to test it on PowerPC 74xx platform for my customized design. Is GD31244 suitable?

TIA,

Sam

#6 lore raw
In reply to Tejun Heo
Quoted 11 lines · Tejun Heo
Quoted 10 lines · Roger Oberholtzer
Quoted 8 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

Quoted 7 lines
Quoted 2 lines

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. It contains most of new stuff.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Thanks for that. But it had no noticeable difference.

I looked in the bios on my system to see if I could set the SATA disks to AHCI mode. I did not see anything like that. I could select to do a manual config, in which case I could set things like LBA mode, 32-bit I/O (which defaults to off). So if hots wap require AHCI mode, I seem to be screwed. It is a phoenix bios for the supermicro computer.

Maybe I can try a different SATA card instead of the stuff on the motherboard. What do you think is the best one re hots waping? Either PCI or PCI-X.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

I tried hard to make things just work. If you find things unnecessarily complicated, please let me know.

I have a system with an IDE disk with the OS that is fixed. I also have 4 hot swappable SATA disk bays. My use will involve changing the SATA disks to do an analysis of the data they contain. There will be 4 disks in an analysis set. I need to make it easy for the user to insert and remove disks. Rebooting each time is a bad alternative. So, if hot swap does not work, I will have to get warm swap working. I think part of the confusion I have is how to deal with disks that are mounted. So I need to get the steps well defined and make those that require user interaction as few as possible.

Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#7 lore raw
Quoted 8 lines · Roger Oberholtzer
Quoted 7 lines · Tejun Heo
Quoted 6 lines · Roger Oberholtzer
Quoted 5 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. It contains most of new stuff.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Thanks for that. But it had no noticeable difference.

Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' didn't do the right thing? Care to post dmesg?

Quoted 5 lines

I looked in the bios on my system to see if I could set the SATA disks to AHCI mode. I did not see anything like that. I could select to do a manual config, in which case I could set things like LBA mode, 32-bit I/O (which defaults to off). So if hots wap require AHCI mode, I seem to be screwed. It is a phoenix bios for the supermicro computer.

The chipset might not support ahci mode.

Quoted 3 lines

Maybe I can try a different SATA card instead of the stuff on the motherboard. What do you think is the best one re hots waping? Either PCI or PCI-X.

I primarily use sil3112/4, sil3124/32 and ahci for development. So those tend to have better support for EH/hotplug stuff.

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

I tried hard to make things just work. If you find things unnecessarily complicated, please let me know.

Quoted 9 lines

I have a system with an IDE disk with the OS that is fixed. I also have 4 hot swappable SATA disk bays. My use will involve changing the SATA disks to do an analysis of the data they contain. There will be 4 disks in an analysis set. I need to make it easy for the user to insert and remove disks. Rebooting each time is a bad alternative. So, if hot swap does not work, I will have to get warm swap working. I think part of the confusion I have is how to deal with disks that are mounted. So I need to get the steps well defined and make those that require user interaction as few as possible.

As far as libata is concerned, for warmplug, all you need to use are

echo 1 > /sys/class/scsi_device/xxxx/device/delete

for removal, and for plugging

echo - - - > /sys/class/scsi_host/xxxxx/scan

If you remove device before unmounting, the mounted fs will suffer from io errors and probably spit quite some error messages, so unmounting before is a good idea.

In general, ata_piix doesn't respond very well to runtime device addition mainly due to problems with port enable. So, if you boot with empty slot and put new device in there and issue scan, it might or might not work, but ports which had a device attached on boot seem to always work.

On any 2.6.17 kernel, without new EH, none of hot/warm plugging works. Please double check you have the correct kernel. Kernel messages are very different.

Signature · 1 line
tejun
#8 lore raw
Quoted 17 lines · Tejun Heo
Quoted 16 lines · Roger Oberholtzer
Quoted 15 lines · Tejun Heo
Quoted 11 lines · Roger Oberholtzer
Quoted 8 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. It contains most of new stuff.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Thanks for that. But it had no noticeable difference.

Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' didn't do the right thing? Care to post dmesg?

I thought maybe the detection of removal and insertion would work. I did not try the /sys stuff. I will look into that. I guess I can have them be sure there is a disk in each bay when the system is powered up. I will see if this hardware requires this.

Quoted 45 lines
Quoted 5 lines

I looked in the bios on my system to see if I could set the SATA disks to AHCI mode. I did not see anything like that. I could select to do a manual config, in which case I could set things like LBA mode, 32-bit I/O (which defaults to off). So if hots wap require AHCI mode, I seem to be screwed. It is a phoenix bios for the supermicro computer.

The chipset might not support ahci mode.

Quoted 3 lines

Maybe I can try a different SATA card instead of the stuff on the motherboard. What do you think is the best one re hots waping? Either PCI or PCI-X.

I primarily use sil3112/4, sil3124/32 and ahci for development. So those tend to have better support for EH/hotplug stuff.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

I tried hard to make things just work. If you find things unnecessarily complicated, please let me know.

Quoted 9 lines

I have a system with an IDE disk with the OS that is fixed. I also have 4 hot swappable SATA disk bays. My use will involve changing the SATA disks to do an analysis of the data they contain. There will be 4 disks in an analysis set. I need to make it easy for the user to insert and remove disks. Rebooting each time is a bad alternative. So, if hot swap does not work, I will have to get warm swap working. I think part of the confusion I have is how to deal with disks that are mounted. So I need to get the steps well defined and make those that require user interaction as few as possible.

As far as libata is concerned, for warmplug, all you need to use are

echo 1 > /sys/class/scsi_device/xxxx/device/delete

for removal, and for plugging

echo - - - > /sys/class/scsi_host/xxxxx/scan

If you remove device before unmounting, the mounted fs will suffer from io errors and probably spit quite some error messages, so unmounting before is a good idea.

Quoted 8 lines

In general, ata_piix doesn't respond very well to runtime device addition mainly due to problems with port enable. So, if you boot with empty slot and put new device in there and issue scan, it might or might not work, but ports which had a device attached on boot seem to always work.

On any 2.6.17 kernel, without new EH, none of hot/warm plugging works. Please double check you have the correct kernel. Kernel messages are very different.

It is 2.6.17.7 (current stable from kernel.org), with your suggested patches.

Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#9 lore raw
In reply to Tejun Heo
Quoted 61 lines · Tejun Heo
Quoted 11 lines · Roger Oberholtzer
Quoted 10 lines · Tejun Heo
Quoted 9 lines · Roger Oberholtzer
Quoted 8 lines · Tejun Heo
Quoted 4 lines · Roger Oberholtzer
Quoted 3 lines · Tejun Heo
Quoted 2 lines · Roger Oberholtzer

Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier. 2.6.17.7 doesn't contain updated EH and doesn't support any of new features including hot/warmplug. Please try 2.6.18-rc3.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

OK. But I think there are issues with 2.6.18 generally. But I can try it to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. It contains most of new stuff.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Thanks for that. But it had no noticeable difference.

Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' didn't do the right thing? Care to post dmesg?

Quoted 5 lines

I looked in the bios on my system to see if I could set the SATA disks to AHCI mode. I did not see anything like that. I could select to do a manual config, in which case I could set things like LBA mode, 32-bit I/O (which defaults to off). So if hots wap require AHCI mode, I seem to be screwed. It is a phoenix bios for the supermicro computer.

The chipset might not support ahci mode.

Quoted 3 lines

Maybe I can try a different SATA card instead of the stuff on the motherboard. What do you think is the best one re hots waping? Either PCI or PCI-X.

I primarily use sil3112/4, sil3124/32 and ahci for development. So those tend to have better support for EH/hotplug stuff.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

I bet the driver does the right thing. The trick is knowing what that is supposed to be. And how to use the various commands on files in /sys at the correct time and in the correct order.

Really, it's not that complicated.

Once you know what it is you need to do.

I tried hard to make things just work. If you find things unnecessarily complicated, please let me know.

Quoted 9 lines

I have a system with an IDE disk with the OS that is fixed. I also have 4 hot swappable SATA disk bays. My use will involve changing the SATA disks to do an analysis of the data they contain. There will be 4 disks in an analysis set. I need to make it easy for the user to insert and remove disks. Rebooting each time is a bad alternative. So, if hot swap does not work, I will have to get warm swap working. I think part of the confusion I have is how to deal with disks that are mounted. So I need to get the steps well defined and make those that require user interaction as few as possible.

As far as libata is concerned, for warmplug, all you need to use are

echo 1 > /sys/class/scsi_device/xxxx/device/delete

Quoted 7 lines

for removal, and for plugging

echo - - - > /sys/class/scsi_host/xxxxx/scan

If you remove device before unmounting, the mounted fs will suffer from io errors and probably spit quite some error messages, so unmounting before is a good idea.

Can the removal echo be done after the disk is physically removed? I expect not as this seems to confuse things. If this is the case, is there any way to restore sanity without a reboot?

Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#10 lore raw
Quoted 3 lines · Roger Oberholtzer

Can the removal echo be done after the disk is physically removed? I expect not as this seems to confuse things. If this is the case, is there any way to restore sanity without a reboot?

It shouldn't require a reboot under any circumstances. Without dmesg and explanation of what you did, I cannot help you much. What do you mean by sanity? What makes you think libata lost sanity? *Please* be more specific.

Signature · 1 line
tejun
#11 lore raw

If I switch two disks around and do a scan, nothing changes. I need to delete the disks and then scan to have the change noted. Is this expected behavior?

Does this mean I must delete a disk with a command when it it removed? This is problematic in that I do not know which disk may have been removed!
The old /proc/scsi interface would allow you to update the idea of which things are attached without knowing which they were and (key point) without
messing up a device that is unchanged and mounted.

Is this possible with libata?

I know you want logs. But I really feel that if the intended use is unclear,
I can waste lots of time here sending in logs when trying to do things that the driver does not intend I do. Step 1 must surely be to tell the driver's expectations/limits first.

If I remove or insert a disk, there is nothing at all added to the kernel log. There only seems to be activity when I echo something to a file in /sys.

If I remove disks (but run no commands on the computer) and then do a scan, I get this in the log:

Aug  3 08:16:43 aies1 kernel: ata1.00: qc timeout (cmd 0xec)
Aug  3 08:16:43 aies1 kernel: ata1.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:43 aies1 kernel: ata1.00: revalidation failed (errno=-5)
Aug  3 08:16:43 aies1 kernel: ata1: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:45 aies1 kernel: ata2.00: qc timeout (cmd 0xec)
Aug  3 08:16:45 aies1 kernel: ata2.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:45 aies1 kernel: ata2.00: revalidation failed (errno=-5)
Aug  3 08:16:45 aies1 kernel: ata2: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:55 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:16:57 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:18 aies1 kernel: ata1: port failed to respond (30 secs)
Aug  3 08:17:18 aies1 kernel: ata1: soft resetting port
Aug  3 08:17:20 aies1 kernel: ata2: port failed to respond (30 secs)
Aug  3 08:17:20 aies1 kernel: ata2: soft resetting port
Aug  3 08:17:25 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:17:27 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:48 aies1 kernel: ata1: port failed to respond (30 secs)
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#12 lore raw
Quoted 3 lines · Roger Oberholtzer

If I switch two disks around and do a scan, nothing changes. I need to delete the disks and then scan to have the change noted. Is this expected behavior?

No, issuing scan makes libata reset the channel and revalidate all attached devices. Swap as you want and issue scan to all controllers should always do the job as long as hardware is okay with it.

Quoted 9 lines

Does this mean I must delete a disk with a command when it it removed? This is problematic in that I do not know which disk may have been removed!
The old /proc/scsi interface would allow you to update the idea of which things are attached without knowing which they were and (key point) without
messing up a device that is unchanged and mounted.

Is this possible with libata?

Yes, just issue scan to all suspected interfaces.

Quoted 5 lines

I know you want logs. But I really feel that if the intended use is unclear,
I can waste lots of time here sending in logs when trying to do things that the driver does not intend I do. Step 1 must surely be to tell the driver's expectations/limits first.

To me, surplus info is always better than insufficient info. I can filter libata messages pretty well and explain it to you. Trust me.

Quoted 3 lines

If I remove or insert a disk, there is nothing at all added to the kernel log. There only seems to be activity when I echo something to a file in /sys.

Hardware limitation of ata_piix. PHY registers are inaccessible and there's no phy status changed interrupt.

Quoted 20 lines

If I remove disks (but run no commands on the computer) and then do a scan, I get this in the log:

Aug  3 08:16:43 aies1 kernel: ata1.00: qc timeout (cmd 0xec)
Aug  3 08:16:43 aies1 kernel: ata1.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:43 aies1 kernel: ata1.00: revalidation failed (errno=-5)
Aug  3 08:16:43 aies1 kernel: ata1: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:45 aies1 kernel: ata2.00: qc timeout (cmd 0xec)
Aug  3 08:16:45 aies1 kernel: ata2.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:45 aies1 kernel: ata2.00: revalidation failed (errno=-5)
Aug  3 08:16:45 aies1 kernel: ata2: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:55 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:16:57 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:18 aies1 kernel: ata1: port failed to respond (30 secs)
Quoted 8 lines
Aug  3 08:17:18 aies1 kernel: ata1: soft resetting port
Aug  3 08:17:20 aies1 kernel: ata2: port failed to respond (30 secs)
Aug  3 08:17:20 aies1 kernel: ata2: soft resetting port
Aug  3 08:17:25 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:17:27 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:48 aies1 kernel: ata1: port failed to respond (30 secs)

For both ata1 and ata2, libata is trying to scan the channels by

1. issuing reset
2. revalidate existing devices, if they fail remove.
3. discover new devices

ata_piix doesn't provide phy status regs, so libata cannot know whether device is attached to the port or not. libata does traditional device detection by writing and reading back certain TF regs but in most SATA controllers this method results in false positive. During boot, BIOS marks which ports are occupied, so this doesn't really matter.

So, libata assumes device is attached to the port and issues reset. Of course, device isn't there so it times out. After several tries (which can take a few minutes), libata will give up and disable the devices and ports. If you connect device to the ports and issue scan, libata will retry and discover new devices. Or, just replace disks and issue scan, libata will know that devices have changed immediately and detach old ones and attach new ones.

The problem is that ata_piix can't really do hotplug. It can do warmplug with some help from user but if you don't tell it which device to remove precisely, it may need quite some timeouts and retries as you've seen.

I don't know your usage model but my recommendation is...

* If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, they're cheap and hotplug works well on those controllers.

* If you're gonna stick with ata_piix, find a way to exactly find which device is removed or issue scan after attaching new device.

Signature · 1 line
tejun
#13 lore raw
Quoted 4 lines · Tejun Heo

I don't know your usage model but my recommendation is...

* If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, they're cheap and hotplug works well on those controllers.

I am considering this. Now to find who sells these in Sweden...

Quoted 4 lines

* If you're gonna stick with ata_piix, find a way to exactly find which device is removed or issue scan after attaching new device.

Signature · 10 lines
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
#14 lore raw
Quoted 10 lines · Roger Oberholtzer
Quoted 4 lines · Tejun Heo

I don't know your usage model but my recommendation is...

* If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, they're cheap and hotplug works well on those controllers.

I am considering this. Now to find who sells these in Sweden...

http://www.ggsdata.se/PC/stlaba223.html

// Stefan