[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Partition resizing fails

Hello Wolfgang,

Am Sat, 28 Dec 2019 20:10:16 +0100
schrieb Wolfgang Schweer <w.schweer@gmx.de>:

> As far as I understand Roman's report, this 'lvextend -A n ...' would 
> only be needed if the root filesystem is totally full. In this rare case 
> during tests on a new system, as a required first step something 
> like 'lvextend -A n -L+200M /dev/vg_system/root' would be needed to get 
> out of this mess without moving files out of the way.
> All following lvextend commands would then do without the -A n option.

Yes, I share your understanding.

My proposal would be the following change (see [1]):

- return run("lvextend","-L${newsize}k", "$device");
+ return run("lvextend","-L${newsize}k", "$device") or run("lvextend", "-A", "n", "-L${newsize}k", "$device");

This should have the following effect:
  * For a full root partition:
    The first "lvextend" run fails; the second run succeeds.
  * For a non-full root partition:
    The "lvextend" process is run twice in case of a (unrelated) failure.

But maybe this specific issue does not justify the complication.



Reply to: