Re: [patch] NetBSD disklabel support for geom_bsd




Hello!

On Fri, 17 Mar 2006, Dag-Erling Sm?rgrav wrote:
2) (most important) NetBSD disklabel describes partitions not slice-relative
(like ours), but the whole device-relative. They have no slice devices, so
their disklabel actually duplicates functionality of device slice
table, and describes both NetBSD partitions and other slices as partitions.

I believe we already support that - we did it the same way ourselves
prior to GEOM, and geom_bsd should still have compat shims for old
labels.

I've never seen such a support in FreeBSD. There was pre-slice era, and
you can still create "dangerously dedicated" disk and use ad0a-ad0h instead
of ad0s1a-h. But NetBSD does something very different: it creates disklabel
at the start of the _slice_, but media offsets in the entries of this label are not slice-relative like ours, but absolute media offsets instead, and thus
can point _outside_ NetBSD slice! Their partitions can thus be aliases for
our slice devices.

Look at my HDD layout from the POV of FreeBSD and NetBSD (I'll show some parts sufficient to understand the idea), start and size are in disk sector units:

HDD area FreeBSD NetBSD Description in the
Start Size device device FreeBSD terms

0 312579695 ad0 wd0d Whole HDD
63 2088387 ad0s1 wd0e First slice (DOS)
147942585 81931500 ad0s3 wd0c Third slice (NetBSD)
147942585 2097648 ad0s3a wd0a Partition 'a' of the 3rd slice
150040233 2097648 ad0s3b wd0b Partition 'b' of the 3rd slice

Of course, you'll get ad0s3a,b only after applying my patch, otherwise they
aren't accessible from the FreeBSD.

I hope you'll see what they do:

1. NetBSD's 'c' partition describes NetBSD slice (always?).
2. NetBSD's 'd' partition describes the whole HDD (always?).
3. NetBSD's 'e' partition describes the 1st _slice_ of my partucular HDD.
4. NetBSD's 'a','b','f'... describe NetBSD partitions inside 3rd slice.

I've never seen such a layout on FreeBSD, and I would call it 'the
true hackery' ;)

Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail: dmitry@xxxxxxxxxxxxxx
nic-hdl: LYNX-RIPE
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [patch] NetBSD disklabel support for geom_bsd
    ... I've installed NetBSD 3.0 recently on the same HDD with FreeBSD-CURRENT ... and found that OSes just don't see each other's partitions. ... that it would be convenient for FreeBSD developers if FreeBSD were able ... They have no slice devices, ...
    (freebsd-current)
  • [patch] NetBSD disklabel support for geom_bsd
    ... I've installed NetBSD 3.0 recently on the same HDD with FreeBSD-CURRENT ... and found that OSes just don't see each other's partitions. ... that it would be convenient for FreeBSD developers if FreeBSD were able ... They have no slice devices, ...
    (freebsd-current)
  • How does FreeBSD access NetBSD, OpenBSD?
    ... I have FreeBSD, OpenBSD, and NetBSD on the same hard drive of my system. ... How can I mount the NetBSD or OpenBSD partitions from FreeBSD? ... Slice 4 - Extended slice composed of: ...
    (freebsd-questions)
  • SUMMARY: Mirroring Questions Part 1 & 2
    ... If you use two diffrent size hard drives to mirror you can reclaim the un-used space on the larger of the two drives, this seems to not be recommended because you will take a performance hit. ... If I mirror with drives of different sizes, root disk being the smallest and the mirror being the largest, will I suffer performance problems? ... Both disks have identical partions setup when looking thru the format command expect slice 2. ... If you have only a few partitions that could be considered actual boot ...
    (SunManagers)
  • Fwd: Re: cam.3: do not discourage use of cam_open_device
    ... parsing and ignoring slice and partition names ... It seems that this warning about ambiguity came from pre-devfs days when e.g. cd0 ... cam_open_devicecalls on slices, partitions, etc. ...
    (freebsd-current)