1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

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
```

(cherry picked from commit e9a28b8ccd)
This commit is contained in:
undef 2022-07-14 09:03:28 +00:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3221c3a657
commit 378e187ed4

View File

@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) {
r = maybe_resize_underlying_device(arg_target, devno);
if (r < 0)
return r;
log_warning_errno(r, "Unable to resize underlying device of \"%s\", proceeding anyway: %m", arg_target);
mountfd = open(arg_target, O_RDONLY|O_CLOEXEC);
if (mountfd < 0)