From e9a28b8ccd3352da3e0a75a18fc1185e52476a80 Mon Sep 17 00:00:00 2001 From: undef Date: Thu, 14 Jul 2022 09:03:28 +0000 Subject: [PATCH] growfs: Expand FS even if underlying block expansion fails This allows growfs to expand the filesystem even when the underlying block device cannot be expanded. This has been useful for example on LUKS devices that have already been expanded using systemd-repart. This works around the following error: ``` root@mobian:/home/mobian# /usr/lib/systemd/systemd-growfs / crypt_resize() of /dev/block/179:2 failed: Operation not permitted ``` --- src/partition/growfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partition/growfs.c b/src/partition/growfs.c index 3d46efa51c..e105c0e151 100644 --- a/src/partition/growfs.c +++ b/src/partition/growfs.c @@ -235,7 +235,7 @@ static int run(int argc, char *argv[]) { r = maybe_resize_underlying_device(mountfd, arg_target, devno); if (r < 0) - return r; + log_warning_errno(r, "Unable to resize underlying device of \"%s\", proceeding anyway: %m", arg_target); r = device_path_make_major_minor(S_IFBLK, devno, &devpath); if (r < 0) -- 2.25.1