[elbe-devel] [PATCH] Introduce generic filesystem tuning

daniel at braunwarth.dev daniel at braunwarth.dev
Mon Mar 6 13:04:12 CET 2023


> January 1, 2023 at 9:40 PM, "Daniel Braunwarth" <daniel at braunwarth.dev> wrote:

> 
> This patch introduces a generic way for filesystem tuning with the new
> XML node "fs-finetuning".
> 
> This new node can contain two different command variants:
> 
> 1. "device-command", which is being executed directly after the
>  filesystem has been created but before it is going to be mounted.
>  This command variant provides a "{device}" placeholder which is
>  replaced with the device containing the filesystem.
> 
> 2. "path-command", which is being executed after the filesystem has been
>  mounted but before it is going to be filled with its content.
>  This command variant provides a "{path}" placeholder which is
>  replaced with the path of the mounted filesystem.
> 
> Those filesystem tuning commands shall replace the currently existing
> "tune2fs" node. For example:
> 
> <fs>
>  <type>ext4</type>
>  <fs-finetuning>
>  <device-command>tune2fs -i 0 {device}</device-command>
>  </fs-finetuning>
> </fs>
> 
> To be backward compatible the currently existing "tune2fs" nodes are
> automatically converted during the XML preprocessing.
> 
> Another use case for those commands could be to create Btrfs subvolumes.
> For example:
> 
> <fs>
>  <type>btrfs</type>
>  <fs-finetuning>
>  <path-command>btrfs subvolume create {path}/home</path-command>
>  <path-command>btrfs subvolume create {path}/var/log</path-command>
>  </fs-finetuning>
> </fs>
> 
> Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
> ---

May I gently ping for any feedback here?


More information about the elbe-devel mailing list