Re: Possibly silly Q?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gene Heskett <gene.heskett@...>
Cc: <linux-kernel@...>
Date: Tuesday, January 15, 2008 - 1:01 pm

On Mon, Jan 14, 2008 at 02:34:00PM -0500, Gene Heskett wrote:

In my experience fdisk (whichever one you use) will ask the kernel to
reread the partition table on write.

The kernel refuses to reread the partition table on any disk where it
has anything mounted.  So if any part of the disk is in use then it
refuses to change anything about it's view of that disk.

So if you only have partitions mounted from sda and sdb then you can
repartition sdc and it will reload the partition table just fine.  If
any part of sdc is mounted or otherwise in use then you can't.

I have often wondered how hard it would be to change the kernel
behaviour so that it only refuses to reload the partition table if the
partitions that are in use on the disk are being changed, but let it
reload the partition table if only unused partitions are being changed.

For example:
sdc1 200MB mounted
sdc2 500MB not mounted
sdc3 300MB not mounted

Delete sdc2 and sdc3 and create a new sdc2 that is 800MB

Since sdc1 is not changed (no change in size or start and end locations
in partition table), then the kernel should let the partition table be
reloaded since there is no affect on the in use partition.

After all it seems the disk manager in windows is capable of this, so
perhaps linux ought to be as well.  It may not be relevant very often,
but it sure is annoying having to go through multiple reboots when doing
certain disk layout changes just because you are using and not changing
one partition on a disk.

--
Len Sorensen
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Possibly silly Q?, Gene Heskett, (Mon Jan 14, 3:34 pm)
Re: Possibly silly Q?, Lennart Sorensen, (Tue Jan 15, 1:01 pm)
Re: Possibly silly Q?, Dagfinn Ilmari , (Mon Jan 14, 3:53 pm)
Re: Possibly silly Q?, Robert P. J. Day, (Mon Jan 14, 4:53 pm)
Re: Possibly silly Q?, Jan Engelhardt, (Tue Jan 15, 12:43 pm)
Re: Possibly silly Q?, Anton Altaparmakov, (Mon Jan 14, 3:55 pm)
Re: Possibly silly Q?, Jan Engelhardt, (Mon Jan 14, 3:43 pm)
Re: Possibly silly Q?, Robert P. J. Day, (Mon Jan 14, 3:37 pm)
Re: Possibly silly Q?, Sven-Haegar Koch, (Mon Jan 14, 3:50 pm)