gpart add -a 4096 vs 4k

Olivier Smedts olivier at gid0.org
Wed Jun 13 10:18:16 UTC 2012


Hello,

2012/6/13 Irjohn Junus <i.junus at gmail.com>:
> Hello,
>
> Relatively new to FreeBSD and learning, I'm trying to partition my HDD and
> align it to 4k sector.
>
> I do apologize if this has been answered before, I have Googled and read
> gpart(8) man page to no joy. Can anyone please advice why gpart add '-a
> 4096' doesn't yield the same result with '-a 4k'? Many thanks and captures
> are below.
>
> Regards,
> Ronjns
>
>
>
> #gpart add -t freebsd-zfs -l hdd0 *-a 4096* da0
> da0p1 added
> # gpart show da0
> =>        34  3907029101  da0  GPT  (1.8T)
>          34        4062       - free -  (2M)
>        *4096  3907022848*    1  freebsd-zfs  (1.8T)
>  3907026944        2191       - free -  (1.1M)
>
>
>
> # gpart add -t freebsd-zfs -l hdd0 *-a 4k* da0
> da0p1 added
> # gpart show da0
> =>        34  3907029101  da0  GPT  (1.8T)
>          34           6       - free -  (3.0k)
>          *40  3907029088*    1  freebsd-zfs  (1.8T)
>  3907029128           7       - free -  (3.5k)

We're talking of sectors here, se "4096" does not mean 4 KB but 4096*512=2MB.

I think you should use "-a 8", because 4k sectors = 8*512B sectors.

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: olivier at gid0.org        - against HTML email & vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."


More information about the freebsd-fs mailing list