[Bug 906722] Re: root partition is not being grown
Scott Moser
smoser at ubuntu.com
Tue Dec 20 18:18:17 UTC 2011
I'll fix this in cloud-initramfs-tools because its just cleaner to do
there. I was calling growpart while the disk was mounted simply to
optimize the case where there was a change to be made (which happens
only the first boot, really).
Instead, I'm just going to call growpart once with '--debug' and if it would not make a change, then exit as before.
If it *would* make a change, then unmount / and call it again to make the change.
but there are some issues with sfdisk, and the update made it worse.
* --no-reread option exists in older versions of util-linux (at least in 2.19)
* --no-reread and --force with a mounted filesystem still exits failure in 2.20, it did not in 2.19
Partition is mounted and disk not resized (system booted) at this point.
$ growpart /dev/vda 1 --dry-run 2>out
CHANGE: partition=1 start=16065 old: size=4176900 end=4192965 new: size=20948760,end=20964825
$ sed -n '/new sfdisk/,$p' err > new
$ cat new
# === new sfdisk -d ===
# partition table of /dev/vda
unit: sectors
/dev/vda1 : start= 16065, size= 20948760, Id=83, bootable
/dev/vda2 : start= 0, size= 0, Id= 0
/dev/vda3 : start= 0, size= 0, Id= 0
/dev/vda4 : start= 0, size= 0, Id= 0
$ sudo sfdisk /dev/vda --force --no-reread < new; echo $?
....
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Device or resource busy
...
1
Previously if we did --force it would exit success (i guess in all
cases).
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/906722
Title:
root partition is not being grown
Status in “cloud-initramfs-tools” package in Ubuntu:
Confirmed
Status in “util-linux” package in Ubuntu:
Invalid
Bug description:
Upon booting an openstack instance of precise-i386-20111219-failed-console.log, I found that the root filesystem had not been resized as it normally would have been.
This occurred on both i386 and amd64.
Kernel output contains something like:
Begin: Running /scripts/local-bottom ... [ 1.852884] FDC 0 is a S82078B
[ 1.862945] 8139cp 0000:00:03.0: eth0: RTL-8139C+ at 0xf840a000, 02:16:3e:21:8a:47, IRQ 11
[ 1.877189] 8139too: 8139too Fast Ethernet driver 0.9.28
***** WARNING: Resize failed, attempting to revert ******
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
***** Appears to have gone OK ****
GROWROOT: FAILED: failed to resize
Re-reading the partition table ...
done.
done.
Begin: Running /scripts/init-bottom ... done.
It should show something like:
Begin: Running /scripts/local-bottom ... [ 1.314676] 8139cp 0000:00:03.0: eth0: RTL-8139C+ at 0xf840a000, 02:16:3e:3e:94:65, IRQ 11
[ 1.320377] FDC 0 is a S82078B
[ 1.335493] 8139too: 8139too Fast Ethernet driver 0.9.28
GROWROOT: CHANGED: partition=1 start=16065 old: size=4176900 end=4192965 new: size=20948760,end=20964825
[ 1.372287] vda: vda1
[ 1.398773] EXT4-fs (vda1): mounted filesystem with ordered data mode. Opts: (null)
done.
done.
Begin: Running /scripts/init-bottom ... done.
This worked as recently as ubuntu-precise-daily-i386-server-20111213.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cloud-initramfs-growroot 0.2ubuntu1
ProcVersionSignature: User Name 3.2.0-5.11-virtual 3.2.0-rc5
Uname: Linux 3.2.0-5-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Tue Dec 20 05:25:48 2011
Ec2AMI: ami-0000011f
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-initramfs-tools/+bug/906722/+subscriptions
More information about the foundations-bugs
mailing list