James Bottomley wrote:
On Mon, 2010-02-22 at 01:58 +0100, Asdo wrote:
Robert Hancock wrote:
ata_piix doesn't have a way to get automatically notified that the
disk has been hotplugged since the chipset doesn't support it in this
mode. (The ideal solution would be to switch the controller into AHCI
mode, but I don't know if that's possible on that chipset and BIOS.)
I think there are some ways to get the code to recheck the disk
however.. you can try echoing something into the "rescan" sysfs file
under /sys that matches your device (do a "find /sys/ -name
scsi_level" to see what directories they're in, the rescan file is in
the same directory).
Thanks for the hint
It doesn't work unfortunately.
Echoing something into rescan makes it output (in dmesg) basically the
same message that comes out with blockdev --rereadpt /dev/sdr. The size
is still detected wrong. Catting "model" also turns out that the old
brand of disk still being detected. smartctl -a does show the new disk :-)
I tried to write "1" in evt_media_change but it's permission denied :-)
Right. libata caches the value from the moment it scans the device.
You might be able to alter it by having the device destroyed and
recreated ... that would be echoing 1 to the delete under the scsi
device sysfs node and then echoing '- - -' to the host rescan parameter.
If that doesn't work, libata will need to be fixed somehow because that
would mean it isn't slaving it's device lifetimes to the SCSI model.
Great, it works! Thank you
root@mynode:/sys# echo 1 >
/sys/devices/pci0000:00/0000:00:1f.2/host3/target3:0:1/3:0:1:0/delete
and then
echo "- - -" > /sys/class/scsi_host/host3/scan
recreated the device with 1TB size!
Acually then I tried to swap disks again and just give the
echo "- - -" > /sys/class/scsi_host/host3/scan
and it worked already. So deleting the device was not needed.
However the "rescan" in the same directory of scsi_level you suggested
in previous post did not work. This "scan" in scsi_host is more powerful :-D
Thank you
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html