Re: devfs

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Fri, 16 Jan 1998 10:41:52 +0100


> What does *BSD/Intel have as it's naming scheme for partitions and for
> slices?

Terminology confusion alert: BSD calls 'slice' the thing in a DOS MBR,
whereas 'partition' means the structuring produced by their disklabel(8)
utitility. Partitions are traditionally named by letters. If /dev/wd0
is the first hard disk, the partitions would be wd0a, wd0b, wd0h, ...
wd0a is traditionally the root file system.

So on FreeBSD, if you have DOS style 'slices', you have wd0s1, wd0s2,
wd0s3, wd0s4 (primary), wd0s5 ... (logical drives in extended
'slice'). If, say, wd0s3 is substructured using disklabels, they
become wd0s3a, wd0s3b, ... For backwards compatibility, wd0a ==
wd0s3a.

This is kind of a mixed approach, since 'logical drives' are
considered as slices, even though they are a substructuring of a
'slice'. For Linux, I see three alternatives:
- continue to operate as you do now: the primary DOS partitions are
1 - 4, any subpartitioning scheme gets numbered starting from 5
- make it hierarchical. Any subpartitioning is a suffix to the partition
it lives in. Unfortunately, logical drives are implemented as
hierarchical nesting. So
hda5 == hda3p1 (if partition 3 is extended)
hda6 == hda3p2p1
hda7 == hda3p2p2p1
...
- use the block number of the first block as the partition name.
This would have the advantage of being constant even in case of
repartitioning.

Regards,
Martin