Bug 1414430
| Summary: | Disable sparsify option for pre allocated disk | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | sefi litmanovich <slitmano> |
| Component: | BLL.Virt | Assignee: | Shmuel Melamud <smelamud> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | sefi litmanovich <slitmano> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.1.0 | CC: | amureini, baptiste.agasse, bugs, gklein, ishaby, smelamud, tjelinek, tnisan |
| Target Milestone: | ovirt-4.1.1 | Flags: | rule-engine:
ovirt-4.1+
tjelinek: devel_ack+ rule-engine: testing_ack+ |
| Target Release: | 4.1.1.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-21 09:35:46 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
sefi litmanovich
2017-01-18 13:31:15 UTC
Why doesn't it work on pre-allocated disks? It should, unless they have 'wipe-after-delete' checked, in which case it gets a bit more complicated (for security reasons, we don't want to simply discard, but ensure it is wiped before that. Some arrays support it, some don't - we'll complete this work in 4.1.z). Idan - thoughts? Yes, actually it doesn't matter if the disk is thinly provisioned or pre-allocated. If I understood it correctly, virt-sparsify --in-place adds the disk's mount options the 'discard' option and calls 'fstrim /', which is exactly one of the options to reclaim space using the "Pass Discard" option of a vm disk, only that in the case of virt-sparsify you also need to shut down the vm. Two questions that should be asked are: 1. Does the underlying storage support discard? What happens if it doesn't? 2. Does the underlying storage support the property that discard zeroes the data? If not, we cannot allow running virt-sparsify when wipe after delete is enabled. From what I've seen in the code, these validations are not made prior to the call to virt-sparsify, even though the final outcome is the same as in Pass Discard, where we do check these things. Shmuel, am I missing something here? Can you please clarify? (In reply to Yaniv Kaul from comment #1) > Why doesn't it work on pre-allocated disks? It works on pre-allocated disks, but I doubt it is justified for this case. User chooses pre-allocated option if she needs better performance, because no additional allocation and no fragmentation will occur when the disk is used. Deallocating some clusters as result of sparsification will overturn this advantage. If user wants to save space at cost of some performance decrease, she will select thin-provisioned option. So I would disable sparsify for pre-allocated disks. (In reply to Idan Shaby from comment #2) > Two questions that should be asked are: > 1. Does the underlying storage support discard? What happens if it doesn't? Nothing will happen. Like in any other case when no blocks can be discarded. > 2. Does the underlying storage support the property that discard zeroes the > data? If not, we cannot allow running virt-sparsify when wipe after delete > is enabled. I don't check this currently. But yes, need to check this. Please see BZ 1415491 to track this bug. ok, so just disable the sparsify for preallocated disk. Since it is a new feature, targeting 4.1.1 Verified with rhevm-4.1.1.2-0.1.el7.noarch. Sparsify action is disabled when the disk is pre allocated (sparse=False). |