Bug 1523562

Summary: [RFE] Change xfs settings when vdo volume is used
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Sahina Bose <sabose>
Component: gdeployAssignee: Ramakrishna Reddy Yekulla <rreddy>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.3CC: amukherj, bgurney, dkeefe, dkota, rcyriac, rhs-bugs, sankarshan, sasundar, smohan, storage-qa-internal, surs
Target Milestone: ---Keywords: FutureFeature, ZStream
Target Release: RHGS 3.3.1 Async   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gdeploy-2.0.2-26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1578353 (view as bug list) Environment:
Last Closed: 2018-06-21 03:33:15 UTC Type: Bug
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: 1523603, 1578353, 1578354, 1581561    

Description Sahina Bose 2017-12-08 10:03:43 UTC
Description of problem:

According to Dennis Keefe,

 Use these xfs settings for XFS in RHHI, so that XFS handle conditions when VDO runs out of physical space.

echo 4 | tee /sys/fs/xfs/dm-13/error/metadata/ENOSPC/max_retries
echo 4 | tee /sys/fs/xfs/dm-13/error/metadata/EIO/max_retries

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

Comment 3 SATHEESARAN 2018-03-03 02:23:45 UTC
gdeploy should first find which are all the brick devices in terms of 'dm' id, then comment0 should help

Comment 6 Sahina Bose 2018-04-06 10:34:13 UTC
Deployment using vdo option fails in RHHI.

[vdo]
action=create
devices=sdd
names=vdo_sdd
logicalsize=10000G
blockmapcachesize=128M
readcache=enabled
readcachesize=20M
emulate512=enabled
writepolicy=sync
ignore_vdo_errors=no
slabsize=32G

TASK [set xfs ENOSPC metadata settings during vdo creation] ********************
fatal: [10.70.37.28]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'item' is undefined\n\nThe error appears to have been in '/tmp/tmpwzRfaZ/vdo-create.yml': line 31, column 9, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n      - name:  set xfs ENOSPC metadata settings during vdo creation\n        ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'item' is undefined"}
	to retry, use: --limit @/tmp/tmpwzRfaZ/vdo-create.retry

Comment 7 Sahina Bose 2018-04-10 08:48:22 UTC
Hi Dennis, 

Setting this option via "echo 4 | tee /sys/fs/xfs/dm-13/error/metadata/ENOSPC/max_retries" does not persist on remounting the device. Is there a way to persist this across node reboot?

Comment 8 Bryan Gurney 2018-04-10 13:36:43 UTC
Hi Sahina,

Unfortunately, the "max_retries" setting resets to the default value of "-1" after unmounting and remounting the filesystem.

One potential solution would be a script to set the "max_retries" of the XFS filesystem on the VDO volume after it is successfully mounted.

Comment 9 Devyani Kota 2018-04-20 10:06:02 UTC
This PR[1] fixes the issue.

[1] https://github.com/gluster/gdeploy/pull/505

Thanks.

Comment 10 SATHEESARAN 2018-05-15 11:32:37 UTC
Tested with gdeploy-2.0.2-26.el7rhgs

The max_retries of the XFS were set to 4

[root@localhost]# cat /sys/fs/xfs/dm-13/error/metadata/ENOSPC/max_retries
4

[root@localhost]# cat /sys/fs/xfs/dm-13/error/metadata/ENOSPC/max_retries
4

Comment 12 errata-xmlrpc 2018-06-21 03:33:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1958