I would like to increase the size of my root partition. I was thinking that I could run fdisk /dev/sdb delete the sdb2 partition and create a new one that is bigger. However, I have read that I need to umount the partition ( not sure that's true ). I also saw things about resize2fs, but that is for resizing the filesystem ( I think ). What is the easiest way to increase the size to the rest of the sdb ? It'd be nice if I didn't have to boot into another partition ( as I don't have one set up ).
Current partitions and mounts:
- sdb | 119.2G |
- sdb1 | 512M | /efi
- sdb2 | 30G | /
resize2fs, but that is for resizing the filesystem ( I think )" -- IFF the filesystem is from the ext family. AFAIK the tool can expand a filesystem to the right even when it's mounted, but you need to be sure it's the right tool (what is the type of the filesystem?). See this question and my answer there. – Kamil Maciorowski Apr 27 '22 at 05:10/partition, you'll need to forcefully update the "in-memory" partition table withblockdev/partprobe/ ..., or the simplest and safest wayreboot. After that you should be able to resize the filesystem on it with the corresponding filesystem-specfic tool (the tool should let you know whether the filesystem can be extended while it is mounted). – Tom Yan Apr 27 '22 at 05:53