Bug 1398720 - discard is missing from the / mount options
Summary: discard is missing from the / mount options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: Installation & Update
Version: 4.0
Hardware: Unspecified
OS: Unspecified
high
medium vote
Target Milestone: ovirt-4.0.7
: ---
Assignee: Yuval Turgeman
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-25 16:44 UTC by Fabian Deutsch
Modified: 2016-12-20 11:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 11:38:47 UTC
oVirt Team: Node
rule-engine: ovirt-4.0.z?
fdeutsch: ovirt-4.1?
fdeutsch: planning_ack?
fdeutsch: devel_ack+
ycui: testing_ack+


Attachments (Terms of Use)

Description Fabian Deutsch 2016-11-25 16:44:55 UTC
Description of problem:
It is important that / is mounted with discard to ensure that freed space is also getting freed in the thin pool.
Otherwise the thin pool will suffer from free space starvation.

Version-Release number of selected component (if applicable):
4.*

How reproducible:
?

Steps to Reproduce:
1. Install Node/RHVH
2. Check if discard mount option is used on /
3. Update
4. Check if discard mount option is used on /

Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2016-11-26 08:29:24 UTC
There is a systemd timer that runs fstrim periodically. Configure it to run once a day - more efficient than the above.

Comment 2 Fabian Deutsch 2016-11-26 21:23:47 UTC
I actually wonder if the fstrim service is a higher risk.
Because the service is calling fstrim -a which will trim all mounted file-systems which support discard - and the mounted filesystms are pretty unpredictable.

By relying on the discard mount option we ensure that only "our" file-systems will be trimmed.

Another thing to conside ris that a fstrim timer is probably as unpredictable as a garbage collector: It will kick in at some point an might degrade performance - and the runtime depends on the pilled up data to be freed. We've got a spike behavior.

By using the mount option we have a constant - but more predeictive impact, as we don't pile up a mount of data to be freed.

Comment 3 Yaniv Kaul 2016-12-01 13:23:23 UTC
(In reply to Fabian Deutsch from comment #2)
> I actually wonder if the fstrim service is a higher risk.
> Because the service is calling fstrim -a which will trim all mounted
> file-systems which support discard - and the mounted filesystms are pretty
> unpredictable.

It is predictable and safe. People have been doing it (unknowingly) for several Fedora releases.

> 
> By relying on the discard mount option we ensure that only "our"
> file-systems will be trimmed.
> 
> Another thing to conside ris that a fstrim timer is probably as
> unpredictable as a garbage collector: It will kick in at some point an might
> degrade performance - and the runtime depends on the pilled up data to be
> freed. We've got a spike behavior.

It has no performance impact these days. It used to, in the distant past.
> 
> By using the mount option we have a constant - but more predeictive impact,
> as we don't pile up a mount of data to be freed.


Anyway, moving to 4.0.7. Not critical.

Comment 4 Fabian Deutsch 2016-12-01 13:57:31 UTC
If it is as in comment 3 then it should really not make a difference - and the service solution is easier.

Comment 5 Ying Cui 2016-12-13 14:50:15 UTC
Fabian, discard was already set to / from the mount options since RHVH 4.0 GA.. The block device reclaim space freed. 
Let's see the final solution by devel.

Comment 6 Fabian Deutsch 2016-12-20 11:38:47 UTC
Closing this according to comment 5.

The original bug was probably a manual change.


Note You need to log in before you can comment on or make changes to this bug.