Date: Thu, 22 Jan 2015 13:02:53 +0800 From: Jia-Shiun Li <jiashiun@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: Raspberry Pi stability improved Message-ID: <CAHNYxxPrNB842wmGc2jREZZZ2QoO=Rk7vJsPx3yYie4sgO0meA@mail.gmail.com> In-Reply-To: <DBE5557E-81E3-42E2-8F1F-A0865E9AC477@bsdimp.com> References: <DE1783C0-C19F-448D-92EF-A51826D7FE2B@freebsd.org> <B1DA56CBB1774BB4ACE66D69BB9A662F@ad.peach.ne.jp> <DB7CB7F1-79A7-4F0D-8C99-8A62AFC74D6A@freebsd.org> <DBE5557E-81E3-42E2-8F1F-A0865E9AC477@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 19, 2015 at 5:41 AM, Warner Losh <imp@bsdimp.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHNYxxPrNB842wmGc2jREZZZ2QoO=Rk7vJsPx3yYie4sgO0meA>