public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@sgi.com>
To: Andy <genanr@emsphone.com>
Cc: linux-kernel@vger.kernel.org, linux-xfs@oss.sgi.com
Subject: Re: Online resizing devices
Date: Wed, 6 Jul 2005 09:02:36 +1000	[thread overview]
Message-ID: <20050705230236.GA812@frodo> (raw)
In-Reply-To: <20050705160815.GA14324@thumper2>

On Tue, Jul 05, 2005 at 11:08:15AM -0500, Andy wrote:
> I'd like to do an online resize of and XFS filesystem on a non-partitioned
> device.  But, I always have to reboot to do so.
> 
> Say I have a sdc with 16777216 blocks and expand it on the SAN
> to have 17825792 blocks, and rescan the device.
> 
> The xfs_growfs does not see the size, nor does blockdev --getsz /dev/sdc,
> however, the I know the rescan worked because /sys/block/sdc/size now is
> 17825792 instead of 16777216.
> 

I've wondered why this is so too occasionally.  AFAICT, we are
doing everything correctly from the filesystem point of view,
we are just not being told of the larger device size when we
query it.  So, it was interesting to hear that sysfs reports
the correct size..

>From a quick look through the code - it seems sysfs reports the
value from the struct genhd ->capacity field (get_capacity and
set_capacity from <linux/genhd.h>).  Whereas the other block
device interfaces are looking at the struct block_device bd_inode
->i_size field.  So, it kinda looks like a coherency issue
between those two beasts - someone more familiar with the block
layer may be able to suggest a fix (Christoph/Jens/Al/...).

> Is there some reason for this?  Is there a fix for it?  I'm not using any
> volume management stuff yet but would like to be able to grow our
> filesystems without having to reboot to do so.

I'm not aware of a fix, and the last time I looked using a volume
manager doesn't resolve this issue either.

cheers.

-- 
Nathan

      reply	other threads:[~2005-07-05 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-05 16:08 Online resizing devices Andy
2005-07-05 23:02 ` Nathan Scott [this message]

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=20050705230236.GA812@frodo \
    --to=nathans@sgi.com \
    --cc=genanr@emsphone.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    /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