Date: Tue, 13 Mar 2012 09:19:56 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Josh Paetzel <jpaetzel@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kris Moore <kris@pcbsd.org> Subject: Re: svn commit: r232901 - head/usr.sbin/pc-sysinstall/backend Message-ID: <4F5EF51C.6080806@FreeBSD.org> In-Reply-To: <201203122141.q2CLfUu2088344@svn.freebsd.org> References: <201203122141.q2CLfUu2088344@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03/12/12 23:41, Josh Paetzel wrote: > Author: jpaetzel > Date: Mon Mar 12 21:41:29 2012 > New Revision: 232901 > URL: http://svn.freebsd.org/changeset/base/232901 > > Log: > Use gpart "-a" flag to 4k alignment. > > Submitted by: kris > Obtained from: PC-BSD > > Modified: > head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh > head/usr.sbin/pc-sysinstall/backend/functions-disk.sh > > Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh > ============================================================================== > --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:34:10 2012 (r232900) > +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:41:29 2012 (r232901) > @@ -314,7 +314,7 @@ setup_gpart_partitions() > if [ "$CURPART" = "2" ] ; then > # If this is GPT, make sure first partition is aligned to 4k > sleep 2 > - rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}" > + rc_halt "gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk}" > else > sleep 2 > rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" Just to note: if neither -b, nor -a is specified, gpart should now use stripe size/offset values provided by GEOM. So, for example, if partition is created on top of GEOM_STRIPE with 64K strip size, gpart would automatically align to that value. Forcing 4K alignment is a safety measure in case if device with 4K sectors wasn't detected as such, but it can be a pessimization for devices with stripes bigger then 4K. -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F5EF51C.6080806>