Hello everyone,
Currently, any change to a partition table of a busy drive is
practically delayed to the next reboot. Even things trivial as
changing the type of an unmounted partition do not work, if
another partition on that drive is mounted (or swapped to, etc.).
Is this really unavoidable? Of course, generally, this is
dangerous: E.g., deleting a logical partition (in a PC-BIOS
scheme) can change the numbers of other partitions. But the test
currently seems very conservative. I haven't yet looked too much
at the code, but I think a slightly less conservative test (that
will still not update in many situations, but will allow trivial
things like adding a primary partition), will not be too hard.
Is such a thing needed by others, or is it just me? Suppose I
write an initial patch, are there interested beta testers?
On a side note, about a year and a half ago, there was a thread
on lkml with the subject 'Partition IDs in the New World TM', in
which a 'parttab' file was mentioned. I grepped and STFWed a lot,
and could not find any relevant mention anywhere, besides this
thread. Is this parttab implemented? Documented? Perhaps under
a different name? Is this case it is quite hard to find
(google search for 'linux parttab' has 37 results, but for
e.g. 'linux partition table initrd' 11400 results).
Please CC me as I am not subscribed to lkml.
Thanks,
Didi
On Aug 27, 2002 00:52 +0300, Yedidyah Bar-David wrote:
> Currently, any change to a partition table of a busy drive is
> practically delayed to the next reboot. Even things trivial as
> changing the type of an unmounted partition do not work, if
> another partition on that drive is mounted (or swapped to, etc.).
>
> On a side note, about a year and a half ago, there was a thread
> on lkml with the subject 'Partition IDs in the New World TM', in
> which a 'parttab' file was mentioned. I grepped and STFWed a lot,
> and could not find any relevant mention anywhere, besides this
> thread. Is this parttab implemented? Documented? Perhaps under
> a different name? Is this case it is quite hard to find
> (google search for 'linux parttab' has 37 results, but for
> e.g. 'linux partition table initrd' 11400 results).
Please see partx (util-linux) and/or GNU parted for tools which can
change partitions on mounted disks. I believe the kernel has supported
this since 2.4.0, but not many tools do.
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
On Mon, Aug 26, 2002 at 04:02:38PM -0600, Andreas Dilger wrote:
> On Aug 27, 2002 00:52 +0300, Yedidyah Bar-David wrote:
> > Currently, any change to a partition table of a busy drive is
> > practically delayed to the next reboot. Even things trivial as
> > changing the type of an unmounted partition do not work, if
> > another partition on that drive is mounted (or swapped to, etc.).
> >
> > On a side note, about a year and a half ago, there was a thread
> > on lkml with the subject 'Partition IDs in the New World TM', in
> > which a 'parttab' file was mentioned. I grepped and STFWed a lot,
> > and could not find any relevant mention anywhere, besides this
> > thread. Is this parttab implemented? Documented? Perhaps under
> > a different name? Is this case it is quite hard to find
> > (google search for 'linux parttab' has 37 results, but for
> > e.g. 'linux partition table initrd' 11400 results).
>
> Please see partx (util-linux) and/or GNU parted for tools which can
> change partitions on mounted disks. I believe the kernel has supported
> this since 2.4.0, but not many tools do.
Thanks a lot! I am right off to adding a small note on my home
page for google searches to find. Tools help, but information
even more.
I tried partx and it works just fine. parted will probably be even
better, but is a bit more complicated (or so it seems).
>
> Cheers, Andreas
> --
> Andreas Dilger
> http://www-mddsp.enel.ucalgary.ca/People/adilger/
> http://sourceforge.net/projects/ext2resize/
Again, Thanks!
Didi
On Tue, Aug 27, 2002 at 12:52:54AM +0300, Yedidyah Bar-David wrote:
> Currently, any change to a partition table of a busy drive is
> practically delayed to the next reboot. Even things trivial as
> changing the type of an unmounted partition do not work, if
> another partition on that drive is mounted (or swapped to, etc.).
The type of a partition has no significance to the kernel.
So how can you say that changing the type doesnt work?
There are ioctls to tell a running kernel where you would like
to see partitions, entirely independent of the current disk contents.
Andries