From 753fbc0c5c4fecc69a23952718e5a0d551b5a4b2 Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:16:02 -0700 Subject: [PATCH] disable CoW for journal (#2501) --- backend/src/init.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/src/init.rs b/backend/src/init.rs index 0308f684c..dc98dae42 100644 --- a/backend/src/init.rs +++ b/backend/src/init.rs @@ -254,6 +254,17 @@ pub async fn init(cfg: &RpcContextConfig) -> Result { } } crate::disk::mount::util::bind(&log_dir, "/var/log/journal", false).await?; + match Command::new("chattr") + .arg("-R") + .arg("+C") + .arg("/var/log/journal") + .invoke(ErrorKind::Filesystem) + .await + { + Ok(_) => Ok(()), + Err(e) if e.source.to_string().contains("Operation not supported") => Ok(()), + Err(e) => Err(e), + }?; Command::new("systemctl") .arg("restart") .arg("systemd-journald")