absolute vs. relative offsets in disklabel



Hi!

Recent `disklabel differences FreeBSD, DragonFly' thread gave me a
thought - why do we have absolute offsets in disklabel? AFAIK, on NetBSD
and OpenBSD, label is not necessarily located `near' filesystems stored
in it's partitions - and even disklabel utility shows absolute offsets
(with 'c' covering entire device). FreeBSD, however, seem to step far
away from that standart - 8 partitions instead of 16, label located in
the beginning of a partition, bsdlabel shows relative offsets. Now I
wonder if there are any reasons for offsets to be actually absolute?
There are many weighty arguments for relative offsets:
- No confusion (once I did try to dd slice from one place on disk to
another to copy it, and was very surprised when changes made on one
partition appeared on another as well)
- Ability to copy and move slices with simple dd(1).
- Ability to save whole disk images on slices and access subpartitions
without problems (for example when moving system to larger hdd or when
storing hdd images for emulation on partitions instead of filesystem,
avoiding overhead). This was as an argument for geom's recursive
labelling feature, but now I realize that it was not quite correct, as
because of absolute offsets it can't actually be used now.

So I want to hear opinions on the subject - is it worth implementing and
how easy or hard will it be to implement it and migrate. I've looked
through geom_label and bsdlabel code and found these quite easy to change.
I'm not sure about compatibility though - is it possible to introduce
some flag into label indicating that it uses relative offsets?

If the idea is welcomed, I am eager to work on it, as I would like this
change much.

--
Best regards,
Dmitry mailto:amdmi3@xxxxxxx
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [patch] NetBSD disklabel support for geom_bsd
    ... uses slice-relative offsets while NetBSD uses absolute offsets. ... I suppose that it should allow transferring slice image to "dangerously dedicated" media of the same size, and getting valid disklabel as a result. ... I've prepared disk slice for FreeBSD at colo, locally created the same HDD layout on my disk, locally installed FreeBSD-4.11, dd'ed slice contents to a file, transferred it to the colo, dd'ed it it that slice, switched active partition to this slice, rebooted the machine. ...
    (freebsd-current)
  • Re: absolute vs. relative offsets in disklabel
    ... label is not necessarily located `near' ... filesystems stored in it's partitions - and even disklabel utility ... shows absolute offsets. ...
    (freebsd-hackers)
  • Re: absolute vs. relative offsets in disklabel
    ... label is not necessarily located `near' ... filesystems stored in it's partitions - and even disklabel utility ... shows absolute offsets. ...
    (freebsd-hackers)
  • Re: [patch] NetBSD disklabel support for geom_bsd
    ... uses slice-relative offsets while NetBSD uses absolute offsets. ... or NetBSD partitions without modifying the label, requiring the moving tool ...
    (freebsd-current)