public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Rereading disk geometry without reboot
@ 2004-12-06 20:23 Andy
  2004-12-07 11:41 ` Jan Engelhardt
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andy @ 2004-12-06 20:23 UTC (permalink / raw)
  To: linux-kernel

I am using linux kernel 2.6.9 on a san.  I have file systems on
non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
the XFS file system those disks.  What I would like to avoid rebooting or
even unmounting the filesystem if possible.

Is there any way to get the kernel to re-read the disk geometry and change
the information it holds without rebooting or reloading the module (which is
as bad as a reboot in my case)?

Thanks,

Andy

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

* Re: Rereading disk geometry without reboot
  2004-12-06 20:23 Rereading disk geometry without reboot Andy
@ 2004-12-07 11:41 ` Jan Engelhardt
  2004-12-07 15:16   ` Randy.Dunlap
  2004-12-07 16:37 ` Mark Haverkamp
  2004-12-07 17:28 ` Robin Holt
  2 siblings, 1 reply; 8+ messages in thread
From: Jan Engelhardt @ 2004-12-07 11:41 UTC (permalink / raw)
  To: Andy; +Cc: linux-kernel

>I am using linux kernel 2.6.9 on a san.  I have file systems on

(What's a SAN?)

>non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
>the XFS file system those disks.  What I would like to avoid rebooting or
>even unmounting the filesystem if possible.
>
>Is there any way to get the kernel to re-read the disk geometry and change
>the information it holds without rebooting or reloading the module (which is
>as bad as a reboot in my case)?

The `fdisk` tool will spit out an ioctl() to make the kernel reread the
partition table (on normal computers, don't know about or what SAN). No need to
reboot there at least.


Jan Engelhardt
-- 
ENOSPC

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

* Re: Rereading disk geometry without reboot
  2004-12-07 11:41 ` Jan Engelhardt
@ 2004-12-07 15:16   ` Randy.Dunlap
  2004-12-07 17:23     ` Jan Engelhardt
  0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2004-12-07 15:16 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Andy, linux-kernel

Jan Engelhardt wrote:
>>I am using linux kernel 2.6.9 on a san.  I have file systems on
> 
> 
> (What's a SAN?)
> 
> 
>>non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
>>the XFS file system those disks.  What I would like to avoid rebooting or
>>even unmounting the filesystem if possible.
>>
>>Is there any way to get the kernel to re-read the disk geometry and change
>>the information it holds without rebooting or reloading the module (which is
>>as bad as a reboot in my case)?
> 
> 
> The `fdisk` tool will spit out an ioctl() to make the kernel reread the
> partition table (on normal computers, don't know about or what SAN). No need to
> reboot there at least.

There's 'blockdev --rereadpt' also, but neither of these work
on a mounted filesystem afaik.

-- 
~Randy

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

* Re: Rereading disk geometry without reboot
  2004-12-06 20:23 Rereading disk geometry without reboot Andy
  2004-12-07 11:41 ` Jan Engelhardt
@ 2004-12-07 16:37 ` Mark Haverkamp
  2004-12-09 15:45   ` Andy
  2004-12-07 17:28 ` Robin Holt
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Haverkamp @ 2004-12-07 16:37 UTC (permalink / raw)
  To: Andy; +Cc: linux-kernel

On Mon, 2004-12-06 at 14:23 -0600, Andy wrote:
> I am using linux kernel 2.6.9 on a san.  I have file systems on
> non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
> the XFS file system those disks.  What I would like to avoid rebooting or
> even unmounting the filesystem if possible.
> 
> Is there any way to get the kernel to re-read the disk geometry and change
> the information it holds without rebooting or reloading the module (which is
> as bad as a reboot in my case)?

You can re-scan a scsi device via sysfs.  You can, for example,

echo 1 > /sys/block/sdc/device/rescan

to rescan that device.

Mark.
 

> 
> Thanks,
> 
> Andy
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-- 
Mark Haverkamp <markh@osdl.org>


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

* Re: Rereading disk geometry without reboot
  2004-12-07 15:16   ` Randy.Dunlap
@ 2004-12-07 17:23     ` Jan Engelhardt
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Engelhardt @ 2004-12-07 17:23 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Andy, linux-kernel

>There's 'blockdev --rereadpt' also, but neither of these work
>on a mounted filesystem afaik.

Who said editing the ptab of something that's mounted is good?



Jan Engelhardt
-- 
ENOSPC

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

* Re: Rereading disk geometry without reboot
  2004-12-06 20:23 Rereading disk geometry without reboot Andy
  2004-12-07 11:41 ` Jan Engelhardt
  2004-12-07 16:37 ` Mark Haverkamp
@ 2004-12-07 17:28 ` Robin Holt
  2004-12-07 21:12   ` Miquel van Smoorenburg
  2 siblings, 1 reply; 8+ messages in thread
From: Robin Holt @ 2004-12-07 17:28 UTC (permalink / raw)
  To: Andy; +Cc: linux-kernel

On Mon, Dec 06, 2004 at 02:23:56PM -0600, Andy wrote:
> I am using linux kernel 2.6.9 on a san.  I have file systems on
> non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
> the XFS file system those disks.  What I would like to avoid rebooting or
> even unmounting the filesystem if possible.
> 
> Is there any way to get the kernel to re-read the disk geometry and change
> the information it holds without rebooting or reloading the module (which is
> as bad as a reboot in my case)?

Does anybody know if lvm can do this?

> 
> Thanks,
> 
> Andy
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: Rereading disk geometry without reboot
  2004-12-07 17:28 ` Robin Holt
@ 2004-12-07 21:12   ` Miquel van Smoorenburg
  0 siblings, 0 replies; 8+ messages in thread
From: Miquel van Smoorenburg @ 2004-12-07 21:12 UTC (permalink / raw)
  To: linux-kernel

In article <20041207172812.GD11423@lnx-holt.americas.sgi.com>,
Robin Holt  <holt@sgi.com> wrote:
>On Mon, Dec 06, 2004 at 02:23:56PM -0600, Andy wrote:
>> I am using linux kernel 2.6.9 on a san.  I have file systems on
>> non-partitioned disks.  I can resize the disk on the SAN, reboot and grow
>> the XFS file system those disks.  What I would like to avoid rebooting or
>> even unmounting the filesystem if possible.
>> 
>> Is there any way to get the kernel to re-read the disk geometry and change
>> the information it holds without rebooting or reloading the module (which is
>> as bad as a reboot in my case)?
>
>Does anybody know if lvm can do this?

Yes, with LVM and XFS you can grow a logical volume and resize XFS
to fit without taking the filesytem offline.

Mike.


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

* Re: Rereading disk geometry without reboot
  2004-12-07 16:37 ` Mark Haverkamp
@ 2004-12-09 15:45   ` Andy
  0 siblings, 0 replies; 8+ messages in thread
From: Andy @ 2004-12-09 15:45 UTC (permalink / raw)
  To: linux-kernel

On Tue, Dec 07, 2004 at 08:37:07AM -0800, Mark Haverkamp wrote:
> 
> You can re-scan a scsi device via sysfs.  You can, for example,
> 
> echo 1 > /sys/block/sdc/device/rescan
> 
> to rescan that device.
> 
Yes, and it reports the new size in dmesg, but when I try to grow the xfs
it doesn't grow.  It seems like some part of the kernel is not being told
about the new size of the drive. Any ideas?

Andy

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

end of thread, other threads:[~2004-12-09 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-06 20:23 Rereading disk geometry without reboot Andy
2004-12-07 11:41 ` Jan Engelhardt
2004-12-07 15:16   ` Randy.Dunlap
2004-12-07 17:23     ` Jan Engelhardt
2004-12-07 16:37 ` Mark Haverkamp
2004-12-09 15:45   ` Andy
2004-12-07 17:28 ` Robin Holt
2004-12-07 21:12   ` Miquel van Smoorenburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox