[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rereading a partition



On Mon, Dec 18, 2000 at 09:57:26PM +1100, Glenn McGrath wrote:
> Hi, ive been working on a simple fdisk like program, im stuck trying to
> workout how to get the program to reread the partition table.
> 
> In linux there is an ioctl defined as BLKRRPART which works, i found
> something similar called V_REMOUNT in /include/mach/machine/disk.h, the
> comment says it remounts a drive.
> 
> When i try and use V_REMOUNT perror reports that its not apropriate for
> the device, i cant remember the exact message now, but it was words to
> that effect.
> 
> Whats the correct was to get hurd to rescan the disk after the partition
> table has changed ?

At the moment, it is not the Hurd but rather Mach which manages partitions.
My understanding is that there is no way to force it to reread the
partition table -- only a reboot.  Even if this feature was added to Mach,
the storeios for that device would need to be restarted and this is, of
course, something that the kernel knows nothing about.

The Hurdish way to solve this problem is in userspace via a translator.
A server, let's call it `disk_part', would translate a harddrive based on
the partition table possibly creating a hierarchy as follows:

  /dev/hda   <-- disk_part
          /1 <-- store_io
	  /2 <-- store_io
	  ...

File servers would attach to the respective store_io.  When a program
attached to /dev/hda, it could ask to own the disk and the store_ios
would be shut down.  The program would then modify the partition table
and upon detach, the stores would be restarted (as would their
respective translators).

This is what I envision after some talks with Roland.  I have not yet
started working on this scheme; you are welcome to join me or take it
over.

-Neal

-- 
Neal H Walfield
University of Massachusetts at Lowell
neal@walfield.org or neal@cs.uml.edu

Attachment: pgp2jGDuSTiBo.pgp
Description: PGP signature


Reply to: