FCOS: Is there a migration path for old (too small) root partitions?


I’m using FCOS (Fedora CoreOS) since over 2 years now and it is still running on my server. However, the recommanded root partition size is now 8GB (see note box on Configuring Storage :: Fedora Docs) but it was 5GB long time ago. To be on the save side, I consider a migration to extend the root partions size.

Is this possible without data loss on the partitions after the root partition? What should I do?


$ sudo fdisk -l
Disk /dev/sda: 160 GiB, 171798691840 bytes, 335544320 sectors
Disk model: QEMU HARDDISK   
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: gpt
Disk identifier: ...

Device        Start       End   Sectors   Size Type
/dev/sda1      2048      4095      2048     1M BIOS boot
/dev/sda2      4096    264191    260096   127M EFI System
/dev/sda3    264192   1050623    786432   384M Linux filesystem
/dev/sda4   1050624  10239999   9189376   4.4G Linux filesystem
/dev/sda5  10240000  92159999  81920000  39.1G Linux filesystem
/dev/sda6  92160000 335544286 243384287 116.1G Linux filesystem

$ mount | grep sda
/dev/sda4 on /sysroot type xfs (ro,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,prjquota)
/dev/sda4 on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,prjquota)
/dev/sda4 on /etc type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,prjquota)
/dev/sda4 on /usr type xfs (ro,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,prjquota)
/dev/sda4 on /sysroot/ostree/deploy/fedora-coreos/var type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,prjquota)
/dev/sda3 on /boot type ext4 (ro,nosuid,nodev,relatime,seclabel)

$ sudo cat /etc/crypttab 
luks-backup UUID=714e8821-acfc-455b-916f-1639ce55bcf7 /etc/luks/luks-backup luks
luks-var UUID=133ad57d-0e41-4305-a1a0-7932aa9b5cf8 /etc/luks/luks-var luks

$ mount | grep mapper
/dev/mapper/luks-var on /var type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)
/dev/mapper/luks-backup on /var/backup type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

I don’t think you can do that without a backup and re-installation.