gpart(8) not honoring sector sizes correctly?

View: New views
2 Messages — Rating Filter:   Alert me  

gpart(8) not honoring sector sizes correctly?

by Geoff Fritz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just recently started using gpart, and I ran into what I think might
be a bug.  I'm using FreeBSD/amd64 8.0-BETA4

I have a geli provider with a 4096 sector size.  When I issued a
"gpart add -s 1g -t freebsd_ufs ad0.eli" on this device, it appears
the command assumes a 512-byte sector size, resulting in a partition
that is 8G in size.  The bsdlabel command handles this correctly, so I
assumed that gpart should.

Is this a bug?

I only began messing with gpart after reading that it's related (I
think) to getting the new bsdlabel in FreeBSD 8.0 to utilize 26
partitions (instead of the normal 8).  Is there any documentation on
how to do this?

Thanks.

-- Geoff Fritz
_______________________________________________
freebsd-geom@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscribe@..."

Re: gpart(8) not honoring sector sizes correctly?

by Marcel Moolenaar-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Sep 13, 2009, at 11:31 AM, Geoff Fritz wrote:

> I just recently started using gpart, and I ran into what I think might
> be a bug.  I'm using FreeBSD/amd64 8.0-BETA4
>
> I have a geli provider with a 4096 sector size.  When I issued a
> "gpart add -s 1g -t freebsd_ufs ad0.eli" on this device, it appears
> the command assumes a 512-byte sector size, resulting in a partition
> that is 8G in size.  The bsdlabel command handles this correctly, so I
> assumed that gpart should.
>
> Is this a bug?

It's a known limitation. The sector size is not known when
parsing the arguments, so it's assumed to be standard. Just
specify the size in sectors when the sector size is known
not to be 512-bytes.

> I only began messing with gpart after reading that it's related (I
> think) to getting the new bsdlabel in FreeBSD 8.0 to utilize 26
> partitions (instead of the normal 8).  Is there any documentation on
> how to do this?

Create the BSD disklabel as follows:

        gpart create -s bsd -n 26 <disk>

FYI,

--
Marcel Moolenaar
xcllnt@...



_______________________________________________
freebsd-geom@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscribe@..."