Commit 4e6ee49
committed
Fix NAS backup filename for legacy LINSTOR path
When backing up a running VM, nasbackup.sh derives the backup filename
from the disk source path reported by libvirt. VMs started before the
switch to /dev/drbd/by-res/ paths still carry the raw DRBD device node
(e.g. /dev/drbd1098) in their live domain XML, which fell into the
basename fallback and produced root.drbd1098.qcow2 instead of
root.<volume-uuid>.qcow2. Restore always expects the UUID-based name, so
these backups could not be restored until the VM was stopped and started.
Resolve raw /dev/drbdNNNN device nodes back to the volume UUID by asking
udev for the device's /dev/drbd/by-res/cs-<uuid> symlink. Apply the same
handling in all three backup loops (running-VM XML build, sparsify, and
stopped-VM convert).
Signed-off-by: Moritz Tanner <moritz.tanner@linbit.com>1 parent 348ceaf commit 4e6ee49
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
111 | 126 | | |
112 | 127 | | |
113 | 128 | | |
| |||
117 | 132 | | |
118 | 133 | | |
119 | 134 | | |
| 135 | + | |
| 136 | + | |
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
| |||
174 | 191 | | |
175 | 192 | | |
176 | 193 | | |
177 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
178 | 200 | | |
179 | 201 | | |
180 | | - | |
181 | 202 | | |
182 | 203 | | |
183 | 204 | | |
| |||
213 | 234 | | |
214 | 235 | | |
215 | 236 | | |
| 237 | + | |
| 238 | + | |
216 | 239 | | |
217 | 240 | | |
218 | 241 | | |
| |||
0 commit comments