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/232901Log: 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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
