[afnog] FreeBSD mirroring
Phil Regnauld
regnauld at x0.dk
Fri Apr 28 10:59:51 EAT 2006
On Fri, Apr 28, 2006 at 08:34:07AM +0100, Brian Candler wrote:
>
> Are there some unwritten assumptions here? e.g.
>
> (1) that the last block of the original device does not contain any
> important data; and
> (2) that the filesystem will never need to write to the last block of the
> device, after it has been shrunk by one block?
>
> In other words, how can you be sure that this procedure is safe?
I don't, I assume gmirror, which has been used in production for
almost two years now, does the right thing.
I haven't met any disks yet where the exact disk size, minus
the label offset, exactly matches a multiple of 512 bytes.
For example, the slice I create (s1) on my workstation disk:
DISK Geometry: 10011 cyls/255 heads/63 sectors = 160826715 sectors (78528MB)
Offset Size(ST) End Name PType Desc Subtype Flags
0 63 62 - 12 unused 0
63 160826652 160826714 ad4s1 8 freebsd 165
160826715 9765 160836479 - 12 unused 0
Notice the "unused" space at the end, of 9765 sectors.
If in doubt, create you disks with -1 MB at the end.
Phil
More information about the afnog
mailing list