From owner-freebsd-arm@FreeBSD.ORG Thu Jan 22 05:34:01 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 BDC01C55 for ; Thu, 22 Jan 2015 05:34:01 +0000 (UTC) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) (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 82AE7A97 for ; Thu, 22 Jan 2015 05:34:01 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id wp18so22991286obc.3 for ; Wed, 21 Jan 2015 21:34:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=lSMOAKA9WSw0JSYausmWvB/uMD1MwvBaJ1tpJugUHfw=; b=hr+PU7OrH8WTEVaCQ5jTRx/bl71id/eenMh4MI+JRl0C4bjZlBn1bvp067YS0xUc34 jpwZUN43KUTZfqmiiK8RCe0Vp6K3kJsE2qhWyJBgbstbzqX1/MsPCRK16/DNdM6YbMjy D/wr/pjTHkSxM/gIHZ36ZPpV9DAiTyBjTJ+P5ZxyF0E5pfdt20kZn5qEhao3++Vvs18M lsTOftABkeDW82h+ozD7LCh/3aSjhf7NVIJX7QieTlCnjk3NfSnpkvSDXkMHIxjX5wdw 6XlGYiOiFcdqHMO3zCriGeVl8AlVDeaodM2AmH2SjwKM9s3z0SbZu6VLO4MCaA6XiT5M fHvA== X-Gm-Message-State: ALoCoQnakUL0KOCY0fp9/n448OK9qOkHfltgkOyILMsiwQJ78XGCe4lxKu+swBVVIjnoverL/gwD X-Received: by 10.60.94.212 with SMTP id de20mr11946906oeb.47.1421904840339; Wed, 21 Jan 2015 21:34:00 -0800 (PST) Received: from [192.168.43.169] ([172.56.8.11]) by mx.google.com with ESMTPSA id f125sm4750879oic.29.2015.01.21.21.33.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 21:33:59 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: Raspberry Pi stability improved From: Warner Losh In-Reply-To: Date: Wed, 21 Jan 2015 22:33:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <54A211A3-3B38-4CD3-BE18-2579E1FB6EBE@bsdimp.com> References: To: Jia-Shiun Li X-Mailer: Apple Mail (2.1993) 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:34:01 -0000 > On Jan 21, 2015, at 10:02 PM, Jia-Shiun Li wrote: >=20 > On Mon, Jan 19, 2015 at 5:41 AM, Warner Losh wrote: >=20 > If you reside with gpart, you may hit a frustratingly stupid gpart = bug. >=20 > 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... >=20 > 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. >=20 >=20 > 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. Aligning to 1M is easy and likely catches most of the cases we care = about. However, there is no way to know the final values in crochet. > 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. gpart can choose to do this rounding or not. CHS alignment hasn=E2=80=99t = been required for FAT partitions in about 25 maybe 30 years. Warner > =20