diff --git a/rofl-containers/src/storage.rs b/rofl-containers/src/storage.rs index 0c64e59fb5..c210f664d8 100644 --- a/rofl-containers/src/storage.rs +++ b/rofl-containers/src/storage.rs @@ -50,6 +50,11 @@ pub async fn init(kms: Arc) -> Result<()> { format_storage(&storage_key)?; } + // Resize filesystem if needed. + run_cmd!( + sh -c "e2fsck -f -p /dev/mapper/storage || [ $? -le 2 ]"; + resize2fs "/dev/mapper/storage"; + )?; // Mount filesystem as /storage. run_cmd!(mount "/dev/mapper/storage" "/storage")?;