public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Paul Hartman <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Strange partition on USB stick
Date: Tue, 4 Oct 2011 14:36:06 -0500	[thread overview]
Message-ID: <CAEH5T2PK8h=dj+D9Av8mcsVD_E8XvYFokiYjjxVG3a+pfdV7+w@mail.gmail.com> (raw)
In-Reply-To: <201110041939.30850.michaelkintzios@gmail.com>

On Tue, Oct 4, 2011 at 1:39 PM, Mick <michaelkintzios@gmail.com> 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!  I didn't know that.
>
> I have repartitioned USB sticks in the past, but did not notice any change in
> performance - to be honest I didn't measure it.  I 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 parted
> 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.



  reply	other threads:[~2011-10-04 19:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 22:15 [gentoo-user] Strange partition on USB stick Mick
2011-10-04  3:39 ` Adam Carter
2011-10-04  5:18   ` Mick
2011-10-04  5:27     ` Paul Hartman
2011-10-04  6:53       ` Alan McKinnon
2011-10-04 15:57         ` Mick
2011-10-04  6:58       ` Mick
2011-10-04 16:18         ` Paul Hartman
2011-10-04 18:39           ` Mick
2011-10-04 19:36             ` Paul Hartman [this message]
2011-10-04 21:35               ` Mick
2011-10-07 22:09 ` Klaus Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEH5T2PK8h=dj+D9Av8mcsVD_E8XvYFokiYjjxVG3a+pfdV7+w@mail.gmail.com' \
    --to=paul.hartman+gentoo@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox