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
Now this disk:
/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:
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.
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.
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 ).
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]
コメントを追加