Date: Sat, 27 Oct 2012 15:10:21 -0700 From: freebsd@johnea.net To: freebsd-questions@freebsd.org Subject: Re: 9.1 and gmirror with GPT? Message-ID: <508C5BE6.4000405@johnea.net> In-Reply-To: <alpine.BSF.2.00.1210271530190.69926@wonkity.com> References: <5082EAEE.4040609@johnea.net> <50833F78.1060609@bnrlabs.com> <alpine.BSF.2.00.1210210827530.70277@wonkity.com> <5085C743.8000508@johnea.net> <alpine.BSF.2.00.1210221631250.13158@wonkity.com> <5086C7EB.9020104@johnea.net> <alpine.BSF.2.00.1210231837130.21493@wonkity.com> <508C2043.8070205@johnea.net> <alpine.BSF.2.00.1210271530190.69926@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-10-27 14:41, Warren Block wrote: > On Sat, 27 Oct 2012, freebsd@johnea.net wrote: > >> On 2012-10-23 17:46, Warren Block wrote: >>> On Tue, 23 Oct 2012, freebsd@johnea.net wrote: >> orsbackup# gpart add -t freebsd -a 4k mirror/gm0 >> mirror/gm0s1 added, but partition is not aligned on 4096 bytes > > This is new to me, I have not seen it before. I had the impression that gpart put the bsdlabel partition table at a misaligned offset so that the actual filesystems in those partitions would land on an aligned block, but it never gave that message. That comes from sys/geom/part/g_part.c, function g_part_ctl_add which starts at line 645: > > 743 /* Provide feedback if so requested. */ > 744 if (gpp->gpp_parms & G_PART_PARM_OUTPUT) { > 745 sb = sbuf_new_auto(); > 746 G_PART_FULLNAME(table, entry, sb, gp->name); > 747 if (pp->stripesize > 0 && entry->gpe_pp->stripeoffset != 0) > 748 sbuf_printf(sb, " added, but partition is not " > 749 "aligned on %u bytes\n", pp->stripesize); > 750 else > 751 sbuf_cat(sb, " added\n"); > 752 sbuf_finish(sb); > 753 gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); > 754 sbuf_delete(sb); > 755 } > 756 return (0); > Thanks Warren! I ended up just ignoring the not aligned warning from the "gpart add -t freebsd" and went on to add the freebsd-swap and freebsd-ufs partitions with "-a 4k" option. Do you think I'm aligned? Thanks! johnea orsbackup# gpart create -s BSD mirror/gm0s1 mirror/gm0s1 created orsbackup# gpart add -t freebsd-swap -a 4k -s 8g mirror/gm0s1 mirror/gm0s1a added orsbackup# gpart add -t freebsd-ufs -a 4k mirror/gm0s1 mirror/gm0s1b added orsbackup# gpart bootcode -b /boot/mbr mirror/gm0 bootcode written to mirror/gm0 orsbackup# gpart set -a active -i 1 mirror/gm0 active set on mirror/gm0s1 orsbackup# gpart bootcode -b /boot/boot mirror/gm0s1 bootcode written to mirror/gm0s1 orsbackup# orsbackup# gpart show => 63 3907029105 ada0 MBR (1.8T) 63 63 - free - (31k) 126 3906994077 1 freebsd [active] (1.8T) 3906994203 34965 - free - (17M) => 0 3906994077 ada0s1 BSD (1.8T) 0 3890216960 1 freebsd-ufs (1.8T) 3890216960 16777116 2 freebsd-swap (8G) 3906994076 1 - free - (512B) => 63 3907029104 mirror/gm0 MBR (1.8T) 63 63 - free - (31k) 126 3907028979 1 freebsd (1.8T) 3907029105 62 - free - (31k) => 0 3907028979 mirror/gm0s1 BSD (1.8T) 0 2 - free - (1.0k) 2 16777216 1 freebsd-swap (8.0G) 16777218 3890251760 2 freebsd-ufs (1.8T) 3907028978 1 - free - (512B)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?508C5BE6.4000405>