Closed Poorna-Gottimukkula1 closed 4 months ago
/assign
Thanks @Poorna-Gottimukkula1 for creating this issue.
As you have mentioned we have to update the partition number in update-disks script.
In rhel 9.* we have 3 partitions in all disk, partition 2 is mapped for /boot
and partition 3 is for /
.
[root@testvm ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 120G 0 disk
├─sda1 8:1 0 4M 0 part
├─sda2 8:2 0 1G 0 part
├─sda3 8:3 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdb 8:16 0 120G 0 disk
├─sdb1 8:17 0 4M 0 part
├─sdb2 8:18 0 1G 0 part
├─sdb3 8:19 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdc 8:32 0 120G 0 disk
├─sdc1 8:33 0 4M 0 part
├─sdc2 8:34 0 1G 0 part
├─sdc3 8:35 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdd 8:48 0 120G 0 disk
├─sdd1 8:49 0 4M 0 part
├─sdd2 8:50 0 1G 0 part
├─sdd3 8:51 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sde 8:64 0 120G 0 disk
├─sde1 8:65 0 4M 0 part
├─sde2 8:66 0 1G 0 part
├─sde3 8:67 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdf 8:80 0 120G 0 disk
├─sdf1 8:81 0 4M 0 part
├─sdf2 8:82 0 1G 0 part
├─sdf3 8:83 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdg 8:96 0 120G 0 disk
├─sdg1 8:97 0 4M 0 part
├─sdg2 8:98 0 1G 0 part
├─sdg3 8:99 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sdh 8:112 0 120G 0 disk
├─sdh1 8:113 0 4M 0 part
├─sdh2 8:114 0 1G 0 part
├─sdh3 8:115 0 119G 0 part
└─mpatha 253:0 0 120G 0 mpath
├─mpatha1 253:1 0 4M 0 part
├─mpatha2 253:2 0 1G 0 part /boot
└─mpatha3 253:3 0 119G 0 part /
sr0 11:0 1 506K 0 rom
In the existing script to grow partitions explicitly we have hardcoded 2 which is /boot
in case of all rhel 9.* images but we need to grow /
which is the last partition of disk.
Updated the script in this PR.
cc: @sudeeshjohn
Already fixed part of #623
What happened:
The allocated size for the root directory (/) is 10 GB instead of 120 GB
What you expected to happen: The expected root file system size should be 120 GB
How to reproduce it (as minimally and precisely as possible):
Example:
Anything else we need to know?:
I can see that the partition number hardcode with
2
https://github.com/ppc64le-cloud/pvsadm/blob/main/cmd/image/qcow2ova/prep/templates.go#L148-L169, we may need to change this to3
since rhel 9.x images are having the root file system on partition number3
Environment:
pvsadm version
): build binary from latest codecat /etc/os-release
):uname -a
):Linux image-build-rhel-test.power-iaas.cloud.ibm.com 5.14.0-410.el9.ppc64le #1 SMP Thu Jan 18 20:13:36 UTC 2024 ppc64le ppc64le ppc64le GNU/Linux