Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Strange partition on USB stick
Date: Tue, 04 Oct 2011 21:38:38
Message-Id: 201110042235.24506.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] Strange partition on USB stick by Paul Hartman
1 On Tuesday 04 Oct 2011 20:36:06 Paul Hartman wrote:
2 > On Tue, Oct 4, 2011 at 1:39 PM, Mick <michaelkintzios@×××××.com> wrote:
3 > > On Tuesday 04 Oct 2011 17:18:18 Paul Hartman wrote:
4 > >> You can create a real partition table on that device and reformat, if
5 > >> you want. (Note that some flash-based devices suffer degraded
6 > >> performance if you repartition or reformat them because they come with
7 > >> specially-aligned FAT tables from the factory)
8 > >
9 > > Interesting! I didn't know that.
10 > >
11 > > I have repartitioned USB sticks in the past, but did not notice any
12 > > change in performance - to be honest I didn't measure it. I assume then
13 > > that if I were to re-partition for any reason I would need to stick to
14 > > exactly the same start & finish shown by parted.
15 > >
16 > > Re-formatting it ought to be OK though, as long as the fat16 shown by
17 > > parted is correct.
18 >
19 > I think filesystems other than FAT are aligned well already, assuming
20 > your partitions are aligned, but with FAT there are some hoops you
21 > must jump through.
22 >
23 > There is a tool called flashbench that can test your drive
24 > (destructively!) and figure out the most optimal block sizes. Here's a
25 > great article about it and optimizing USB flash drives in general:
26 > https://lwn.net/Articles/428584/
27 >
28 > And here is a forum thread about figuring out the FAT alignment:
29 > http://www.patriotmemory.com/forums/showthread.php?3696
30 >
31 > The SD council makes a tool for MS Windows that optimally formats and
32 > securely erases SD cards. Might be interesting to compare the results
33 > of its format to a standard fdisk and mkfs.vfat in linux.
34 >
35 > One thing I'm going to do next time I get a new SD card or flash drive
36 > is take a snapshot of the boot sector/partition tables/FAT tables so
37 > if I ever want to reformat it to FAT, I can restore the -- presumably
38 > optimal -- factory layout.
39
40 Excellent find! I've got some studying to do.
41
42 Thanks for sharing. :-)
43 --
44 Regards,
45 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature