1 |
Mick <michaelkintzios@×××××.com> wrote: |
2 |
|
3 |
> I was wondering similar questions regarding a 32G flash card I have. |
4 |
> Using fdisk to partition it the starting sector was automatically |
5 |
> aligned with 2048 as it fdisk has been improved to deal with 4KB |
6 |
> sector drives. |
7 |
> |
8 |
> However, formatting it with mkfs.vfat I was none the wise if I should |
9 |
> use the '-s sectors-per-cluster' option or what to set it at. |
10 |
|
11 |
For the SD Cards of my Android devices I use |
12 |
|
13 |
mkfs.vfat -F32 -s64 |
14 |
|
15 |
This always gave me good performance. |
16 |
|
17 |
> Furthermore, how can I read the current cluster size off the flash |
18 |
> card? Is this appropriate? |
19 |
> |
20 |
> blockdev --getbsz /dev/sdb |
21 |
> 4096 |
22 |
|
23 |
This gives you the physical blocksize of the device. |
24 |
|
25 |
If you wanna know the cluster size, that means the blocksize of your |
26 |
filesystem, you can use mtools. First configure /etc/mtools/mtools.conf |
27 |
and set a drive letter for your SD Card, e.g. |
28 |
|
29 |
drive c: file="/dev/sde1" |
30 |
|
31 |
then use |
32 |
|
33 |
minfo C: |
34 |
|
35 |
to query a lot of information about the filesystem. Beside some other infos |
36 |
you will get for example: |
37 |
|
38 |
sector size: 512 bytes |
39 |
cluster size: 8 sectors |
40 |
|
41 |
This means cluster size is 4096 Bytes. |
42 |
|
43 |
-- |
44 |
Regards |
45 |
wabe |