Rescan harddisk size without rebooting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, 2005-11-12 at 22:28 -0600, Aleksandar Milivojevic wrote:
> If you do "fdisk /dev/sdb", does it show you correct (new) size?  Fdisk 
> should query device directly (and not relay on cached copy of partition 
> table in kernel).

On Sun, 2005-11-13 at 07:58 -0500, William L. Maltby wrote:
> A faster method is
>     sfdisk -l [/dev/xxxx]   # If no device specification, lists all
> and then
>     sfdisk -R /dev/xxx
> will load the disk parameters to the OS without reboot.

In both cases, assuming nothing on the disk is in use.  That's the
problem, you typically have to take down their PVs for LVM first.

> However, not being familiar with LVM, I don't know if this causes a
> problem or if you just then follow the other directions given by
> Aleksander.

LVM can rescan partitions.  The big problem here isn't LVM, it's the
fact that the kernel doesn't like to load low-level disk changes.

> I have also used this for automated configuration. But that was without
> LVM being involved.
-- 
Bryan J. Smith     b.j.smith@xxxxxxxx     http://thebs413.blogspot.com
----------------------------------------------------------------------
The best things in life are NOT free - which is why life is easiest if
you save all the bills until you can share them with the perfect woman


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux