LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to change retry times of removable disk scan when plug SATA drive into Linux PC? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-change-retry-times-of-removable-disk-scan-when-plug-sata-drive-into-linux-pc-886987/)

yanzi 06-17-2011 11:17 PM

How to change retry times of removable disk scan when plug SATA drive into Linux PC?
 
Dear Linux experts:

I have OpenSUSE 11.3 running and I noticed if I plug one SATA drive into the system, the Linux will issue following ATA commands to gather basic information from the drive to build the sysfs for this plugged in device.

0xE5 to check power mode
0xEF to set features
0xEC to identify drive
0xB0/D0 to read SMART data
0x60 (read FPDMA Queued) to read LBA 0 back

If the drive is a good drive and the Linux will stop to issue the commands above after some loops of command sequence above, and create the node such as /dev/sdg.

If the drive is not a good drive (maybe I can say it is not a ready drive because it has manufacture FW which doesn't support SMART read and LBA read/write yet), the OpenSUSE will issue command sequence above endlessly because it always get error in SMART data read error and LBA 0 read error, although Linux already created the node for this bad drive.

Is there a way to change the retry times when Linux scan a new plugged in SATA drive? If it is a bad disk drive, let Linux just issue some number retries then gave up.

My kernel version is "2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 i686 i686 i386 GNU/Linux", and the disk type is just SATA drive, and plug into LSI HBA such as 9200-16e.

Thank you very much!


All times are GMT -5. The time now is 09:44 AM.