In message <[EMAIL PROTECTED]>, Ulrich Spoerlein writes:

>Hi all,
>
>I just fiddled around with using GBDE for ISO images (it works) and
>stumbled across the need to "guess" the size required for the GBDE
>container.
>
>Looks like the size is not increasing linearly. Here are the numbers of
>512 byte blocks available in md0 and md0.bde
>  md0 | md0.bde | diff.
> 2048    1952       96
> 4096    3936      160
> 8192    7936      256
>16384   15872      512
>32768   31744     1024
>65536   63520     2016
>
>So, what's the correct formula?

First off, if you want to use gbde on a CDROM you should use a sectorsize
of 2048 througout (-S 2048 argument to mdconfig).

The amount of metadata in GBDE is pretty straight forward:

1.      If do not use off-line keyfiles:  deduct one sector.

2.      Deduct the key sectors (1 to 4)

3.      Find zone size:

                nsect = sectorsize / 16
                nzone = nsect + 1

4.      Find number of zones:

                z = remaining_sectors / nzone

5.      Find usable size:

                size = z * nsect

6.      Find overhead/metadata as:

                total_sectors - size

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to