Skip to content

Commit 6f3d91a

Browse files
MarioRobresrsmontero
authored andcommitted
F #6052: Update lvm backup_cmds (#3730)
(cherry picked from commit 303e704)
1 parent abe4081 commit 6f3d91a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/tm_mad/lib/lvm.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def path(lv)
9292
# @param _format [String, nil] Unused. Included for compatibility with ceph.rb.
9393
# @return [Disk]
9494
def backup_cmds(backup_dir, ds, live, _format = nil)
95-
snap_cmd = ''
96-
expo_cmd = ''
97-
clup_cmd = ''
95+
snap_cmd = ''
96+
expo_cmd = ''
97+
snap_clup = ''
9898

9999
# Supported configurations
100100
# Legend: (T)hin, (F)at
@@ -112,8 +112,8 @@ def backup_cmds(backup_dir, ds, live, _format = nil)
112112
snapshot = "#{@lv}_one_backup"
113113
orig = path(snapshot)
114114

115-
snap_cmd << "sudo lvcreate -s -n #{snapshot} #{qual(@lv)}\n"
116-
clup_cmd << "sudo lvremove -y #{qual(snapshot)}\n"
115+
snap_cmd << "sudo lvcreate -s -n #{snapshot} #{qual(@lv)}\n"
116+
snap_clup << "sudo lvremove -y #{qual(snapshot)}\n"
117117
else
118118
# Full, live, non-thin: UNSUPPORTED
119119
return
@@ -135,9 +135,11 @@ def backup_cmds(backup_dir, ds, live, _format = nil)
135135
# rubocop:enable Style/GuardClause
136136

137137
{
138-
:snapshot => snap_cmd,
139-
:export => expo_cmd,
140-
:cleanup => clup_cmd
138+
:snapshot => snap_cmd,
139+
:export => expo_cmd,
140+
:snapshot_clup => snap_clup,
141+
:export_clup => '',
142+
:cleanup => snap_clup
141143
}
142144
end
143145

0 commit comments

Comments
 (0)