RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1854189 - [RHEL7] storage: format entire disk with ext4 fs will be failed
Summary: [RHEL7] storage: format entire disk with ext4 fs will be failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rhel-system-roles
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Cahyna
QA Contact: Zhang Yi
URL:
Whiteboard: role:storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-06 17:09 UTC by Zhang Yi
Modified: 2021-08-31 08:10 UTC (History)
4 users (show)

Fixed In Version: rhel-system-roles-1.0.1-2.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-31 08:04:35 UTC
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/linux-system-roles storage issues 122 0 None None None 2020-09-07 02:55:04 UTC
Red Hat Product Errata RHBA-2021:3341 0 None None None 2021-08-31 08:04:41 UTC

Description Zhang Yi 2020-07-06 17:09:22 UTC
Description of problem:
storage: format entire disk with ext4 fs will be failed

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

---playbook---
[root@storageqe-62 storage]# cat tests/b.yml 
---
- hosts: all
  become: true
  vars:
    mount_location: '/opt/test1'
    volume_group_size: '5g'

  tasks:
    - include_role:
        name: storage

    - include_tasks: get_unused_disk.yml
      vars:
        min_size: "{{ volume_group_size }}"
        max_return: 1

    - name: tests default fs
      block:
        - name: tests default fs
          include_role:
            name: storage
          vars:
            storage_volumes:
              - name: images
                type: disk
                fs_type: 'ext4'
#                fs_create_options: '-F'
                disks: "{{ unused_disks }}" 
                mount_point: /opt/images

---execution log---
TASK [storage : manage the pools and volumes to match the specified state] *******************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:104
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419 && echo ansible-tmp-1594026521.65-26203-200113320838419="` echo /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419 `" ) && sleep 0'
Using module file /root/test/storage/library/blivet.py
<localhost> PUT /root/.ansible/tmp/ansible-local-25540Evjebv/tmpuruiKs TO /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419/AnsiballZ_blivet.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419/ /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1594026521.65-26203-200113320838419/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_blivet_payload_UdK0Ld/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1173, in run_module
  File "/usr/lib/python2.7/site-packages/blivet3/actionlist.py", line 48, in wrapped_func
    return func(obj, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/blivet3/actionlist.py", line 327, in process
    action.execute(callbacks)
  File "/usr/lib/python2.7/site-packages/blivet3/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/blivet3/deviceaction.py", line 637, in execute
    options=self.device.format_args)
  File "/usr/lib/python2.7/site-packages/blivet3/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/blivet3/formats/__init__.py", line 515, in create
    self._create(**kwargs)
  File "/usr/lib/python2.7/site-packages/blivet3/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/blivet3/formats/fs.py", line 409, in _create
    raise FormatCreateError(e, self.device)
fatal: [localhost]: FAILED! => {
    "actions": [], 
    "changed": false, 
    "crypts": [], 
    "invocation": {
        "module_args": {
            "disklabel_type": null, 
            "packages_only": false, 
            "pools": [], 
            "safe_mode": true, 
            "use_partitions": null, 
            "volumes": [
                {
                    "_device": "/dev/sdd", 
                    "_mount_id": "/dev/sdd", 
                    "_raw_device": "/dev/sdd", 
                    "disks": [
                        "sdd"
                    ], 
                    "encryption": false, 
                    "encryption_cipher": null, 
                    "encryption_key_file": null, 
                    "encryption_key_size": null, 
                    "encryption_luks_version": null, 
                    "encryption_passphrase": null, 
                    "fs_create_options": "", 
                    "fs_label": "", 
                    "fs_overwrite_existing": true, 
                    "fs_type": "ext4", 
                    "mount_check": 0, 
                    "mount_device_identifier": "uuid", 
                    "mount_options": "defaults", 
                    "mount_passno": 0, 
                    "mount_point": "/opt/images", 
                    "name": "images", 
                    "raid_chunk_size": null, 
                    "raid_device_count": null, 
                    "raid_level": null, 
                    "raid_metadata_version": null, 
                    "raid_spare_count": null, 
                    "size": 0, 
                    "state": "present", 
                    "type": "disk"
                }
            ]
        }
    }, 
    "leaves": [], 
    "mounts": [], 
    "msg": "Failed to commit changes to disk: (FSError('format failed: 1',), u'/dev/sdd')", 
    "packages": [
        "dosfstools", 
        "xfsprogs", 
        "e2fsprogs", 
        "lvm2"
    ], 
    "pools": [], 
    "volumes": []
}

PLAY RECAP ***********************************************************************************************************************************************************************************************
localhost                  : ok=31   changed=0    unreachable=0    failed=1    skipped=19   rescued=0    ignored=0 


---cat /tmp/blivet3.log---
2020-07-06 05:08:46,224 INFO program/MainThread: Running... mke2fs -t ext4 /dev/sdd
2020-07-06 05:08:46,233 INFO program/MainThread: stdout:
2020-07-06 05:08:46,233 INFO program/MainThread: /dev/sdd is entire device, not just one partition!
2020-07-06 05:08:46,233 INFO program/MainThread: Proceed anyway? (y,n) 
2020-07-06 05:08:46,233 INFO program/MainThread: stderr:
2020-07-06 05:08:46,233 INFO program/MainThread: mke2fs 1.42.9 (28-Dec-2013)
2020-07-06 05:08:46,234 DEBUG program/MainThread: Return code: 1

Comment 2 Zhang Yi 2020-07-13 09:56:10 UTC
This will blocking the whole disk formating on RHEL7.

Comment 3 Zhang Yi 2020-07-13 09:57:14 UTC
(In reply to Zhang Yi from comment #2)
> This will blocking the whole disk formating on RHEL7.

For ext4

Comment 14 errata-xmlrpc 2021-08-31 08:04:35 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 (rhel-system-roles 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:3341


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