Unable to extend disk size of /sysroot
ATTENTION:
THIS PROCEDURE IS NOT SUPPORTED BY RED HAT SUPPORT TEAM. THE CORRECT WAY IS TO REBUILD A NEW NODE WITH THE CORRECT SIZE.
This is an article from Red Hat community and should not be treated as official documentation.
Refer to Housekeeping of /sysroot on Red Hat OpenShift Container Platform for the official workaround.
Hello All,
I have installed OCP 4.8 on vcenter with RHCOS version 48.84.202107202156-0.
The /sysroot partition on the default RHCOS ova image is 16G only, which fills up pretty quickly and leaves the nodes in Not Ready state. So i wanted to increase the disk size.
I increased the disk size from vCenter, but when i try to increase it on the OS, it does not take effect. Can anyone please tell what is the issue?
lsblk shows that extended disk size to be 60G
[root@master-1 core]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 60G 0 disk
|-sda1 8:1 0 1M 0 part
|-sda2 8:2 0 127M 0 part
|-sda3 8:3 0 384M 0 part /boot
`-sda4 8:4 0 15.5G 0 part /sysroot
Current sysroot size
[root@master-1 core]# df -hT /
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda4 xfs 16G 9.8G 5.8G 63% /
[root@master-1 core]# sudo xfs_growfs /sysroot/
meta-data=/dev/sda4 isize=512 agcount=20, agsize=208384 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=4062971, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
After this also the size does not change
[root@master-1 core]# df -hT /
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda4 xfs 16G 9.8G 5.8G 63% /
Tried to run the command on the FS name as well
[root@master-1 core]# sudo xfs_growfs /dev/sda4
meta-data=/dev/sda4 isize=512 agcount=20, agsize=208384 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=4062971, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@master-1 core]# df -hT /
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda4 xfs 16G 9.8G 5.8G 63% /