Bug 600652
| Summary: | virsh does not support simple (non-XML editing) method of creating volume snapshots | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Justin Clift <justin> | ||||||||
| Component: | libvirt | Assignee: | Eric Blake <eblake> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | low | ||||||||||
| Version: | 6.0 | CC: | ajia, berrange, dallan, dyuan, hbrock, llim, mjenner, nzhang, syeghiay, veillard, xen-maint, yoyzhang | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | libvirt-0.8.7-18.el6 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2011-06-09 19:07:42 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 628871 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Justin Clift
2010-06-05 12:40:21 UTC
Created attachment 421568 [details] Updated patch. Updated patch. This tries the supplied backing store volume string as a path and key if not found, plus reports failure to locate the volume to the user. Also submitted upstream: http://www.redhat.com/archives/libvir-list/2010-June/msg00134.html This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion. Created attachment 422276 [details] Updated patch, as submitted upstream. Submitted upstream: https://www.redhat.com/archives/libvir-list/2010-June/msg00179.html This was fixed upstream, Daniel Verified this bug pass with libvirt-0.8.7-18.el6.x86_64
LVM Storage Pool
****************
# vgs
VG #PV #LV #SN Attr VSize VFree
HostVG 1 1 0 wz--n- 9.31g 7.31g
# lvs HostVG
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
HostVG-vol HostVG -wi-a- 2.00g
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # vol-list HostVG
Name Path
-----------------------------------------
HostVG-vol /dev/HostVG/HostVG-vol
virsh # vol-create-as --pool HostVG snapvol1 5G --backing-vol HostVG-vol
Vol snapvol1 created
virsh # vol-create-as --pool HostVG snapvol2 1G --backing-vol HostVG-vol
Vol snapvol2 created
virsh # vol-create-as --pool HostVG snapvol3 1G --backing-vol HostVG-vol --backing-vol-format qcow2
Vol snapvol3 created
virsh # vol-list HostVG
Name Path
-----------------------------------------
HostVG-vol /dev/HostVG/HostVG-vol
snapvol1 /dev/HostVG/snapvol1
snapvol2 /dev/HostVG/snapvol2
snapvol3 /dev/HostVG/snapvol3
virsh # exit
# lvs HostVG
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
HostVG-vol HostVG owi-a- 2.00g
snapvol1 HostVG swi-a- 5.00g HostVG-vol 0.00
snapvol2 HostVG swi-a- 1.00g HostVG-vol 0.00
snapvol3 HostVG swi-a- 1.00g HostVG-vol 0.00
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # vol-delete --pool HostVG snapvol1
Vol snapvol1 deleted
virsh # vol-list HostVG
Name Path
-----------------------------------------
HostVG-vol /dev/HostVG/HostVG-vol
snapvol2 /dev/HostVG/snapvol2
snapvol3 /dev/HostVG/snapvol3
virsh # exit
# lvs HostVG
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
HostVG-vol HostVG owi-a- 2.00g
snapvol2 HostVG swi-a- 1.00g HostVG-vol 0.00
snapvol3 HostVG swi-a- 1.00g HostVG-vol 0.00
Directory Storage Pool
**********************
# ls -la /var/lib/libvirt/images/pool-dir/ -h
total 1.1G
drwx------. 2 root root 4.0K Apr 20 05:38 .
drwx--x--x. 3 root root 4.0K Apr 20 05:38 ..
-rw-------. 1 root root 1.0G Apr 20 05:38 pool-vol
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # vol-list pool-dir
Name Path
-----------------------------------------
pool-vol /var/lib/libvirt/images/pool-dir/pool-vol
virsh # vol-create-as pool-dir pool-vol-snapshot1 1G --format qcow2 --backing-vol pool-vol --backing-vol-format qcow2
Vol pool-vol-snapshot1 created
virsh # vol-create-as pool-dir pool-vol-snapshot2 1G --format qcow2 --backing-vol pool-vol --backing-vol-format qcow2
Vol pool-vol-snapshot2 created
virsh # vol-list pool-dir
Name Path
-----------------------------------------
pool-vol /var/lib/libvirt/images/pool-dir/pool-vol
pool-vol-snapshot1 /var/lib/libvirt/images/pool-dir/pool-vol-snapshot1
pool-vol-snapshot2 /var/lib/libvirt/images/pool-dir/pool-vol-snapshot2
virsh # exit
# ls -lah /var/lib/libvirt/images/pool-dir/
total 1.1G
drwx------. 2 root root 4.0K Apr 20 06:02 .
drwx--x--x. 3 root root 4.0K Apr 20 05:38 ..
-rw-------. 1 root root 1.0G Apr 20 05:38 pool-vol
-rw-------. 1 root root 256K Apr 20 06:02 pool-vol-snapshot1
-rw-------. 1 root root 256K Apr 20 06:02 pool-vol-snapshot2
# qemu-img info /var/lib/libvirt/images/pool-dir/pool-vol-snapshot2
image: /var/lib/libvirt/images/pool-dir/pool-vol-snapshot2
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 140K
cluster_size: 65536
backing file: /var/lib/libvirt/images/pool-dir/pool-vol (actual path: /var/lib/libvirt/images/pool-dir/pool-vol)
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # vol-delete --pool pool-dir pool-vol-snapshot1
Vol pool-vol-snapshot1 deleted
virsh # vol-list pool-dir
Name Path
-----------------------------------------
pool-vol /var/lib/libvirt/images/pool-dir/pool-vol
pool-vol-snapshot2 /var/lib/libvirt/images/pool-dir/pool-vol-snapshot2
virsh # exit
# ls -lah /var/lib/libvirt/images/pool-dir/
total 1.1G
drwx------. 2 root root 4.0K Apr 20 06:04 .
drwx--x--x. 3 root root 4.0K Apr 20 05:38 ..
-rw-------. 1 root root 1.0G Apr 20 05:38 pool-vol
-rw-------. 1 root root 256K Apr 20 06:02 pool-vol-snapshot2
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html |