Re: when is label info commited to disk?

Andries.Brouwer@cwi.nl
Sun, 13 Jul 1997 22:04:43 +0200


Marty Leisner:

: I think all the fdisk programs will fail when we start creating
: multiple extended partitions on one disk (is there a limit?)

My sfdisk will allow you to create multiple chains.

There are limitations due to the fact that one only has 4 primary
partitions. Then there are limitations caused by the size of a minor
device number. The former are probably set in concrete; the latter
may go away.

: If we have an extended dos and extended linux partition (assuming we
: already created it), how do we tell our *fdisk program which slice to
: add the parititon to?

It sounds as if you want to write a HOWTO but do not understand
the details. If you are indeed writing a HOWTO, do not even
mention the possibility of two chains of extended partitions.
Everybody who tries to use such a setup will be sorry.
Linux is very liberal in what it accepts, and sfdisk is willing
to create weird partition tables, but there is no reason to
confuse W95 or WNT or Partition Magic.
A newbie should probably only use (the latest version of) cfdisk.

:: : If I make hda2/hda3 extended linux partitions, the kernel counting
:: : mechanism will screw up /dev/hda4
::
:: Screw up in what way? What is your complaint?

: If /dev/hda5 sits in /dev/hda4 now, and then I add extended partitions
: to /dev/hda3, what used to be /dev/hda5 may be /dev/hda7.

True.

: I think the following would work much better:
: /dev/hd*1 extended partitions would be in /dev/hd*10-19

Yecch.

A reasonable idea, and in fact very easy to implement,
might be to have "mount -label newsdisk /usr/spool/news -o noatime"
where the kernel keeps a (very short) list of disklabels,
constructed at boot time. Of course the mount author then has to
decide under what conditions it will allow a user to do this.

And then, putting this into the kernel is the lazy solution.
A user space version, with a file "/etc/disklabels" created
by some program called from /etc/rc, would work as well.

:: Do you know what you are doing when you create two chains of
:: extended partitions? Sometimes that is the only solution,
:: but usually it is just a very bad idea.
::
: Actually, if you have a large disk, and create 2 extended partitions chains
: (lets say, each holding several gig) I don't see it as a bad idea.

Trust me. It *is* a bad idea.

Andries