[PLUG] hey, you really _should_ reboot after repartitioning!

Daniel Hedlund daniel at digitree.org
Fri Jan 2 04:22:01 UTC 2004


On Thu, 2004-01-01 at 04:59, Russell Senior wrote:

> Hmm.  I am guessing here that it isn't that it can't _read_ the data,
> it's that it can't update the kernel data structure because it is in
> use when a partition is mounted.  See blkdev_reread_part() in the kernel's
> drivers/block/ioctl.c.  Not quite sure what bd_sem is protecting, but
> it seems likely to be involved.

You are probably correct on this matter.  I can read the partition
information, but the kernel won't let the system update the cached/older
partition information, because it could result in possible corruption. 
Running fdisk on a mounted hard disk results in the following:
...
WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
...

The scenarios I described before should still be mostly true as to when
you need to reboot the system when repartitioning.

Cheers,

Daniel

-- 
Daniel Hedlund
Chief Consultant
daniel at digitree.org
DigiTree Studios Pty Ltd.





More information about the PLUG mailing list