I am running a fresh installation of CentOS 7.7. on my Raspberry Pi 3 and unfortunatly I am running out of size when installing yum packages:
[root@centos7 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.4G 1.3G 104M 93% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 286M 57M 230M 20% /boot
tmpfs 93M 0 93M 0% /run/user/0
The OS is installed on a 16gb SD card, so in principle I should have more than enough space:
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 8192 593919 292864 c W95 FAT32 (LBA)
/dev/mmcblk0p2 593920 1593343 499712 82 Linux swap / Solaris
/dev/mmcblk0p3 1593344 4524031 1465344 83 Linux
I figured that I should be able to increase the size of the file system with growpart
or resize2fs
but I am not sure how to do this exactly and I don’t want to break anything. What would be the best way to do this? Thanks!
2
Answers
Well, this is an easy thing to do. I share with you my script to extend the /, https://github.com/sbaiidrissiyoussef/STORAGE/blob/master/extend_slash.sh
Upvote if this helps you.
You are on the right track. This is what I did for my Pi4 on a 64GB SD card: