Fix rolling back to blank root snapshot on servers
This commit is contained in:
parent
e086653694
commit
5ff8902446
5 changed files with 8 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
location = "lasting-integrity";
|
||||
}
|
||||
];
|
||||
rootDataset = "rpool/local/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
location = "lasting-integrity";
|
||||
}
|
||||
];
|
||||
rootDataset = "rpool/local/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
fast = true;
|
||||
location = "192.168.0.1";
|
||||
}];
|
||||
rootDataset = "zroot/local/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
location = "192.168.0.2";
|
||||
}
|
||||
];
|
||||
rootDataset = "zroot/local/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@ in
|
|||
location = "lasting-integrity.vanpetegem.me";
|
||||
}];
|
||||
};
|
||||
rootDataset = lib.mkOption {
|
||||
example = "rpool/local/root";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.zfs.enable {
|
||||
|
@ -50,7 +53,7 @@ in
|
|||
supportedFilesystems = [ "zfs" ];
|
||||
zfs.requestEncryptionCredentials = config.chvp.zfs.encrypted;
|
||||
initrd.postDeviceCommands = lib.mkAfter ''
|
||||
zfs rollback -r rpool/local/root@blank
|
||||
zfs rollback -r ${config.chvp.zfs.rootDataset}@blank
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue