|
Harald Hoyer |
19aece |
From b9af0fcdfb2364245b333a123cdb07523855079f Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
19aece |
From: Kairui Song <kasong@redhat.com>
|
|
Harald Hoyer |
19aece |
Date: Thu, 18 Oct 2018 17:05:22 +0800
|
|
Harald Hoyer |
19aece |
Subject: [PATCH] 99squash: Don't clean up squahfs on isolate
|
|
Harald Hoyer |
19aece |
|
|
Harald Hoyer |
19aece |
The only time we need to cleanup squahfs manually is on switch root, to
|
|
Harald Hoyer |
19aece |
release resource and memory. We've covered that by setting
|
|
Harald Hoyer |
19aece |
"Conflicts=initrd-switch-root.target" for squash cleanup service.
|
|
Harald Hoyer |
19aece |
On shutdown systemd will take care of squahfs mounts. But for other
|
|
Harald Hoyer |
19aece |
isolate, files in initramfs are most likely still required, so don't
|
|
Harald Hoyer |
19aece |
clean up squahfs. For example, kdump's emergency handler will isolate
|
|
Harald Hoyer |
19aece |
into its own target, if squahfs is cleaned up it will fail.
|
|
Harald Hoyer |
19aece |
|
|
Harald Hoyer |
19aece |
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
Harald Hoyer |
19aece |
---
|
|
Harald Hoyer |
19aece |
modules.d/99squash/squash-mnt-clear.service | 1 +
|
|
Harald Hoyer |
19aece |
1 file changed, 1 insertion(+)
|
|
Harald Hoyer |
19aece |
|
|
Harald Hoyer |
19aece |
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
|
Harald Hoyer |
19aece |
index 8dd17812..f8d5db46 100644
|
|
Harald Hoyer |
19aece |
--- a/modules.d/99squash/squash-mnt-clear.service
|
|
Harald Hoyer |
19aece |
+++ b/modules.d/99squash/squash-mnt-clear.service
|
|
Harald Hoyer |
19aece |
@@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service
|
|
Harald Hoyer |
19aece |
Before=initrd-cleanup.service
|
|
Harald Hoyer |
19aece |
ConditionPathExists=/squash/root
|
|
Harald Hoyer |
19aece |
Conflicts=initrd-switch-root.target
|
|
Harald Hoyer |
19aece |
+IgnoreOnIsolate=true
|
|
Harald Hoyer |
19aece |
|
|
Harald Hoyer |
19aece |
[Service]
|
|
Harald Hoyer |
19aece |
Type=oneshot
|
|
Harald Hoyer |
19aece |
|