Re: understanding the output of: gpart list da0

From: Doug Hardie <bc979_at_lafn.org>
Date: Sat, 06 Apr 2024 08:47:56 UTC
> On Apr 5, 2024, at 23:52, Matthias Apitz <guru@unixarea.de> wrote:
> 
> 
> Hello,
> 
> I have here the output (a bit shorted and with added calculations)
> of 'gpart list da0':
> 
> 1. Name: da0p1
>   Mediasize: 524288 (512K)   512K = 512*1024 = 524288 = length
>   index:  1
>   start:  1953523712
>   end:    1953524735
>   length: 524288
> 
> 2. Name: da0p2
>   Mediasize: 274877906944 (256G)  256G = 256*1024*1024*1024 = 274877906944 = length
>   index:  2
>   start:  2048
>   end:    536872959
>   length: 274877906944
> 
> 3. Name: da0p3
>   Mediasize: 41943040 (40M)    40M = 40*1024*1024 = 41943040 = length
>   index:  3
>   start:  536872960
>   end:    536954879
>   length: 41943040
> 
> 4. Name: da0p4
>   Mediasize: 723177701376 (674G)  674G = 674*1024*1024*1024 = 723701989376 != length
>   index:  4
>   start:  541067264
>   end:    1953523711
>   length: 723177701376
> 
> 
> What I do not understand is:
> 
> 1) Why differs the 'length' of da0p4 from the real value for 674G?

723177701376 / 1024 / 1024 / 1024 = 673.51171875 which rounds up to 674 G.

> 2) All the values for 'start', 'end' and 'length' does not make any
> sense to me.

(end - start + 1) *512 = length

> 
> Can someone enlighten me a bit.

-- Doug