Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resize logical partition #745

Closed
stikonas opened this issue Jan 24, 2019 · 1 comment
Closed

Unable to resize logical partition #745

stikonas opened this issue Jan 24, 2019 · 1 comment

Comments

@stikonas
Copy link
Contributor

stikonas commented Jan 24, 2019

I was unable to resize logical partition with sfdisk (I actually first noticed this issue in KDE Partition Manager but then I checked and the error was coming from sfdisk)

# sfdisk --version
sfdisk from util-linux 2.33
# sfdisk --json /dev/sdc
{
   "partitiontable": {
      "label":"dos",
      "id":"0x545aa710",
      "device":"/dev/sdc",
      "unit":"sectors",
      "partitions": [
         {"node":"/dev/sdc1", "start":40960, "size":4194304, "type":"5"},
         {"node":"/dev/sdc5", "start":43008, "size":4192256, "type":"83"}
      ]
   }
}
# echo "start=43008 size=3192256" | sfdisk -N 5 --force /dev/sdc
Checking that no-one is using this disk right now ... OK

Disk /dev/sdc: 7,4 GiB, 7918845952 bytes, 15466496 sectors
Disk model:                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x545aa710

Old situation:

Device     Boot Start     End Sectors Size Id Type
/dev/sdc1       40960 4235263 4194304   2G  5 Extended
/dev/sdc5       43008 4235263 4192256   2G 83 Linux

/dev/sdc5: Failed to resize partition #5.
Leaving.
karelzak added a commit that referenced this issue Jan 31, 2019
Addresses: #745
Signed-off-by: Karel Zak <kzak@redhat.com>
@karelzak
Copy link
Collaborator

Fixed. Thanks for you report!

It seems that possible workaround is to not specify start= (especially if you the not want to move it).

karelzak added a commit that referenced this issue Apr 2, 2019
Addresses: #745
Signed-off-by: Karel Zak <kzak@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants