Date: Sat, 14 Jan 2006 13:19:02 -0800 From: Brent Hostetler <brenthostetler@gmail.com> To: freebsd-geom@freebsd.org Subject: Metadata info. Message-ID: <aadbc3580601141319m79e59c1en67e2d1de119fadba@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I am trying to understand how metadata works properly within the geom framework. I have been having varying problems which I believe are metadata related. I assume from the following quote from gmirro man page that metadata is stored on the last sector of the provider -- ie /dev/ad4, /dev/ad4s1, /dev/stripe1, or /dev/stripe1a -- and not necessarily the last sector of the disk. <quote> The gmirror utility uses on-disk metadata (stored in the provider's last sector) to store all needed information. Since the last sector is used for this purpose,it is possible to place a root file system on a mirror.</quote> Because of this I notice that when setting up a mirror of a slice you will get error from bsdlabel /dev/ad4 saying bsdlabel: partition c doesn't cover the whole unit!... If you bsdlabel the actual /dev/mirror/data1 it will not issue the warning. The is correct behavior right? So if you are mirroring /dev/ad4 then you would make sure that the last slice that is created is one sector smaller then the media size in sectors such as example 1. Example 1: gmirror label -v -n -b round-robin data1 /dev/ad4 [------ ad4 ------] [-----ad4s1------]* [ad4s1a][-ad4s1d-]* or [----------ad4------------] [-----ad4s1----][--ad4s2-]* [ad4s1a][ad4s1b][-ad4s2a-]* If you are operating on slices then you would make sure the last partition in the mirrored slice would be one sector smaller then the slice size in sectors such as example 2 and 3. Example 2: gmirror label -v -n -b round-robin data1 /dev/ad4s1 [----------- ad4 --------------] [----ad4s1-----]*[---ad4s2-----] [ad4s1d][ad4s1e]*[---ad4s2a----] Example 3: gmirror label -v -n -b round-robin data1 /dev/ad4s1 gmirror label -v -n -b round-robin data2 /dev/ad4s2 [----------- ad4 --------------] [----ad4s1-----]*[---ad4s2----]* [ad4s1d][ad4s1e]*[---ad4s2a---]* If operating on geom's class providers it works the same way correct? Example 4: gmirror label -v -n -b round-robin data1 /dev/stripe/stripe1 [------------stripe1-----------] [------stripe1s1--------------]* [------stripe1s1a-------------]* Thanks.. Brent.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aadbc3580601141319m79e59c1en67e2d1de119fadba>