mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-21 13:57:56 +03:00
* Fix bug with empty bitmaps that may occur on power-off / incremental on the first backup * Add -U (force-share) option to convert operations to prevent locking the disk files * Add a 1s sleep to wait for FS to release resources after nbd server is stopped (cherry picked from commit 31dadefc5b9f55e4cf62d4bbcd17a91d74250c66)
This commit is contained in:
parent
5d598803c2
commit
78910010d3
@ -129,6 +129,8 @@ module Nbd
|
||||
File.unlink(@@socket)
|
||||
|
||||
@@server = nil
|
||||
|
||||
sleep(1) # TODO: improve settle down FS/qemu locks
|
||||
end
|
||||
|
||||
def self.uri
|
||||
@ -614,7 +616,7 @@ class KVMDomain
|
||||
fsthaw
|
||||
|
||||
qdisk.each do |did, disk|
|
||||
disk.convert("#{@bck_dir}/disk.#{did}.0", :m => '4', :O => 'qcow2')
|
||||
disk.convert("#{@bck_dir}/disk.#{did}.0", :m => '4', :O => 'qcow2', :U => '')
|
||||
end
|
||||
|
||||
log("[BCK]: Full backup done in #{Time.now - init}s")
|
||||
@ -706,14 +708,14 @@ class KVMDomain
|
||||
sdisk = QemuImg.new("#{@vm_dir}/disk.#{did}")
|
||||
ddisk = "#{@bck_dir}/disk.#{did}.0"
|
||||
|
||||
sdisk.convert(ddisk, :m => '4', :O => 'qcow2')
|
||||
sdisk.convert(ddisk, :m => '4', :O => 'qcow2', :U => '')
|
||||
|
||||
if @checkpoint
|
||||
sdisk.bitmaps.each {|bm| sdisk.bitmap(bm['name'], :remove => '') }
|
||||
sdisk.bitmap("one-#{@vid}-0", :add => '')
|
||||
end
|
||||
next unless @checkpoint
|
||||
|
||||
sdisk.bitmap("one-#{@vid}-0", :add => '') if @checkpoint
|
||||
bms = sdisk.bitmaps
|
||||
bms.each {|bm| sdisk.bitmap(bm['name'], :remove => '') } unless bms.nil?
|
||||
|
||||
sdisk.bitmap("one-#{@vid}-0", :add => '')
|
||||
end
|
||||
|
||||
log("[BCK]: Full backup done in #{Time.now - init}s")
|
||||
|
Loading…
x
Reference in New Issue
Block a user