From 7be5d072680f3ee13b1efea0e004dda7b7d984ff Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 9 Apr 2018 12:39:19 +0200 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/lvm-snapshots.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'custom/lvm-snapshots.nix') diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix index ef4a97c4..fc2db4e0 100644 --- a/custom/lvm-snapshots.nix +++ b/custom/lvm-snapshots.nix @@ -75,6 +75,7 @@ in { serviceConfig = with pkgs; { Type = "oneshot"; ExecStart = "${devicemapper}/bin/lvcreate -s ${scfg.cowSize} --name ${snapshotName name} ${scfg.VG}/${scfg.LV}"; + ExecStopPre = "${devicemapper}/bin/lvchange -a n ${scfg.VG}/${snapshotName name}" ExecStop = "${devicemapper}/bin/lvremove ${scfg.VG}/${snapshotName name}"; RemainAfterExit = true; }; -- cgit v1.2.3