* Re: Partitioning problems on x86_64 (fwd)
[not found] ` <Pine.LNX.4.58.0508111905310.8504@ppg_penguin.kenmoffat.uklinux.net.suse.lists.linux.kernel>
@ 2005-08-12 11:59 ` Andi Kleen
0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2005-08-12 11:59 UTC (permalink / raw)
To: Ken Moffat; +Cc: linux-kernel
Ken Moffat <ken@kenmoffat.uklinux.net> writes:
> On Thu, 11 Aug 2005, Lennart Sorensen wrote:
>
> >
> > The kernel won't reread the partition table as long as ANY part of that
> > disk is mounted. Reboot (which of course unmounts everything) to reread
> > the partition table.
> >
>
> OK, I've noted that now, thanks for the clue.
Actually it's a fdisk misfeature. There are two kinds of ioctls for
partition table rereading. One that rereads everything and fails if
any partitions on the disk are mounted. And another kind that
adds/removes partitions explicitely. That works fine as long as you
don't touch the mounted partitions.
Unfortunately the only tool that seems to use the new kind is parted
but it has a nearly unusable awkward command line interface from hell,
so fdisk is preferable even with the reboot requirement.
Ideally someone would fix fdisk to use the new kind.
Or just use LVM, it deals with all that much better.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Partitioning problems on x86_64 (fwd)
2005-08-11 15:29 ` Lennart Sorensen
@ 2005-08-11 18:11 ` Ken Moffat
0 siblings, 0 replies; 4+ messages in thread
From: Ken Moffat @ 2005-08-11 18:11 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: linux-kernel
On Thu, 11 Aug 2005, Lennart Sorensen wrote:
>
> The kernel won't reread the partition table as long as ANY part of that
> disk is mounted. Reboot (which of course unmounts everything) to reread
> the partition table.
>
OK, I've noted that now, thanks for the clue.
>
> Just any reboot should have worked. Once you reboot it reads the
> updated partition table and THEN you can mkfs the new partitions. Until
> /proc/partitions matches what you see in fdisk, you really don't want to
> try access the partitions since it won't match on the next boot anyhow.
>
> Len Sorensen
>
It certainly _seemed_ that the kernel was telling me one thing and
fdisk -l another, even after a reboot. But because I hadn't appreciated
the importance of rebooting before accessing the new partitions, I
probably threw in some extra 'mkfs' commands to spice up the mix.
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Partitioning problems on x86_64 (fwd)
2005-08-11 2:32 Ken Moffat
@ 2005-08-11 15:29 ` Lennart Sorensen
2005-08-11 18:11 ` Ken Moffat
0 siblings, 1 reply; 4+ messages in thread
From: Lennart Sorensen @ 2005-08-11 15:29 UTC (permalink / raw)
To: Ken Moffat; +Cc: linux-kernel
On Thu, Aug 11, 2005 at 03:32:14AM +0100, Ken Moffat wrote:
> Apologies if these are known problems, but I don't recall seeing them
> mentioned recently.
>
> I'm running an athlon64 with 2.6.12.3, in the middle of rebuilding it
> to run 64-bit. The main drive used to be in an i686 machine for
> testing, and it got to a point where I wanted to repartition.
>
> Under a 64-bit kernel, every time I tried to rewrite the partition
> table in fdisk I got an error 16, device or resource busy, with a
> message that the new partition table would be used at the next boot.
> (Yes, I had umounted everything except '/' on hda5. ) Since making a
> filesystem on my new /dev/hda7 and mounting it showed the size of the
> old hda7 in 'df', I tried rebooting but the failure to rewrite the
> partition table continued.
The kernel won't reread the partition table as long as ANY part of that
disk is mounted. Reboot (which of course unmounts everything) to reread
the partition table.
> At one point, I thought I'd try the stronger magic of sfdisk, but that
> just reported some error in the number of bytes read, and decided it
> couldn't read the partition table.
>
> In the end I was able to repartition successfully by rebooting to a
> 2.6.12.1 i686 kernel. This box is destined to become my new home
> server, so running test kernels on it isn't something I'm keen to try,
> but I thought I'd better report this, and the successful workaround of
> using an i686 kernel, which will be a bit of a pain on pure64.
Just any reboot should have worked. Once you reboot it reads the
updated partition table and THEN you can mkfs the new partitions. Until
/proc/partitions matches what you see in fdisk, you really don't want to
try access the partitions since it won't match on the next boot anyhow.
Len Sorensen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Partitioning problems on x86_64 (fwd)
@ 2005-08-11 2:32 Ken Moffat
2005-08-11 15:29 ` Lennart Sorensen
0 siblings, 1 reply; 4+ messages in thread
From: Ken Moffat @ 2005-08-11 2:32 UTC (permalink / raw)
To: linux-kernel
Apologies if these are known problems, but I don't recall seeing them
mentioned recently.
I'm running an athlon64 with 2.6.12.3, in the middle of rebuilding it
to run 64-bit. The main drive used to be in an i686 machine for
testing, and it got to a point where I wanted to repartition.
Under a 64-bit kernel, every time I tried to rewrite the partition
table in fdisk I got an error 16, device or resource busy, with a
message that the new partition table would be used at the next boot.
(Yes, I had umounted everything except '/' on hda5. ) Since making a
filesystem on my new /dev/hda7 and mounting it showed the size of the
old hda7 in 'df', I tried rebooting but the failure to rewrite the
partition table continued.
At one point, I thought I'd try the stronger magic of sfdisk, but that
just reported some error in the number of bytes read, and decided it
couldn't read the partition table.
In the end I was able to repartition successfully by rebooting to a
2.6.12.1 i686 kernel. This box is destined to become my new home
server, so running test kernels on it isn't something I'm keen to try,
but I thought I'd better report this, and the successful workaround of
using an i686 kernel, which will be a bit of a pain on pure64.
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-12 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.58.0508110331360.3920@ppg_penguin.kenmoffat.uklinux.net.suse.lists.linux.kernel>
[not found] ` <20050811152948.GH31019@csclub.uwaterloo.ca.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.58.0508111905310.8504@ppg_penguin.kenmoffat.uklinux.net.suse.lists.linux.kernel>
2005-08-12 11:59 ` Partitioning problems on x86_64 (fwd) Andi Kleen
2005-08-11 2:32 Ken Moffat
2005-08-11 15:29 ` Lennart Sorensen
2005-08-11 18:11 ` Ken Moffat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome