need support for gpt partition tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-utils |
Medium
|
Unassigned | ||
| cloud-initramfs-tools (Ubuntu) |
Medium
|
Unassigned | ||
| cloud-utils (Ubuntu) |
Medium
|
Unassigned |
Bug Description
msdos partition table runs out at like 2TB.
growpart needs support to be able to grow gpt disks.
Related bugs:
* bug 1096999: add new partx update and resize upstream features
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: cloud-initramfs
ProcVersionSign
Uname: Linux 3.5.0-19-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Fri Dec 7 01:44:26 2012
MarkForUpload: True
SourcePackage: cloud-initramfs
UpgradeStatus: No upgrade log present (probably fresh install)
Scott Moser (smoser) wrote : | #1 |
summary: |
- need support for gpt drives + need support for gpt partition tables |
Scott Moser (smoser) wrote : | #2 |
Changed in cloud-utils: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
assignee: | nobody → Juerg Haefliger (juergh) |
assignee: | Juerg Haefliger (juergh) → nobody |
description: | updated |
Scott Moser (smoser) wrote : | #3 |
Juerg just added support to growpart to use 'sgdisk'.
The remaining step here is to make cloud-initramfs
That would allow GPT resizing from the initramfs.
There are 2 reasons not to "just do that":
a.) it changes initramfs size dramatically:
$ ls -l /boot/initrd.img*
-rw-r--r-- 1 root root 14936523 Feb 4 17:19 /boot/initrd.
-rw-r--r-- 1 root root 6047018 Feb 4 17:10 /boot/initrd.
b.) As I've described on a thread at http://
bug 1096999 is there to request the function into util-linux for partx and resizepart command.
description: | updated |
Scott Moser (smoser) wrote : | #4 |
I've just manually tested on raring, and the following seems to work the whole way through, when having installed psusi's branch at https:/
$ img=/tmp/my.img
$ mp=/tmp/mp
$ size=800M
$ osize="400M"
$ sudo rm -f $img; sudo rm -Rf $mp; sudo mkdir $mp
## create a new image $osize big
$ sudo truncate --size $osize "$img"
## add a single GPT partition that takes up the whole image
$ sudo sgdisk --new 1:2048: "$img"
## grow the image (as a hypervisor would do)
$ sudo truncate --size $size $img
## attach the image to a device
$ lodev=$(sudo losetup --show --find "$img")
$ echo $lodev
/dev/loop0
## put a filesystem on it, mount it, then grow the partition
$ sudo mkfs.ext4 ${lodev}p1
$ sudo mount ${lodev}p1 "$mp"
$ sudo growpart ${lodev} 1
## /proc/partitions still has old information
## tell kernel about grown partition
$ sudo partx --update 1 ${lodev}
## /proc/partitions has new information
## filesystem can now be re-sized
$ sudo resize2fs ${lodev}p1
Scott Moser (smoser) wrote : | #5 |
At the moment, I'm thinking that growpart should actually just grow the ability to invoke partx. There isn't any reason why cloud-init or some other tool should have to know about this other than possibly knowing to pass a new flag to growpart.
The other path would be to have cloud-init know that it should invoke growpart and then to invoke partx, but that seems unnecessary.
Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package cloud-utils - 0.26-0ubuntu2
---------------
cloud-utils (0.26-0ubuntu2) raring; urgency=low
* debian/copyright: fix formatting
* sync to trunk at revno 216
* support for GPT partitions in growpart via sgdisk (LP: #1087526)
* depend on wget and ca-certificates for ubuntu-
(LP: #1062671)
* fix sfdisk parsing (LP: #1007415)
-- Scott Moser <email address hidden> Mon, 04 Feb 2013 15:18:49 -0500
Changed in cloud-utils (Ubuntu): | |
status: | New → Fix Released |
Changed in cloud-initramfs-tools (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in cloud-utils (Ubuntu): | |
importance: | Undecided → Medium |
Changed in cloud-initramfs-tools (Ubuntu): | |
status: | Triaged → Fix Released |
Scott Moser (smoser) wrote : | #7 |
fixed in 0.28
Changed in cloud-utils: | |
status: | Fix Committed → Fix Released |
Fix committed in revision 213.