Date: Fri, 21 Sep 2007 13:37:36 +0200 From: "n j" <nino80@gmail.com> To: freebsd-geom@freebsd.org Subject: Re: Gmirror on a partition of a slice Message-ID: <92bcbda50709210437g590df3f9y94f32d3d4d5cd1f@mail.gmail.com> In-Reply-To: <20070913081748.GA1155@garage.freebsd.pl> References: <92bcbda50709120843o6af4bd38v8725be3f5b765b0e@mail.gmail.com> <20070913081748.GA1155@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
Pawel wrote: > > 6) fdisk -BI /dev/mirror/gm0 to create a slice in gm0 > Don't do this. > > 7) bsdlabel -w -B /dev/mirror/gm0s1 to create root partition > And this. > newfs /dev/mirror/gm0. Copy the data from da0s1a to /dev/mirror/gm0. > Modify /etc/fstab on da0s1a to mount root as /dev/mirror/gm0. Just wanted to say thanks. I don't know if the solution should have been obvious to me; perhaps it is to someone with more geom experience. For me, the two "skip this" instructions were an enlightenment. Anyway, here is what I learned, maybe the archives will help someone in the future. Put simply: a) if you are using whole disk as consumers, you can partition (fdisk) and label (bsdlabel) the resulting gmirror provider, b) if you are using slices as consumers, you should skip the partitioning and only label the partitions of the resulting gmirror provider, c) finally, if you are using partitions as consumers, you must skip both the partition and label steps and directly do a newfs on the resulting gmirror provider. The logic behind this is probably that if you already partition or label the underlying consumers, you must not do the same with the provided mirror, i.e. you can't really treat the provided mirror as an entirely fresh new disk. As I said, this is maybe obvious to someone, but for me it was new. For the record, here's my current setup using two 17G disks. I hope that mounting swap on a gstripe partition is not a Bad Thing. # df -h Filesystem Size Used Avail Capacity Mounted on /dev/mirror/gm0 989M 36M 874M 4% / devfs 1.0K 1.0K 0B 100% /dev /dev/stripe/st0s1a 29G 718M 26G 3% /big # swapinfo -h Device 1K-blocks Used Avail Capacity /dev/stripe/st0s1b 2097152 0B 2.0G 0% # gmirror status Name Status Components mirror/gm0 COMPLETE da0s1a da1s1a # gstripe status Name Status Components stripe/st0 UP da0s1d da1s1d Once again, Pawel, thanks for help (and for the geom system, of course). Regards, -- Nino
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?92bcbda50709210437g590df3f9y94f32d3d4d5cd1f>