Bug 1337308 - /dev/vda2 PV of Atomic Host cloud image does not use all of underlying partition
Summary: /dev/vda2 PV of Atomic Host cloud image does not use all of underlying partition
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-productimg-atomic
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-18 19:14 UTC by Micah Abbott
Modified: 2016-12-20 20:36 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-12-20 20:36:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Micah Abbott 2016-05-18 19:14:01 UTC
In the most recent release of Fedora Atomic Host (20160420), the cloud image has a physical device that has two partitions.  One is used for /boot, the other is used as an LVM Physical Volume.  Unfortunately, it seems that the partition used as a PV is sized to 5.7G, regardless of the overall size of the underlying disk.

For example, if I create a QCOW2 image with the cloud image as a backing file and size the QCOW2 image to 20G, the size of the PV is still 5.7G.


$ sudo qemu-img create -f qcow2 -o size=20G -o backing_file=Fedora-Cloud-Atomic-23-20160420.x86_64.qcow2 fedora-atomic-23-20160420.vm0.qcow2
Formatting 'fedora-atomic-23-20160420.vm0.qcow2', fmt=qcow2 size=21474836480 backing_file='Fedora-Cloud-Atomic-23-20160420.x86_64.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16

$ sudo virt-install --import --name fedora-atomic-23-20160420.vm0 --ram 2048 --vcpus 2 --disk path=/var/lib/libvirt/images/fedora-atomic-23-20160420.vm0.qcow2,format=qcow2,bus=virtio --disk path=/var/lib/libvirt/images/atomic-cloud-init.iso,device=cdrom,readonly=on --network bridge=virbr0 --os-type linux --os-variant rhel7 --noautoconsole

Starting install...
Creating domain...                                                                                                                                                                          |    0 B  00:00:00
Domain creation completed.

$ ssh -l cloud-user 192.168.122.7
Warning: Permanently added '192.168.122.7' (ECDSA) to the list of known hosts.
[cloud-user@rhel-atomic-7 ~]$ sudo -i
-bash-4.3# rpm-ostree status
  TIMESTAMP (UTC)         VERSION    ID             OSNAME            REFSPEC                                                
* 2016-04-19 19:04:34     23.106     05052ae3bb     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     
-bash-4.3# fdisk -l /dev/vda
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
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: 0x6ae18d3e

Device     Boot  Start      End  Sectors  Size Id Type
/dev/vda1  *      2048   616447   614400  300M 83 Linux
/dev/vda2       616448 41943039 41326592 19.7G 8e Linux LVM
-bash-4.3# pvs
  PV         VG       Fmt  Attr PSize PFree  
  /dev/vda2  atomicos lvm2 a--  5.70g 776.00m


Notice that the /dev/vda2 partition is sized to 19.7G, but the PV that uses it is only 5.7G


This is different than the behavior when using the previous Fedora Atomic Host release (20160405):


$ sudo qemu-img create -f qcow2 -o size=20G -o backing_file=Fedora-Cloud-Atomic-23-20160405.x86_64.qcow2 fedora-atomic-23-20160405.vm0.qcow2
Formatting 'fedora-atomic-23-20160405.vm0.qcow2', fmt=qcow2 size=21474836480 backing_file='Fedora-Cloud-Atomic-23-20160405.x86_64.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16

$ sudo virt-install --import --name fedora-atomic-23-20160405.vm0 --ram 2048 --vcpus 2 --disk path=/var/lib/libvirt/images/fedora-atomic-23-20160405.vm0.qcow2,format=qcow2,bus=virtio --disk path=/var/lib/libvirt/images/atomic-cloud-init.iso,device=cdrom,readonly=on --network bridge=virbr0 --os-type linux --os-variant rhel7 --noautoconsole

Starting install...
Creating domain...                                                                                                                                                                          |    0 B  00:00:00     
Domain creation completed.

$ ssh -l cloud-user 192.168.122.105
Warning: Permanently added '192.168.122.105' (ECDSA) to the list of known hosts.
[cloud-user@rhel-atomic-7 ~]$ sudo -i
-bash-4.3# rpm-ostree status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME            REFSPEC                                                
* 2016-04-03 17:19:34     23.95     6473695b09     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     
-bash-4.3# fdisk -l /dev/vda
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
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: 0x9fd19acd

Device     Boot  Start      End  Sectors  Size Id Type
/dev/vda1  *      2048   616447   614400  300M 83 Linux
/dev/vda2       616448 41943039 41326592 19.7G 8e Linux LVM
-bash-4.3# pvs
  PV         VG       Fmt  Attr PSize  PFree 
  /dev/vda2  atomicos lvm2 a--  19.70g 10.03g


Kudos to Mike Nguyen, who first noticed this and worked with me to narrow down the problem.

Comment 1 Fedora End Of Life 2016-11-25 09:05:06 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2016-12-20 20:36:22 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.