aboutsummaryrefslogtreecommitdiff
path: root/src/property/disk.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-02 16:28:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-06-03 10:47:00 -0700
commite63c77c113e483f6fe8d76a246497d76358efe3d (patch)
treeaeab9b94ee0045fc67809ffdf1698cfc2f10b1b6 /src/property/disk.lisp
parent0b80f0bf6082c689690aa9e2827e11a59e79f60c (diff)
downloadconsfigurator-e63c77c113e483f6fe8d76a246497d76358efe3d.tar.gz
define VOLUME-CONTENTS-MINIMUM-SIZE for LVM-LOGICAL-VOLUME
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/disk.lisp')
-rw-r--r--src/property/disk.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/property/disk.lisp b/src/property/disk.lisp
index 751813a..82da591 100644
--- a/src/property/disk.lisp
+++ b/src/property/disk.lisp
@@ -474,6 +474,10 @@ We do not specify what logical volumes it contains."))
(defclass-opened-volume activated-lvm-logical-volume (lvm-logical-volume))
+(defmethod volume-contents-minimum-size ((volume lvm-logical-volume))
+ "LVs cannot be of zero size."
+ (max 1 (call-next-method)))
+
(defmethod open-volume ((volume lvm-logical-volume) (file null))
(with-slots (volume-label lvm-volume-group) volume
(mrun "lvchange" "-ay" (strcat lvm-volume-group "/" volume-label))