gmirror on existing filesystem (was Fresh install on gmirror'ed disks?)

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Apr 7 10:11:14 UTC 2006


On Thu, Apr 06, 2006 at 09:33:31AM -0400, Mike Jakubik wrote:
+> Pawel Jakub Dawidek wrote:
+> >One can still see how many sectors exactly has the partition he is going
+> >to create file system on and add additional newfs(8) flag
+> >'-s <sectors-1>'.
+> >  
+> 
+> "gmirror utility uses on-disk metadata (stored in the provider's last sector) to store all needed information."
+> 
+> Would creating a freebsd partition thats slightly smaller than the disk resolve the issue (when mirroring the entire disk)? or does it still use the last sector of the 
+> label? I'm not sure what one means by "provider" in this case.

"provider" in this case is what you use to create mirror on.
If you do it by:

	# gmirror label foo ad0 ad2

Then disks ad0 and ad2 are providers where gmirror puts metadata in
their last sector.

In most cases, you create slices and then partitions. If you configure a
mirror on partitions, eg.

	# gmirror label foo ad0s1a ad2s1a

then you need to create file system one sector smaller with newfs(8)
when you do it on adXs1a.

When you configure a mirror on slices, eg.

	# gmirror label foo ad0s1 ad2s1

then your last partition created on adXs1 must end up before the slice
end (its offset+size should be one sector smaller than the size of the
slice).

When you configure a mirror on disks, eg.

	# gmirror label foo ad0 ad2

then your last slice created on adXs1 have to end up before the disk end
(just like in the previous case).

In most cases, last slice ends before the disk end, leaving plenty of
space at the end, so you should be safe here.
In other cases the whole space is allocated (not sure if really used).

In any case, system may complain if information about the original
provider size is stored somewhere, ie. partitions were created on one
sector bigger slice than gmirror provider, so 'c' partition will be one
sector too large.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060407/4870b48c/attachment-0001.pgp


More information about the freebsd-stable mailing list