How to tell Linux Kernel > 3.0 to completely ignore a failing disk?

Rmano

I have a Samsung laptop (Chronos s7) with one SATA hard disk on bus ata:1, which is detected as /dev/sda, an 8G SSD on ata:2, /dev/sdb, and various other devices on the rest of SATA interface.

The problem is that the SSD disk is

  • soldered to the main board (unmovable)
  • busted (it just gives I/O errors for any operation)
  • it does not appear in the bios (probably because it is broken)

Now this disk:

  • delays the boot three to five minutes trying to probe the failing disk, which is annoying;
  • but the most annoying thing is that the system fails to suspend due to /dev/sdb failing.

Notice that I can live with the delay at boot --- what worries me is the resume/suspend thing.


So the question is: can I tell the kernel to avoid even probing the device on ata:2?

In older kernel (<3.0), when I was still able to dig a bit into the source, there was a command-line parameter of the style hdb=ignore that would have done the trick.

I have tried all the tricks proposed below with udev and libata:force kernel parameters, to no avail. Specifically, the following does not work:

  1. Adding to one of the following /etc/udev/rules.d/ a file (in early execution like 00-ignoredisk.rules or in late as 99-ignoredisk.rules or in both places)

    SUBSYSTEMS=="scsi", DRIVERS=="sd", ATTRS{rev}=="SSD ", ATTRS{model}=="SanDisk iSSD P4 ", ENV{UDISKS_IGNORE}="1" 
    

    nor

    KERNEL=="sdb", ENV{UDISKS_IGNORE}="1"
    

    nor a lot of intermediate solutions --- this makes the disk not accessible after boot, but it is probed at boot, and still checked when suspending --- causing the suspend to fail.

  2. Editing the system files /lib/udev/rules.d/60-persistent-storage.rules (and udisks, udisks2) changing

    KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-|md", GOTO="persistent_storage_end"
    

    to

    KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-|md|sdb*", GOTO="persistent_storage_end"
    

    again, this has some effect, masking the disk from userspace, but the disk is still visible to the kernel.

  3. Booting with all the possible combinations (well, a lot of them) of the libata:force parameters (found for example here) in order to disable DMA, lower speed or whatever about the failing disk --- does not work. The parameter is used, but the disk is still probed and fails.

    Full udevadm info -a -n /dev/sdb pasted to http://paste.ubuntu.com/6186145/

    smartctl -i /dev/sdb -T permissive gives:

    root@samsung-romano:/home/romano# smartctl -i /dev/sdb -T permissive
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    
    Vendor:               /1:0:0:0
    Product:              
    User Capacity:        600,332,565,813,390,450 bytes [600 PB]
    Logical block size:   774843950 bytes
    >> Terminate command early due to bad response to IEC mode page
    

    which is clearly wrong. Nevertheless:

    root@samsung-romano:/home/romano# fdisk -b 512 -C 970 -H 256 -S 63 /dev/sdb
    fdisk: unable to read /dev/sdb: Input/output error
    

(SSD data from http://ubuntuforums.org/showthread.php?t=1935699&p=11739579#post11739579 ).

robbat2

libata does not have a noprobe option at all; that was a legacy IDE option...

But I went and wrote a kernel patch for you that implements it. It Should apply to many kernels very easily (the line above it was added 2013-05-21/v3.10-rc1*, but can be safely applied manually without that line).

Update The patch is now upstream (at least in 3.12.7 stable kernel). It is in the standard kernel distributed with Ubuntu 14.04 (which is based on 3.13-stable).

Once the patch is installed, adding

 libata.force=2.00:disable

to the kernel boot parameters will hide the disk from the Linux kernel. Double check that the number is correct; searching for the device name can help (obviously, you have to check the kernel messages before adding the boot parameters):

(0)samsung-romano:~% dmesg | grep iSSD
[    1.493279] ata2.00: ATA-8: SanDisk iSSD P4 8GB, SSD 9.14, max UDMA/133
[    1.494236] scsi 1:0:0:0: Direct-Access     ATA      SanDisk iSSD P4  SSD  PQ: 0 ANSI: 5

The important number is the ata2.00 in the first line above.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to tell Symfony 3 to ignore certain annotations?

分類Dev

How can I tell a function enters kernel or not

分類Dev

How to tell postMessage structured clone to ignore properties?

分類Dev

How to debug a driver failing to bind to a device on Linux?

分類Dev

How to tell the difference between soft lockup in kernel and softlockup in userspace?

分類Dev

How to tell GCC to ignore warnings in some source files?

分類Dev

How to change Linux kernel name

分類Dev

linux + how to find the unused disk on linux

分類Dev

How to remove linux swap partition from a disk?

分類Dev

How does Linux number disk partitions?

分類Dev

How to write to protected pages in the Linux kernel?

分類Dev

How many actual developers work on the Linux kernel?

分類Dev

How is a message queue implemented in the Linux kernel?

分類Dev

Is this a Linux Kernel Crash? How do I resolve it?

分類Dev

How to save or export a custom Linux kernel configuration?

分類Dev

Linux Kernel 3.13: How to list gendisk's?

分類Dev

How to resolve dpkg dependencies for linux kernel? (Debian)

分類Dev

How to tell webpack to ignore node modules, both core and installed from npm?

分類Dev

ignore files ending with numbers with 0-3 digits

分類Dev

How to load custom Linux kernel module that is not Linux kernel version dependant using RPM

分類Dev

GLFW3, how to tell if a window is currently maximized?

分類Dev

In Linux, how do you delete the partition table from a disk?

分類Dev

How soon will linux notice that a disk has been detached ? And can it be quicker?

分類Dev

How can semi-proprietary software be based on the Linux Kernel?

分類Dev

How does the linux kernel choose which firmware version to load?

分類Dev

How to profile in the Linux kernel or use the perf_event*.[hc] framework?

分類Dev

How do I search the linux kernel mailing list archives?

分類Dev

How to run a script on startup for Old Linux kernel (3.0.0)

分類Dev

How to know the values of CR registers from linux user and kernel modes

Related 関連記事

  1. 1

    How to tell Symfony 3 to ignore certain annotations?

  2. 2

    How can I tell a function enters kernel or not

  3. 3

    How to tell postMessage structured clone to ignore properties?

  4. 4

    How to debug a driver failing to bind to a device on Linux?

  5. 5

    How to tell the difference between soft lockup in kernel and softlockup in userspace?

  6. 6

    How to tell GCC to ignore warnings in some source files?

  7. 7

    How to change Linux kernel name

  8. 8

    linux + how to find the unused disk on linux

  9. 9

    How to remove linux swap partition from a disk?

  10. 10

    How does Linux number disk partitions?

  11. 11

    How to write to protected pages in the Linux kernel?

  12. 12

    How many actual developers work on the Linux kernel?

  13. 13

    How is a message queue implemented in the Linux kernel?

  14. 14

    Is this a Linux Kernel Crash? How do I resolve it?

  15. 15

    How to save or export a custom Linux kernel configuration?

  16. 16

    Linux Kernel 3.13: How to list gendisk's?

  17. 17

    How to resolve dpkg dependencies for linux kernel? (Debian)

  18. 18

    How to tell webpack to ignore node modules, both core and installed from npm?

  19. 19

    ignore files ending with numbers with 0-3 digits

  20. 20

    How to load custom Linux kernel module that is not Linux kernel version dependant using RPM

  21. 21

    GLFW3, how to tell if a window is currently maximized?

  22. 22

    In Linux, how do you delete the partition table from a disk?

  23. 23

    How soon will linux notice that a disk has been detached ? And can it be quicker?

  24. 24

    How can semi-proprietary software be based on the Linux Kernel?

  25. 25

    How does the linux kernel choose which firmware version to load?

  26. 26

    How to profile in the Linux kernel or use the perf_event*.[hc] framework?

  27. 27

    How do I search the linux kernel mailing list archives?

  28. 28

    How to run a script on startup for Old Linux kernel (3.0.0)

  29. 29

    How to know the values of CR registers from linux user and kernel modes

ホットタグ

アーカイブ