From: James Bottomley <James.Bottomley@suse.de>
To: Asdo <asdo@shiftmail.org>
Cc: Robert Hancock <hancockrwd@gmail.com>, linux-ide@vger.kernel.org
Subject: Re: How to reread disk size?
Date: Mon, 22 Feb 2010 13:57:52 +0100 [thread overview]
Message-ID: <1266843472.4414.23.camel@mulgrave.site> (raw)
In-Reply-To: <4B81D699.704@shiftmail.org>
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.
James
next prev parent reply other threads:[~2010-02-22 12:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 23:48 How to reread disk size? Asdo
2010-02-20 18:37 ` Robert Hancock
2010-02-20 21:30 ` Asdo
2010-02-20 23:49 ` Asdo
2010-02-21 7:22 ` James Bottomley
[not found] ` <4B814B26.5020501@shiftmail.org>
[not found] ` <51f3faa71002210910s484c8e4i975ebf2314287d66@mail.gmail.com>
2010-02-22 0:58 ` Asdo
2010-02-22 12:57 ` James Bottomley [this message]
2010-02-23 18:05 ` Asdo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1266843472.4414.23.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=asdo@shiftmail.org \
--cc=hancockrwd@gmail.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).