Filesystem not being resized
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CirrOS |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Upon booting a new instance of Cirros 0.3.1, 0.3.2-pre1 or 0.3.2-pre2 the resize2fs command isn't run. Growroot did run, it's just the filesystem that isn't resized. This instance is booting from a volume, the platform is Openstack.
GROWROOT: CHANGED: partition=1 start=16065 old: size=64260 end=80325 new: size=6265350,
And after reboot:
NOCHANGE: partition 1 is size 6265350. it cannot be grown
So partitions look to be just fine.
Cirros-per should have put down a marker in /var/lib/cirros/sem but for some reason that didn't happen. Hacking a -v into /etc/rc3.
using state_dir=
[once] sh -c o=/tmp/resize.out;
So somewhere along these lines it bails out:
cirros-per once resizefs -- \
Contents of /tmp/resize.out only show the following:
resize2fs 1.42.2 (27-Mar-2012)
Manually running resize2fs does bring me a fullsized filesystem - but thats not a solution.
Related branches
affects: | cloud-init → cirros |
summary: |
- Filesystem not beeing resized + Filesystem not being resized |
Ok, some things I've tried in an effort to debug this:
* changed 'resize2fs' to 'sleep 30'.
The sleep gets killed all the same.
* moved the content of the 'sh -c' into a separate program 'resize-root' in /bin and invoke it from there.
This also failed to do anything.
The one thing that *does* seem to fix it is removing the '&'.
The thing I'm suspecting right now is that when /etc/init. d/rc.sysinit exits its taking down all its child processes. stop-daemon' , so I've wanted to investigate using that for the resize2fs.
It obviously doesn't take down them *all* as dropbear ssh is still running.
dropbear is started with 'start-
Other comments:
* resize2fs is horrid slow here. When we go from the ~50M file system that is on the disk1.img to the 2G of an 'm1.small', this takes quite some time. The reason I backgrounded was that I didn't want user-data to be blocked on this having finished. Ie, that would effectively make "boot to user-data" on cirros take *much* longer than it does otherwise. maybe 30 seconds in kvm rather than 4, or something on that order.
* we could make this configurable (and even the backgrounding configurable) via user-data, but atthis point cirros doesn't have any "config" style user-data. only '#!' style.
* resize2fs on cirros reports 1.42.2 . bug 1179610 tracked a order of magnitude (even up to 100x) improvement in resizefs. The debian bug http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 663237 reports that as being fixed in 1.42.2-1. The short summary here is that something may allow us to get this resize down to acceptable speeds to not background. There may other options enabled in the resize2fs build that could change performance for size. I'm not sure.