From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup 5/5] api: set default fstrim schedule on datastore create
Date: Tue, 24 Mar 2026 15:08:59 +0100 [thread overview]
Message-ID: <1774361263.igjfxqrk2l.astroid@yuna.none> (raw)
On March 19, 2026 3:36 pm, Christian Ebner wrote:
> Default to set a weekly fstrim schedule for newly created datastores.
>
> Do not set when crating a datastore via the ZFS dialog, as it does
> not support discard.
that is not true, it just doesn't support triggering discard/trim via
fstrim.. which might be true for other file systems as well, not sure?
>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> src/api2/config/datastore.rs | 1 +
> src/api2/node/disks/directory.rs | 6 ++++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
> index b10b7fb0a..45df53c72 100644
> --- a/src/api2/config/datastore.rs
> +++ b/src/api2/config/datastore.rs
> @@ -336,6 +336,7 @@ pub fn create_datastore(
> // clearing prune settings in the datastore config, as they are now handled by prune jobs
> let config = DataStoreConfig {
> prune_schedule: None,
> + fstrim_schedule: config.fstrim_schedule.or(Some("weekly".to_string())),
> keep: KeepOptions::default(),
> ..config
> };
> diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
> index c37d65b8d..42cd1d2d7 100644
> --- a/src/api2/node/disks/directory.rs
> +++ b/src/api2/node/disks/directory.rs
> @@ -242,10 +242,12 @@ pub fn create_datastore_disk(
> let lock = pbs_config::datastore::lock_config()?;
> let datastore: DataStoreConfig = if removable_datastore {
> serde_json::from_value(
> - json!({ "name": name, "path": name, "backing-device": uuid }),
> + json!({ "name": name, "path": name, "backing-device": uuid , "fstrim-schedule": "weekly" }),
> )?
> } else {
> - serde_json::from_value(json!({ "name": name, "path": mount_point }))?
> + serde_json::from_value(
> + json!({ "name": name, "path": mount_point, "fstrim-schedule": "weekly" }),
> + )?
> };
> let (config, _digest) = pbs_config::datastore::config()?;
>
> --
> 2.47.3
>
>
>
>
>
>
next reply other threads:[~2026-03-24 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 14:08 Fabian Grünbichler [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-19 14:36 [RFC proxmox{,-backup} 0/6] add scheduled fstrim job for datastore's backing filesystems Christian Ebner
2026-03-19 14:36 ` [PATCH proxmox-backup 5/5] api: set default fstrim schedule on datastore create Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1774361263.igjfxqrk2l.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.