Some assumptions about setup
- Partition we are interested in resizing is
/dev/sda1
- System we are running is Debian 12
Make sure the drive is offline
Unmount
Verify nothing is using the drive or previous mount directory
Stop all docker containers
For my specific configuration, I was resizing a large drive that several docker containers are using as their data store, so I made sure to stop all of them (even though this is possibly extraneous).
I have ~/docker
for all my docker-compose
files, so it’s a simple for
loop.
Install necessary packages
We’ll be using growpart
, resize2fs
, and e2fsck
. Both resize2fs
and e2fsck
were already installed on my system. To install growpart
, run apt install cloud-guest-utils
on Debian 12.
Resize the disk
EOF