Date: Wed, 13 Jun 2012 19:02:31 +0800 From: Irjohn Junus <i.junus@gmail.com> To: Olivier Smedts <olivier@gid0.org> Cc: freebsd-fs@freebsd.org Subject: Re: gpart add -a 4096 vs 4k Message-ID: <CALXkR%2B805%2BBguO9ZTjxiJky-HkOwwDV7SqzyCRDCXJ=hNZA%2BXg@mail.gmail.com> In-Reply-To: <CABzXLYNZPO90fA41HGcJ-D-thE7KT586S5k7eo41GxLXBrWuCQ@mail.gmail.com> References: <CALXkR%2B879QJPNisOKA71yej9m1%2BUiz4cNopkoM42irmRoaBL-g@mail.gmail.com> <CABzXLYNZPO90fA41HGcJ-D-thE7KT586S5k7eo41GxLXBrWuCQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Olivier,
Thanks for your quick reply and you're right, '4k' = '8'!
# gpart add -t freebsd-zfs -l hdd0 -a 8 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)
Thanks,
Ronjns
On Wed, Jun 13, 2012 at 6:18 PM, Olivier Smedts <olivier@gid0.org> wrote:
> Hello,
>
> 2012/6/13 Irjohn Junus <i.junus@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@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."
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALXkR%2B805%2BBguO9ZTjxiJky-HkOwwDV7SqzyCRDCXJ=hNZA%2BXg>
