Bug 1862349

Summary: storage: xfs resize function doesn't work
Product: Red Hat Enterprise Linux 8 Reporter: ChanghuiZhong <czhong>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: jstodola, lilin, mhavrila, rhandlin, vtrefny, yizhan
Target Milestone: rcKeywords: RFE, TestCaseNeeded
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-blivet-3.2.2-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:55:03 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:

Description ChanghuiZhong 2020-07-31 07:28:42 UTC
Description of problem:
This bz is track upstream issues https://github.com/linux-system-roles/storage/issues/119

resize function does not work when the file system type is xfs.
in fact, the size of the lv capacity has not changed when do resize,but the result output by the terminal shows passed.

Version-Release number of selected component (if applicable):
rhel-system-roles-1.0-10.el8_1.noarch
ansible-2.9.7-1.el8ae.noarch

How reproducible:
100%

Steps to Reproduce:
output log:

#resize to 15g
TASK [storage : debug] ******************************************************************************************************
task path: /root/ansible-test/upstream/storage/tasks/main-blivet.yml:113
ok: [192.168.122.101] => {
    "blivet_output": {
        "actions": [],
        "changed": false,
        "failed": false,
        "leaves": [
            "/dev/vda1",
            "/dev/mapper/rhel_node1-root",
            "/dev/mapper/rhel_node1-swap",
            "/dev/mapper/foo-test1",
            "/dev/vdc",
            "/dev/sr0"
        ],
        "mounts": [
            {
                "dump": 0,
                "fstype": "xfs",
                "opts": "defaults",
                "passno": 0,
                "path": "/opt/test1",
                "src": "/dev/mapper/foo-test1",
                "state": "mounted"
            }
        ],
        "packages": [
            "xfsprogs",
            "lvm2"
        ],
        "pools": [
            {
                "disks": [
                    "vdb"
                ],
                "name": "foo",
                "state": "present",
                "type": "lvm",
                "volumes": [
                    {
                        "_device": "/dev/mapper/foo-test1",
                        "_mount_id": "/dev/mapper/foo-test1",
                        "fs_create_options": "",
                        "fs_label": "",
                        "fs_overwrite_existing": true,
                        "fs_type": "xfs",
                        "mount_check": 0,
                        "mount_device_identifier": "uuid",
                        "mount_options": "defaults",
                        "mount_passno": 0,
                        "mount_point": "/opt/test1",
                        "name": "test1",
                        "pool": "foo",
                        "size": "15g",
                        "state": "present",
                        "type": "lvm"
                    }
                ]
            }
        ],
        "volumes": []
    }
}
.
.
.
.
.
<192.168.122.101> (0, b'', b'')
changed: [192.168.122.101] => {
    "changed": true,
    "cmd": "lsblk | grep foo-test1",
    "delta": "0:00:00.005214",
    "end": "2020-07-02 11:06:14.608691",
    "invocation": {
        "module_args": {
            "_raw_params": "lsblk | grep foo-test1",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "rc": 0,
    "start": "2020-07-02 11:06:14.603477",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "└─foo-test1         253:2    0   10G  0 lvm  /opt/test1",
    "stdout_lines": [
        "└─foo-test1         253:2    0   10G  0 lvm  /opt/test1"
    ]
}




Actual results:
xfs FS resize failed

Expected results:
xfs FS resize success

Additional info:

Comment 1 Zhang Yi 2020-07-31 07:40:25 UTC
blivet upstream alreay support xfs grow: https://github.com/storaged-project/blivet/issues/859

Comment 2 Pavel Cahyna 2020-07-31 08:54:22 UTC
Is there a bugzilla bug for this enhancement in Blivet?
Should we keep this bug open? Apparently no changes to the system role are needed, it should be all done in Blivet.

Comment 3 Zhang Yi 2020-07-31 09:06:51 UTC
Hi Pavel

(In reply to Pavel Cahyna from comment #2)
> Is there a bugzilla bug for this enhancement in Blivet?
I just searched bugzilla in Blivet, seems no issue to track it.

@czhong
Could you help file one issue to track it on Blivet and set dependency, the component should be python-blivet

> Should we keep this bug open? Apparently no changes to the system role are
> needed, it should be all done in Blivet.

Let's keep this bug open to track xfs resize issue on system role.
We can close it after the Blivet issue fixed.

Thanks
Yi

Comment 4 Pavel Cahyna 2020-07-31 09:15:06 UTC
@czhong, Yi, can we just reassign this bug to python-blivet ? vtrefny agrees.

Comment 5 Zhang Yi 2020-07-31 09:21:05 UTC
(In reply to Pavel Cahyna from comment #4)
> @czhong, Yi, can we just reassign this bug to python-blivet ? vtrefny agrees.

OK, agree.

Comment 6 Vojtech Trefny 2020-07-31 09:29:43 UTC
upstream PR: https://github.com/storaged-project/blivet/pull/872

Comment 7 Zhang Yi 2020-07-31 10:05:22 UTC
Hi vtrefny
Just want to confirm, blivet will only support xfs exend as xfs_growfs did, not support reduce operation, right?

Thanks
Yi

Comment 8 Vojtech Trefny 2020-07-31 10:08:51 UTC
Yes, shrinking is not supported by XFS.

Comment 13 Marek Havrila 2020-12-04 10:13:00 UTC
Pre-verified with anaconda-33.16.4.2-1.el8 and python3-blivet-3.2.2-7.el8

Comment 19 errata-xmlrpc 2021-05-18 15:55:03 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 (python-blivet bug fix and enhancement update), 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/RHBA-2021:1890