Cant increase size for disk F37

Hi, I have a fedora VM on Hyper-V where disk has 5% free space. expanded the size of the disk by 10G in HyperV then started the VM, tried using Disks, I see that there is new space added but I was not able to resize the original disk so I formatted the new free space but still canty resize it,
Can youi please tell me how can extend the size of the original disk to take advanatage of the new free space
I tried to created a partiton for the free spcae but it did not help

This instruction should expand your root LV and filesystem on LVM:

# Resize partition
sudo parted /dev/sda resizepart 2 100%

# Resize PV
sudo pvresize /dev/sda2

# Resize LV and FS
sudo lvextend -r -l +100%FREE /dev/mapper/fedora-root

Assuming the VG named fedora and the PV partition is followed by unallocated space.


You can confirm the current layout like this:

sudo parted -l; sudo vgs; sudo pvs; sudo lvs

Thanks, I executed all statements but it was increased by only 3 Gigs not the whole free space, for the last stataements

salam@puppetmaster29 HelloDocker.Api]$ sudo parted -l; sudo vgs; sudo pvs; sudo lvs
Model: Msft Virtual Disk (scsi)
Disk /dev/sda: 65.5GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1075MB  1074MB  primary  ext4         boot
 2      1075MB  65.5GB  64.4GB  primary               lvm


Model: Unknown (unknown)
Disk /dev/zram0: 6099MB
Sector size (logical/physical): 4096B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system     Flags
 1      0.00B  6099MB  6099MB  linux-swap(v1)


  VG     #PV #LV #SN Attr   VSize   VFree
  fedora   1   2   0 wz--n- <60.00g    0 
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda2  fedora lvm2 a--  <60.00g    0 
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root fedora -wi-ao---- 56.05g                                                    
  swap fedora -wi-a-----  3.94g

as you can notice, root fedora -wi-ao---- 56.05g is not 65 which I was expecting

Also, I am not sure why I have

Disk /dev/zram0: 6099MB

I presume it is a sort of swap? can delete it and recover it? Why I am asking this is because I have kubernetes (Kubelet not starting as swapoff should turned off) I used
swapoff -a
but still getting messages as if swap is still there, I even commented an entry in the fstb file as follows

/dev/mapper/fedora-swap swap swap defaults 0 0

Please ignore my earlier comment on the sizing, I was looking not on the right terminal, it worked like a charm and disk was increased. However, as I said, even when I do

swapoff -a

when I try to init kubernetes
I still get

[WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet

How do I get rid pf swap? Thanks

sudo sed -i -e "/\sswap\s/s/^/#/" /etc/fstab
sudo swapoff /dev/mapper/fedora-swap
sudo lvchange -an /dev/mapper/fedora-swap
sudo lvremove /dev/mapper/fedora-swap
sudo grubby --update-kernel=ALL --remove-args=rd.lvm.lv=fedora/swap
sudo grubby --update-kernel=ALL --remove-args=resume=/dev/mapper/fedora-swap
sudo dracut -f --regenerate-all

So many thanks again, after executing all instructions, swap seems disappeared but still when issuing
Kubeadm init I get

init] Using Kubernetes version: v1.26.3
[preflight] Running pre-flight checks
[WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet
[WARNING FileExisting-tc]: tc not found in system path

I really dont understand what is wrong as when I check the disks, no swap anymore

Keep in mind that zram is also implemented as swap.

See also:

Yes it seems that it is zram issue, in an admin session, when I fire Disks tool, I dont see zram but in KDE partition manager I see it it is there

The links you provided does not apply as I am using K8S version 1.26, so how can I get rid of the ZRAM? which is very strange that does not appears in disks

Also, I tried some of the suggestions on the different links you provided, it did not help, I always get the same error because of swap

sudo dnf remove zram\*
sudo reboot

Zram swap should not appear in disks as it is a virtual swap in RAM.
It shows with sudo fdisk -l or lsblk among others, but it is not part of an actual disk