misc/146277: gpart add -s 128M creates 1GB partition on 4k sectorsize disk

Andrey V. Elsukov bu7cher at yandex.ru
Tue May 4 05:20:04 UTC 2010


The following reply was made to PR misc/146277; it has been noted by GNATS.

From: "Andrey V. Elsukov" <bu7cher at yandex.ru>
To: Jeremy Faulkner <gldisater at gmail.com>
Cc: freebsd-gnats-submit at FreeBSD.org, 
 Marcel Moolenaar <marcel at FreeBSD.org>
Subject: Re: misc/146277: gpart add -s 128M creates 1GB partition on 4k	sectorsize
 disk
Date: Tue, 04 May 2010 08:59:13 +0400

 On 04.05.2010 4:24, Jeremy Faulkner wrote:
 >> Description:
 > When using gpart to create a GPT partition on a device that has a sector size of 4k it will
 > create a partition that is much larger than requested. It appears to be using 512 sector size to
 > calculate the number of sectors to allocate even when the sector size is not 512.
 >> How-To-Repeat:
 > gnop create -S 4k<disk or partition> gpart create -s GPT<gnop'd disk or partition> gpart add -s
 > 512M -t freebsd-swap<gnop'd disk or partition>
 >
 > gpart will create a 4GB partition instead of a 512M partition
 
 This is known issue. When gpart(8) parses arguments it doesn't know about medium's sector size.
 
 -- 
 WBR, Andrey V. Elsukov


More information about the freebsd-bugs mailing list