api: zfs: create zpool with relatime=on
some operations (e.g. garbage collection/restore/etc.) are very read intensive on the chunks, and having atime=on and relatime=off (zfs default) makes those write intensive operations too. Additionally, 'ext4' defaults to relatime, so also change the default for api-created zpools. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
dfe5c4c494
commit
48910f9b0a
@ -273,13 +273,15 @@ pub fn create_zpool(
|
||||
crate::tools::systemd::enable_unit(&import_unit)?;
|
||||
}
|
||||
|
||||
let mut command = std::process::Command::new("zfs");
|
||||
command.arg("set");
|
||||
if let Some(compression) = compression {
|
||||
let mut command = std::process::Command::new("zfs");
|
||||
command.args(&["set", &format!("compression={}", compression), &name]);
|
||||
task_log!(worker, "# {:?}", command);
|
||||
let output = proxmox_sys::command::run_command(command, None)?;
|
||||
task_log!(worker, "{}", output);
|
||||
command.arg(&format!("compression={}", compression));
|
||||
}
|
||||
command.args(&["relatime=on", &name]);
|
||||
task_log!(worker, "# {:?}", command);
|
||||
let output = proxmox_sys::command::run_command(command, None)?;
|
||||
task_log!(worker, "{}", output);
|
||||
|
||||
if add_datastore {
|
||||
let lock = pbs_config::datastore::lock_config()?;
|
||||
|
Loading…
Reference in New Issue
Block a user