GNU bug report logs -
#41698
[parted ISSUE] using cyl to align partitions fails
Previous Next
To reply to this bug, email your comments to 41698 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#41698
; Package
parted
.
(Thu, 04 Jun 2020 01:31:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Zhiqiang Liu <liuzhiqiang26 <at> huawei.com>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Thu, 04 Jun 2020 01:31:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
friendly ping...
CC:bug-parted <at> gnu.org
On 2020/6/1 9:56, Zhiqiang Liu wrote:
> Hi:
> Now I parted a disk with command “parted /dev/sdb -s mkpart primary 0cyl 128cyl”
> but the result was unexpected. The partition started 512 kB but not expected 1 MB.
> What’s more, the size of partition was 33.4 MB but not expected 1 GB. The commands are as follows,
> 1. dd if=/dev/zero of=/dev/sdb bs=1M count=10
> 2. parted /dev/sdb -s mklabel msdos
> 3. parted /dev/sdb -s mkpart primary 0cyl 128cyl
> ->Warning: The resulting partition is not properly aligned for best performance: 1s % 2048s != 0s
>
> After analysis, the reason of size changed was that cylinder’s size was changed.
> And the reason of starting position changed was that partition could not align
> by 2048 sectors. When partition tried to align 2048 sectors, the end sector of
> partition could not be in range of [127.5, 128.5) *cyl, which didn’t meet
> command “128cyl”.
>
> I found that one patch for parted/libparted/arch/linux.c as show in
> https://dcantrel.fedorapeople.org/patches/parted/0001-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch is
> related with the problem. ioctl (arch_specific->fd, BLKSSZGET, §or_size) are used to get dev->bios_geom.sectors,
> which changes from 63 to (1 + sector_size/PED_SECTOR_SIZE_DEFAULT).
>
> The patch has changed the cylinder’s size, and using cyl to align partitions will always fail.
> However, I do not have any idea to solve the problem. Could you help me?
>
> Best regards.
> Zhiqiang Liu
>
This bug report was last modified 4 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.