Your message dated Tue, 6 Aug 2019 22:03:19 +0200
with message-id <[email protected]>
and subject line Re: sgdisk --new changes given end sector parameter when using 
a unit for the start sector
has caused the Debian Bug report #778325,
regarding sgdisk --new changes given end sector parameter when using a unit for 
the start sector
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
778325: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778325
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdisk
Version: 0.8.5-1

I am trying to create 3 partitions on a 7.5 TiB RAID60 device (/dev/sda,
handed to the OS by a hardware raid controller).

Status before:

---
% sgdisk -p /dev/sda
Creating new GPT entries.
Disk /dev/sda: 16002748592 sectors, 7.5 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): F6924DB1-0783-4AC2-8499-EBA2F951CE07
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16002748558
Partitions will be aligned on 2048-sector boundaries
Total free space is 16002748525 sectors (7.5 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
---

Creating the first two partitions succeeds:

---
% sgdisk -p /dev/sda
Disk /dev/sda: 16002748592 sectors, 7.5 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 12C31C64-F48E-4D2B-AE58-FE34289BE587
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16002748558
Partitions will be aligned on 2048-sector boundaries
Total free space is 16002209899 sectors (7.5 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048           20480   9.0 MiB     8300  
   2           22528          542720   254.0 MiB   8300
---

However, trying to create a third one that contains the remaining space
fails:

---
% sgdisk -g --new=3:266M:16002748558 /dev/sda
Could not create partition 3 from 544768 to 32773629046784
Error encountered; not saving changes
---

Strangely, 32773629046784 is the sector I specified multiplied with the
current sector-alignment (2048). 

Specifying "0" for the start sector will make it work, though.

---
% sgdisk -g --new=3:0:16002748558 /dev/sda
Information: Moved requested sector from 542721 to 544768 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
---

I'm on Debian 7.0, amd64.

Greetings.

--- End Message ---
--- Begin Message ---
Fabian Niepelt wrote...

(...)
> However, trying to create a third one that contains the remaining space
> fails:
> 
> ---
> % sgdisk -g --new=3:266M:16002748558 /dev/sda
> Could not create partition 3 from 544768 to 32773629046784
> Error encountered; not saving changes
(...)

According to my tests, this bug exists in jessie (gdisk 0.8.10-2)
but was fixed in stretch (gdisk 1.0.1-1). Therefore closing. The
test script is attached.

    Christoph

------------------------
#!/bin/sh

set -e

DISK=/tmp/sparse_file

dd if=/dev/zero of=$DISK bs=1 count=0 seek=$((16002748592*512))

wipefs -af "$DISK"

sgdisk -g --new=1:2048:20480 "$DISK"
sgdisk -g --new=2:22528:542720 "$DISK"
sgdisk -g --new=3:266M:16002748558 "$DISK"

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to