Re: [patch] NetBSD disklabel support for geom_bsd

From: Dmitry Pryanishnikov <dmitry_at_atlantis.dp.ua>
Date: Sat, 18 Mar 2006 16:59:13 +0200 (EET)
Hello!

On Fri, 17 Mar 2006, Jos Backus wrote:
>>  Well, as I wrote in my previuos letter, it's my mistake that FreeBSD
>> uses slice-relative offsets while NetBSD uses absolute offsets. Actually,
>> both systems use absolute offsets, and offset conversion isn't required
>> (but just accidently happens harmless).
>
> I thought they were relative too. So this means one cannot move either FreeBSD

  And when disklabel shows contents of label, it (or, maybe, geom_bsd nowadays)
auto-converts absolute media offsets to slice-relative. It was another source
of my confusion.

> or NetBSD partitions without modifying the label, requiring the moving tool
> (such as PM) having to understand the label format.  Seems like a downside to
> me.

  Yes, exactly, but it's not something that we can easily change: it seems
that all *BSD's do it in this way. RELENG_4 auto-converts offsets to 
slice-relative when you read label off the slice. I suppose that it should 
allow transferring slice image to "dangerously dedicated" (sliceless) media 
of the same size, and getting valid disklabel as a result. Nice idea, but in 
some situations it can hurt. Once I had to remotely replace Linux with 
FreeBSD on some co-location. I've prepared disk slice for FreeBSD at colo, 
locally created the same (as at colo) 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. Machine didn't come up! It was due to the label 
auto-conversion on fly: when I've dd'ed slice to a file on local FreeBSD 
system, absolute offsets were converted to relative. Of course, Linux at colo 
didn't change them back to absolute ;)

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry_at_atlantis.dp.ua
nic-hdl: LYNX-RIPE
Received on Sat Mar 18 2006 - 13:59:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:53 UTC