Ovirt Storage and Live Storage Migration 1
Ovirt Storage and Live Storage Migration 1
Ovirt Storage and Live Storage Migration 1
Agenda
Some Prerequisites
General Overview
Flow Overview
SPM/HSM API
Move Disk
Motivation
Host A
VM
VM
Virtual Disk
Storage A
Storage B
Virtual Disk
Storage A
Storage B
Host B
VM
VM
Virtual Disk
Storage A
Virtual Disk
Storage B
Some Prerequisites
Volume 2
Volume 3
Storage Architecture
Centralized storage system
(disk images, templates, etc...)
Storage Domain
Storage Pool
10
Storage Architecture
File Storage Domains
11
Storage Architecture
Block Storage Domains
Mailbox
12
Thin provisioning
Devices managed by
device-mapper and
multipath
Domain is a VG
Metadata is stored in a
single LV and in LVM tags
Volumes are LVs
Storage Architecture
Master Domain
Used to store:
Pool metadata
Backup of OVFs
(treated as blobs)
Async tasks
(persistent data)
13
14
The SPM is a role assigned to one host in a data center giving the
host sole authority to make all storage domain structure changes
The role of SPM can be migrated to any host in a data center
Creation, deletion and
manipulation of Virtual Disks,
Snapshots and Templates
Allocation of storage for sparse
block devices (on SAN)
Single meta data writer
SPM lease mechanism
(Chockler and Malkhi 2004,
Light-Weight Leases for
Storage-Centric Coordination)
Storage-centric mailbox
15
Volume 1
16
Volume 2
17
Volume 1
Volume 2
Volume 1
Volume 2
Volume 1'
Volume 2'
18
Volume 1
Volume 2
Volume 1
Volume 2
Volume 1'
Volume 2'
Volume 1'
Volume 2'
spUUID
storage pool
sdUUID
imgUUID
image to clone
Clone Structure
19
Volume 1
Volume 2
Volume 1'
Volume 2'
spUUID
storage pool
sdUUID
imgUUID
image to clone
syncType
Synchronize Data
20
Volume 2
Volume 1'
Volume 2'
21
vmId
virtual machine id
srcDisk
source disk
dstDisk
destination disk
Volume 1
Volume 2
Volume 1'
Volume 2'
read write
write only
Volume 1
Volume 1
22
Volume 2
Clone Structure
23
Volume 1
Volume 2
Volume 1'
Volume 2'
Synchronize Data
24
Volume 1
Volume 2
Volume 1'
Volume 2'
read write
write only
25
Volume 1
Volume 2
Volume 1'
Volume 2'
Synchronize Data
Volume 1
Volume 2
Volume 1'
Volume 2'
High Watermark Limit
26
read write
write only
Synchronize Data
Volume 1
Volume 2
Volume 1'
Volume 2'
High Watermark Limit
27
read write
write only
Synchronize Data
Volume 1
Volume 2
Volume 1'
Volume 2'
read write
write only
High Watermark Limit
28
Volume 1
Volume 2
Volume 1'
Volume 2'
read write
write only
29
Volume 2
Sequence Diagram
Preliminary Live Snapshot
Engine
HSM
(VM Host)
SPM
cloneImageStructure
syncImageData
extendVolume
extendVolume
diskReplicateFinish
30
syncImageData Task
diskReplicateStart
Live snapshot and disk replication are not one atomic operations
Volume 1
Volume 1
31
Volume 2
read write
Volume 1
Volume 2
QEMU background synchronization
Volume 1'
Volume 2'
write only
VIR_DOMAIN_BLOCK_REBASE_COPY
Starts a copy (replica/mirroring) instead of a regular block pull
VIR_DOMAIN_BLOCK_REBASE_SHALLOW
Consider only the top volume (leaf)
VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT
Reuse an existing pre-initialized volume (prepared by the SPM)
blockJobAbort(disk, flags)
VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT
Switch to the destination volume (destination storage domain)
32
drive-mirror
block-job-complete
Live Storage Migration Under The Hood
SPMAsyncTaskHandler
executeAction()
SPMAsyncTaskHandler
SPM
VDSM Host
Ovirt Engine
executeAction()
http://wiki.ovirt.org/wiki/Features/Serial_Execution_of_Asynchronous_Tasks_Detailed_Design
33
34
/Features/Serial_Execution_of_Asynchronous_Tasks_Detailed_Design
/Features/Design/StorageLiveMigration
/Features/Serial_Execution_of_Asynchronous_Tasks
Mailing lists
arch@ovirt.org users@ovirt.org
vdsm-devel@lists.fedorahosted.org
engine-devel@ovirt.org
IRC
#ovirt on OFTC
#vdsm on Freenode
Live Storage Migration Under The Hood