Bug 1395157

Summary: autopart in the kickstart file doesn't use the full disk
Product: [Fedora] Fedora Documentation Reporter: Enrique <cquike>
Component: install-guideAssignee: Jaromir Hradilek <jhradile>
Status: NEW --- QA Contact: Fedora Docs QA <docs-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: develCC: anaconda-maint-list, cquike, dr, g.kaviyarasu, jonathan, mkolman, pbokoc, vanmeeuwen+fedora, vponcova, zach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Fedora 24 kickstart with autopart
none
packer template file for fedora 25
none
amaconda logs none

Description Enrique 2016-11-15 10:04:03 UTC
Created attachment 1220783 [details]
Fedora 24 kickstart with autopart

Description of problem:

 I am using a kickstart to create VM with packer and setting the autopart keyword to allow automatic partitioning. The VM is set up with 50 GB of virtual disk. If I understand correctly, following the documentation,

https://docs.fedoraproject.org/en-US/Fedora/24/html/Installation_Guide/chap-kickstart-installations.html

https://docs.fedoraproject.org/en-US/Fedora/24/html/Installation_Guide/sect-installation-gui-manual-partitioning-recommended.html

 it should create a /home partition, a /boot partition and a swap. However the /home is not created, but even worse, the / partition has a size of only 15 GB, without using the rest of the 35 GB available.

 I don't know if this is reproducible with a physical machine. A very similar kickstart has been working properly with Fedora 20 up to Fedora 23.

How reproducible:

 Always

Steps to Reproduce:
1. Use the attached kickstart file for a Fedora 24 installation in a machine with 50 GB of hard disk.

Comment 1 Enrique 2016-11-28 14:28:17 UTC
 I have made an additional test using "part / --grow" rather than autopart. I would have expected that the root partition would then grow up to the 50GB, but instead I get the same result as with autopart: it remains at 15GB.

 It looks like it has something to do with LVM, since the volume group created has the proper size:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize  VFree 
  fedora   1   2   0 wz--n- 49.51g 32.50g

 but then the logical volume doesn't use all the available volume group:
$ sudo lvs
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root fedora -wi-ao---- 15.00g                                                    
  swap fedora -wi-ao----  2.00g

Comment 2 Enrique 2016-11-29 17:13:30 UTC
 Just for the record: the same bug is still present in Fedora 25.

Comment 3 Vendula Poncova 2017-01-06 16:30:47 UTC
The /home partition will not be created on a 50 GB hard disk. The documentation is not very clear about the definition of the free space and it will be changed. I suggest to use a 55GB hard disk instead, that should be enough.

I've tested the given kickstart file on Fedora 24, Fedora 25 and Rawhide and I was not able to reproduce the problem with the 15 GB root partition. Could you provide more information about the installation and attach the logs, please?

Comment 4 Enrique 2017-03-17 11:51:30 UTC
 Hi,
 
 sorry for the late reply, but I wasn't working on this item for a while.

 I have tried with 70 GB and the problem remains. I will attach the logs soon.

Comment 5 Enrique 2017-03-23 17:39:52 UTC
 just for the record, the way we create the machine is with the following packer command:

        packer build \
                -var 'iso_url=iso_url=file-cache/fedora-25-x86_64-installer.iso\
                -var 'iso_checksum=86bc3694f4938382753d1e9536f2140a6c9c1978207766340c679a89509073c7 \
                -var 'iso_checksum_type=sha256' \
                -var 'version=25-x86_64 \
                -var 'http_dir=build/fedora-25-x86_64-http/ \
                -var 'guest_os_type_virtualbox=Fedora_64' \
                templates/fedora-vagrant.json

 I will attach the fedora-vagrant.json for a reference. I will also attach the logs created by anaconda during the installation.
 
 In the final machine:
$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 68.4G  0 disk 
├─sda2   8:2    0  2.1G  0 part [SWAP]
├─sda3   8:3    0   15G  0 part /
└─sda1   8:1    0    1G  0 part /boot
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        990M     0  990M   0% /dev
tmpfs          1001M     0 1001M   0% /dev/shm
tmpfs          1001M  972K 1000M   1% /run
tmpfs          1001M     0 1001M   0% /sys/fs/cgroup
/dev/sda3        15G  3.0G   13G  20% /
tmpfs          1001M   72K 1001M   1% /tmp
/dev/sda1       976M  112M  798M  13% /boot
tmpfs           201M   32K  201M   1% /run/user/42
vagrant          44G   26G   19G  59% /vagrant
tmpfs           201M     0  201M   0% /run/user/1000

 As you can see from storage.log blivet gets the size correctly:
12:58:41,734 DEBUG blivet: updated sda size to 68.36 GiB (68.36 GiB)

 But at some point it decides that the root partition should have only 15 GiB:
11:59:07,765 DEBUG blivet: allocating partition: req0 ; id: 82 ; disks: ['sda'] ;
boot: False ; primary: False ; size: 2 GiB ; grow: True ; max_size: 15 GiB ; start: None ; end: None

Comment 6 Enrique 2017-03-23 17:41:03 UTC
Created attachment 1265851 [details]
packer template file for fedora 25

Comment 7 Enrique 2017-03-23 17:42:21 UTC
Created attachment 1265852 [details]
amaconda logs

Comment 8 Vendula Poncova 2017-05-04 13:30:28 UTC
Hello,
thanks for the logs! It looks to be another issue with the documentation, after all. The problem is that you are using Fedora Server. They have customized the anaconda's default partitioning scheme there, so the maximum size of / is 15 GiB and no /home partition will be created with autopartitioning.

I have found it mentioned here:
https://lists.fedoraproject.org/archives/list/server@lists.fedoraproject.org/thread/D7ZK7SILYDYAATRFS6BFWZQWS6KSRGDG/

But I couldn't find a comment about that in the documentation, so I will switch the bug to install-guide. What you can do is to use Fedora Workstation or define partitions manually in your kickstart file.

Comment 9 Vendula Poncova 2017-05-04 13:38:12 UTC
Installation guide does not mention, that the default partitioning scheme is different with Fedora Server. It affects the behaviour of the kickstart autopart command and the 'Automatically configure partitioning' option in GUI.

The changes are described here:
https://lists.fedoraproject.org/archives/list/server@lists.fedoraproject.org/thread/D7ZK7SILYDYAATRFS6BFWZQWS6KSRGDG/

Comment 11 Daniel Roesen 2022-01-02 19:26:40 UTC
Problem still present in Fedora Server 35.
Undocumented, and when documenting, it should ideally contain advise how to expand the root filesystem after installation manually.