From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RBAnz-0001xC-0m for garchives@archives.gentoo.org; Tue, 04 Oct 2011 19:37:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C40821C290; Tue, 4 Oct 2011 19:37:22 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 5AF8921C063 for ; Tue, 4 Oct 2011 19:36:27 +0000 (UTC) Received: by wyf19 with SMTP id 19so1139454wyf.40 for ; Tue, 04 Oct 2011 12:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=p1MH7AwCPyjNYinDa8FL28mB49ajvmKPImFfcvHFe6A=; b=lEHXJLovBwWXtC5bf+zKyyG+DGUV/5pcKoxv/E+KlkY1V7wDzSjdNbBIYSJHYKOZTW 8+OAkSAeFAn3o0jazAldM6oC+I9WhjJBMwFsLnrmP0tr7jOaAUV1fRoCkB9BbKacdego vIp4Bcv/xQIe+LH3SFXisikSZPrc8tizbDubw= Received: by 10.227.36.212 with SMTP id u20mr1910681wbd.69.1317756986525; Tue, 04 Oct 2011 12:36:26 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: paul.hartman@gmail.com Received: by 10.227.59.193 with HTTP; Tue, 4 Oct 2011 12:36:06 -0700 (PDT) In-Reply-To: <201110041939.30850.michaelkintzios@gmail.com> References: <201110032316.11950.michaelkintzios@gmail.com> <201110040759.09558.michaelkintzios@gmail.com> <201110041939.30850.michaelkintzios@gmail.com> From: Paul Hartman Date: Tue, 4 Oct 2011 14:36:06 -0500 X-Google-Sender-Auth: UXHRpr9h2tcgUuK8eCc_hqMlwq0 Message-ID: Subject: Re: [gentoo-user] Strange partition on USB stick To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 14ef67066d2229489943596a9562347d On Tue, Oct 4, 2011 at 1:39 PM, Mick wrote: > On Tuesday 04 Oct 2011 17:18:18 Paul Hartman wrote: >> You can create a real partition table on that device and reformat, if >> you want. (Note that some flash-based devices suffer degraded >> performance if you repartition or reformat them because they come with >> specially-aligned FAT tables from the factory) > > Interesting! =A0I didn't know that. > > I have repartitioned USB sticks in the past, but did not notice any chang= e in > performance - to be honest I didn't measure it. =A0I assume then that if = I were > to re-partition for any reason I would need to stick to exactly the same = start > & finish shown by parted. > > Re-formatting it ought to be OK though, as long as the fat16 shown by par= ted > is correct. I think filesystems other than FAT are aligned well already, assuming your partitions are aligned, but with FAT there are some hoops you must jump through. There is a tool called flashbench that can test your drive (destructively!) and figure out the most optimal block sizes. Here's a great article about it and optimizing USB flash drives in general: https://lwn.net/Articles/428584/ And here is a forum thread about figuring out the FAT alignment: http://www.patriotmemory.com/forums/showthread.php?3696 The SD council makes a tool for MS Windows that optimally formats and securely erases SD cards. Might be interesting to compare the results of its format to a standard fdisk and mkfs.vfat in linux. One thing I'm going to do next time I get a new SD card or flash drive is take a snapshot of the boot sector/partition tables/FAT tables so if I ever want to reformat it to FAT, I can restore the -- presumably optimal -- factory layout.