All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: Andries Brouwer <aebr@win.tue.nl>
Cc: Remi Colinet <remi.colinet@free.fr>, linux-kernel@vger.kernel.org
Subject: Re: Questions : disk partition re-reading
Date: Tue, 20 Apr 2004 16:36:35 +0200	[thread overview]
Message-ID: <20040420143634.GA12132@bitwizard.nl> (raw)
In-Reply-To: <20040420074650.GA3040@pclin040.win.tue.nl>

On Tue, Apr 20, 2004 at 09:46:50AM +0200, Andries Brouwer wrote:
> You must distinguish the on-disk partition table and the kernel
> partition table. You can change the on-disk partition table just by
> writing to it, but that does not change the kernel's ideas.
> You can change the kernel partition table using the right ioctls
> but that does not change the bits on disk.
> 
> Usually one does
> 	blockdev --rereadpt /dev/something
> after changing media, or after writing to the partition table,
> but that will fail if the disk is busy.

Which reminds me: Too bad the kernel says "Busy" without really
thinking aboutit. 

Assume that I have a 
	<hda1> swap 1G    (*)
	<hda2> root 19G   (active)
        <free space> 

disk, and want to add an extra partition. Maybe I have a 20G image
which I want to copy onto 20, 40, 60, 80, 120 and 200Gb disks. I can
then add the third partition as a /data or a /tmp partition. However
as the active root is on that disk I have to reboot. But in fact I
don't intend to change the active partition. 

So, there should be objections if I want the new partitioning scheme
to be: 

	<hda1> swap 1.5G 
	<hda2> root 19G   (active)
        <free space> 

then there is a problem and I can understand "Busy".  But if the new
scheme is: 

	<hda1> swap 1G  
	<hda2> root 19G   (active)
        <hda3> data 20G   <unformatted>

then I don't understand the reason for refusing the rereadpt request.

Anybody want to code this up?


	Roger. 


(*) usually active as well, but easily deactivated. So lets pretend
it's inactive for this discussion. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
**** "Linux is like a wigwam -  no windows, no gates, apache inside!" ****

  reply	other threads:[~2004-04-20 14:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18 13:24 Questions : disk partition re-reading Remi Colinet
     [not found] ` <200404181707.10467.christian.kroener@tu-harburg.de>
2004-04-18 14:40   ` Remi Colinet
2004-04-18 17:58 ` DervishD
2004-04-19  3:49 ` Jakob Oestergaard
2004-04-19 11:39 ` Erik Mouw
2004-04-19 22:37 ` Rob Couto
2004-04-20  7:46 ` Andries Brouwer
2004-04-20 14:36   ` Rogier Wolff [this message]
2004-04-25 22:15     ` Andries Brouwer
2004-04-26  8:31       ` Wichert Akkerman
2004-04-26 15:21         ` Bill Davidsen
2004-04-29  0:26           ` Andries Brouwer
2004-04-29  0:15         ` Andries Brouwer
2004-04-29  8:04           ` Wichert Akkerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040420143634.GA12132@bitwizard.nl \
    --to=r.e.wolff@bitwizard.nl \
    --cc=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=remi.colinet@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.