LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Problem with size after growing a device
@ 2007-07-03 10:40 Lars Michael Jogbäck
  2007-07-09 19:22 ` Andy
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Michael Jogbäck @ 2007-07-03 10:40 UTC (permalink / raw)
  To: linux-kernel

Hi,

I don't know really which subsystem this, so I'm sending this to the 
linux-kernel list.
Please direct me to a more appropriate place if this is not correct.

I'm using a 3ware 9500 with Linux 2.6.18.1. I've grown the HW 
raid5-array and here is where the problem begins. After the card had 
expanded the array, I used "blockdev --rereadpt /dev/sdk" to get the 
kernel to recognize the now larger device. The last step was to do a 
"pvresize /dev/sdk". The problem is that pvresize still thought that the 
device was at the original size.

 From the lvm mailinglist I found out that pvresize used the same 
mechanism as "blockdev --getsz" to get the size of the disks, so I 
tested this and found that blockdev also reported the device to have the 
wrong size.

So, if I do:
# cat /sys/block/sdk/size
4882708480

and
# blockdev --getsz /dev/sdk
3906166784

Apparently /sys/block/sdk/size is updated with the new size, but 
whatever "blockdev --getsz" and "pvresize" is querying is not. If I 
reboot, everything works correctly.

Best Regards,
/LM

Ps. please keep me as Cc: on this; since I'm not subscibed to the 
linux-kernel list..


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with size after growing a device
  2007-07-03 10:40 Problem with size after growing a device Lars Michael Jogbäck
@ 2007-07-09 19:22 ` Andy
  0 siblings, 0 replies; 2+ messages in thread
From: Andy @ 2007-07-09 19:22 UTC (permalink / raw)
  To: Lars Michael Jogbäck; +Cc: linux-kernel

On Tue, Jul 03, 2007 at 12:40:56PM +0200, Lars Michael Jogbäck wrote:
> Hi,
> 
> So, if I do:
> # cat /sys/block/sdk/size
> 4882708480
> 
> and
> # blockdev --getsz /dev/sdk
> 3906166784
> 
> Apparently /sys/block/sdk/size is updated with the new size, but 
> whatever "blockdev --getsz" and "pvresize" is querying is not. If I 
> reboot, everything works correctly.
> 
I have mentioned this problem before with resizing non-partitioned devices,
then trying to resize the filesystem.  

I consider the issue a bug, because different parts of the kernel have
a different size for the same device.  It should be consistent, preferably
with the new size being reported both by the sys fs and by blockdev (then
hopefully xfs_growfs will work without a reboot).  

Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-09 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-03 10:40 Problem with size after growing a device Lars Michael Jogbäck
2007-07-09 19:22 ` Andy

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).