From owner-freebsd-arm@FreeBSD.ORG Thu Jan 22 05:03:24 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1BB439E; Thu, 22 Jan 2015 05:03:24 +0000 (UTC) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 724AE7B6; Thu, 22 Jan 2015 05:03:24 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id wp18so22906414obc.3; Wed, 21 Jan 2015 21:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=E9QcMN1PCi2afNt0IRWDaKrPdmOm23gtkca6CDlOT7Y=; b=pqq8jTMDtIvRAIeF1kh7506OUASFOg8Ho+LW5aAIJiYd0stKrrIEvjb5CzhO+DMR0C g8hxHJalz4+XhOZc60KPYcdRD0QCstAg4gUoPbUC7wkWntOCUi5pl7g5899NdXZuTezX xwL4KXPNplPWMFgigIoyQogGjMZ0bCq41Nq3EpcUsjwmJCh4NvZcSfr9shoWhjd8BhnG /iljufS1YLIB8finF0HGTJii9aqADaeg6SrevP9rNSvBqHoQvEkKo1zOslEVXenmRy5W oTSck2ggs9jhVeUfY4v2ysSZmhA3a63VT5OmlArDdWBHaA9C7m8RBh6D7R9C9Qh7ClID hF+Q== X-Received: by 10.182.165.9 with SMTP id yu9mr26793175obb.34.1421903003823; Wed, 21 Jan 2015 21:03:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.29.41 with HTTP; Wed, 21 Jan 2015 21:02:53 -0800 (PST) In-Reply-To: References: From: Jia-Shiun Li Date: Thu, 22 Jan 2015 13:02:53 +0800 Message-ID: Subject: Re: Raspberry Pi stability improved To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 05:03:24 -0000 On Mon, Jan 19, 2015 at 5:41 AM, Warner Losh wrote: > > If you reside with gpart, you may hit a frustratingly stupid gpart bug. > > We tell a lie about the CHS of the SD cards. This lie works its way into > the alignment of the partitions. > The md and da devices also lie about the CHS of SD cards. They tell > different lies (and often times > different USB adapters tell different lies) so that screws up gpart. It > assumes that the CHS is The Truth > and The One True Way to create partitions is to have them cylinder group > sized and aligned, even when > resizing an existing partition. However, since the CHS is a lie, and > nobody can get their story straight, > gpart expresses its displeasure by starting the partition at a new > location, effectively killing your > filesystem which now starts at the wrong place on the disk... > > That=E2=80=99s what=E2=80=99s killing the autoresize. :( Sadly, I have no= fix for this, > but it is a problem I hit about 6-9 months > ago=E2=80=A6 I talked about the problem then, but I can=E2=80=99t recall = if it was on a > public mailing list or just private > email to part=E2=80=99s author. > > for md, is it sufficient to give -x -y arguments when creating md images and partitioning on them? Not sure about official release and snapshot images, but crochet-build just give -x 63 -y 255 unconditionally. Aligning to a more modern value, say 4K or 1M, should be reasonable. Better if matched that on physical devices to be written to later. as for CHS, is it still relevant beyond FAT family partitions, after 20 years of LBA? If not probably CHS alignment should only be followed when handling FAT partitions. I understand gpart wants to keep it generalized but in reality FAT/CHS is becoming more and more a specific case comparing with others. -Jia-Shiun.