Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] gdisk - is this an expected behavior?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
ksu
Posts: 79
Joined: 2014-01-13 14:59
Has thanked: 3 times
Been thanked: 1 time

[Solved] gdisk - is this an expected behavior?

#1 Post by ksu »

Code: Select all

# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.9

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 35156244480 sectors, 16.4 TiB
Model: SMC2208         
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 0B4BEE7E-C2CC-4220-87A8-DED5CDFF7240
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 35156244446
Partitions will be aligned on 2048-sector boundaries
Total free space is 35156244413 sectors (16.4 TiB)

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

Command (? for help): n
Partition number (1-128, default 1): 
First sector (34-35156244446, default = 2048) or {+-}size{KMGTP}: 
Last sector (2048-35156244446, default = 35156242431) or {+-}size{KMGTP}: +16.3T
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): 8e00
Changed type of partition to 'Linux LVM'

imo, till here everything looks good, but this is what i get:

Code: Select all

Command (? for help): p
Disk /dev/sda: 35156244480 sectors, 16.4 TiB
Model: SMC2208         
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 0B4BEE7E-C2CC-4220-87A8-DED5CDFF7240
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 35156244446
Partitions will be aligned on 2048-sector boundaries
Total free space is 35156244397 sectors (16.4 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            2063   8.0 KiB     8E00  Linux LVM

Command (? for help): d
Using 1

Command (? for help): q
here is the thing, it accepted +16.3T ( accepted in this case means: it did not error out )

so why did it end up adding 16 blocks? and still not error out?

i am thinking it might not like the decimal point, but i guess i should be notified about it - not only that, but it should not "decide" to add 16 blocks in size instead.... 8KB LVM type 8e? i mean sure, but...

i see it this way, if it does not error out ( which it does in that spot when you type in some gibberish ), means the input is accepted, validated, good to go - and not partially just discarded without letting the user know.

edit: typo: 15 -> 16 blocks
Last edited by ksu on 2024-03-08 15:55, edited 1 time in total.
"They did not know it was impossible so they did it” - Mark Twain

User avatar
ksu
Posts: 79
Joined: 2014-01-13 14:59
Has thanked: 3 times
Been thanked: 1 time

Re: gdisk - is this an expected behavior?

#2 Post by ksu »

known bug - version 1.0.10 now in unstable:

https://packages.debian.org/unstable/admin/gdisk

thank you very much Mr. Smith
"They did not know it was impossible so they did it” - Mark Twain

Post Reply