Raspberry Pi stability improved

Warner Losh imp at bsdimp.com
Thu Jan 22 05:34:01 UTC 2015


> On Jan 21, 2015, at 10:02 PM, Jia-Shiun Li <jiashiun at gmail.com> wrote:
> 
> On Mon, Jan 19, 2015 at 5:41 AM, Warner Losh <imp at 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’s what’s killing the autoresize. :( Sadly, I have no fix for this, but it is a problem I hit about 6-9 months
> ago… I talked about the problem then, but I can’t recall if it was on a public mailing list or just private
> email to part’s 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.

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’t been required for FAT partitions in about 25 maybe 30 years.

Warner
>  



More information about the freebsd-arm mailing list