Libvirt-Enable suppport for discard option for disks managed by nova

Registered by boh.ricky

This blueprint aims to support specifying the discard option for disks managed by nova.

[Background]
Newer SCSI devices support UNMAP command that is used to return the unused/freed blocks back to the storage.
This command is typically useful when the storage is thin provisioned like a thin provisioned SCSI LUN.
ATA SPEC has a similar command called "Trim" command.

Qemu1.5 has supported setting discard option for the disk. In Qemu1.6, qcow2 format file supported discard too.

[Benefit for the user]
1.
Useful for the storage to recycle the unused block in thin provision case.
2.
For the volume based on SSD, it may be useful for improving the performance and prolong the lifetime of SSD.
(As i know, ext3 doesn't support discard option for mount. User needs to issuse fstrim command by hand.)

[Usage]
Support the user to specify the discard metadata for a volume or a image.
Such as:
"
hw_disk_discard=unmap/ignore
"

[Todo]
1. support discard option for disk in libvirt driver.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Low
Drafter:
boh.ricky
Direction:
Approved
Assignee:
boh.ricky
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
boh.ricky
Completed by
Michael Still

Related branches

Sprints

Whiteboard

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguyRemoved from next, as next is now reserved for near misses from the last milestone --johnthetubaguy

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

Gerrit topic: https://review.openstack.org/#q,topic:bp/is,n,z

Addressed by: https://review.openstack.org/85556
    Libvirt-Enable suppport for discard option for disk device

Gerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-disk-discard-option,n,z

Addressed by: https://review.openstack.org/112977
    Libvirt-Enable suppport for discard option for disk device

Has a +2, so leaving in juno for now. --johnthetubaguy 2nd September 2014

Sorry, this has not yet been approved, so this will have to wait until kilo. Please contact me on IRC, or via email, for more details. Thank you. --johnthetubaguy 3rd September 2014

FFE granted --johnthetubaguy 8th September 2014

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.