Comment 7 for bug 1799953

Revision history for this message
Scott Moser (smoser) wrote :

Growpart grows a partition (/dev/sda2) on a block device (/dev/sda).

So right now there might be the following scenarios:
 a.) [supported in cloud-init and growpart] root filesystem on partition (/dev/sda2)
 b.) [supported in growpart] root filesystem on an LV (/dev/myvg0/mylv0 -> /dev/dm-1)
      where the LV is part of VG that includes PV that is a partition (/dev/sda1)
      this is partially supported because cloud-init won't do the right thing.  The right
      thing would be to call `growpart /dev/sda 1`
 c.) root filesystem on block device (/dev/sda) - odd, but could happen
 d.) root filesystem on LV that is pat of a VG that includes a PV that is a full disk (/dev/sda)

'c' and 'd' should not need growpart... when the block device is discovered
its size should be correctly identified by the kernel and a 'resizefs' should be needed
but no need for growpart.

The code I added hoped to add support for 'b' in growpart, but should not have broken 'd'.

For cloud-init to add support for 'b', we would need to determine the situation and call growpart on /dev/sda1.