public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Voelkel <Stefan.Voelkel@millenux.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: LUN resizing
Date: Wed, 26 Nov 2003 10:45:11 +0100	[thread overview]
Message-ID: <1069839911.26091.443.camel@lt-sv> (raw)
In-Reply-To: <1069776713.1787.36.camel@mulgrave>

[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]

On Tue, 2003-11-25 at 17:11, James Bottomley wrote:
> On Tue, 2003-11-25 at 09:43, James Bottomley wrote:
> > You simply do
> > 
> > echo 1 > /sys/bus/scsi/<device>/rescan
> > 
> > It will re-read the capacity and partition table (as long as the device
> > is unmounted and none of the partitions open).
>
> OK, I actually tried this, you need two steps.  The one above will
> reread the capacity.  After that you send a BLKRRPART ioctl to the
> device to re-read the partition table. (but, obviously, something else
> will have to update the partition table to see the new device size)

Ok, that is a step in the right direction, as it will not disrupt
operations of other devices on the same bus.

But I want to be able to do it with a mounted partition, something like
"device size hotpluging". I don't know if that is the right term, but
think of the 2.7 memory hotplug plans.

      * in the SAN I add space to my LUN
      * then I hit my linux box on the head to get it to send a
        read_capacity and update the size of the device.
      * run a nifty tool that creates a new partition table and writes
        it to the device.
      * use newly gained space

so what we actually need is:

      * a way to force the scsi stack to send out a read_capacity and
        act on it (perhaps another /sys/ entry?), perhaps a hotplug
        event that creates a new partition table, eg add the new space
        as "unused" at the end of the device, write that table and
        ioctl() to reread it.
      * a way to fiddle around with live partitions,  a userspace tool
        with a way to tell the kernel supsend/reactivate io on that
        block device. it would have to take care of the filesystems
        residing on the device.

regards
	Stefan
-- 
--------------------------------------------------------------------
Stefan Völkel                            stefan.voelkel@millenux.com
Millenux GmbH                              mobile: +49.170.79177.17
Lilienthalstraße 2                          phone: +49.711.88770.300
70825 Stuttgart-Korntal                       fax: +49.711.88770.349
     -= linux without limits -=- http://linux.zSeries.org/ =-

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-11-26  9:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25  9:34 LUN resizing Stefan Voelkel
2003-11-25 15:43 ` James Bottomley
2003-11-25 16:11   ` James Bottomley
2003-11-26  9:45     ` Stefan Voelkel [this message]
2003-11-26  9:48       ` Christoph Hellwig
2003-11-28 10:08         ` Stefan Voelkel
2003-11-28 10:23           ` Christoph Hellwig
2003-11-28 16:18           ` James Bottomley
2003-11-25 19:34   ` Lincoln Dale
  -- strict thread matches above, loose matches on Subject: below --
2003-11-28 22:29 christophe varoqui

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=1069839911.26091.443.camel@lt-sv \
    --to=stefan.voelkel@millenux.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@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