Skip to content

Commit

Permalink
disable CoW for journal (#2501)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez authored Nov 7, 2023
1 parent 748277a commit 753fbc0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions backend/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ pub async fn init(cfg: &RpcContextConfig) -> Result<InitResult, Error> {
}
}
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")
Expand Down

0 comments on commit 753fbc0

Please sign in to comment.