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 1779806 - mkfs.gfs2: creates journals too small to mount
Summary: mkfs.gfs2: creates journals too small to mount
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gfs2-utils
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.1
Assignee: Andrew Price
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-04 18:46 UTC by Robert Peterson
Modified: 2021-05-18 14:58 UTC (History)
6 users (show)

Fixed In Version: gfs2-utils-3.2.0-10.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:58:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure gfs2-utils c ea571e0e 0 None None None 2020-09-03 02:14:11 UTC
Red Hat Knowledge Base (Solution) 5368321 0 None None None 2020-09-03 02:13:33 UTC

Description Robert Peterson 2019-12-04 18:46:14 UTC
Description of problem:
The man page for mkfs.gfs2 states that the minimum journal size
is 8MB. But if you create a volume that is 500MB in size, mkfs.gfs2
will create the file system journals at 4MB, which means the file
system cannot be mounted. The mkfs.gfs2 utility needs to enforce
the 8MB minimum journal size.

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

How reproducible:
Always

Steps to Reproduce:
1. vgchange --lock-start bobsrhel8
2. lvcreate -L500M -n test_lv /dev/bobsrhel8
3. mkfs.gfs2 -b1024 -Oqplock_nolock /dev/bobsrhel8/test_lv
4. mount -tgfs2 -o noatime /dev/bobsrhel8/test_lv /mnt/gfs2

Actual results:
mount: /mnt/gfs2: can't read superblock on /dev/mapper/bobsrhel8-test_lv.

Console / dmesg show a file system withdraw:

[  108.701890] gfs2: fsid=dm-6: Now mounting FS...
[  108.707364] gfs2: fsid=dm-6.0: fatal: filesystem consistency error
[  108.707364]   inode = 1 67
[  108.707364]   function = gfs2_check_internal_file_size, file = fs/gfs2/inode.h, line = 92
[  108.724375] gfs2: fsid=dm-6.0: about to withdraw this file system
[  108.730477] gfs2: fsid=dm-6.0: withdrawn
[  108.734404] CPU: 49 PID: 10065 Comm: mount Kdump: loaded Not tainted 4.18.0-147.el8.x86_64 #1
[  108.742917] Hardware name: Dell Inc. PowerEdge R740/00WGD1, BIOS 1.4.9 06/29/2018
[  108.750396] Call Trace:
[  108.752857]  dump_stack+0x5c/0x80
[  108.756184]  gfs2_lm_withdraw.cold.1+0xe9/0xf8 [gfs2]
[  108.761243]  gfs2_consist_inode_i+0x35/0x40 [gfs2]
[  108.766035]  gfs2_jdesc_check+0xa2/0xb0 [gfs2]
[  108.770481]  init_inodes+0x4e4/0x750 [gfs2]
[  108.774666]  ? init_inodes+0x292/0x750 [gfs2]
[  108.779024]  ? snprintf+0x49/0x60
[  108.782343]  fill_super+0x819/0xae0 [gfs2]
[  108.786441]  ? vsnprintf+0x37c/0x520
[  108.790033]  ? gfs2_glock_nq_num+0x65/0xc0 [gfs2]
[  108.794736]  ? snprintf+0x49/0x60
[  108.798057]  ? __raw_spin_unlock+0x10/0x10 [gfs2]
[  108.802779]  gfs2_mount+0x255/0x280 [gfs2]
[  108.806886]  mount_fs+0x3b/0x167

Displaying the journals clearly shows they are smaller than the
minimum 8MB required:
# gfs2_edit -p journals /dev/bobsrhel8/test_lv
Block #Journal Status:       of 512000 (0x7d000) 
-------------------- Journal List --------------------
journal0: 0x43    4MB clean.
------------------------------------------------------

Expected results:
The mkfs.gfs2 util should create journals at least 8MB in size.

Additional info:

Comment 1 Andrew Price 2020-09-01 13:35:29 UTC
Upstream patch: https://pagure.io/gfs2-utils/c/ea571e0e9f8f72b30732e1c2a43a09247c3eedd9

Comment 7 Justin Payne 2021-01-14 15:29:48 UTC
Verified in gfs2-utils-3.2.0-10.el8:

[root@host-117 ~]# rpm -q gfs2-utils
gfs2-utils-3.2.0-9.el8.x86_64

[root@host-117 ~]# lvcreate -L500M -n test_lv /dev/bobsrhel8
  Logical volume "test_lv" created.
[root@host-117 ~]# mkfs.gfs2 -b1024 -Oqplock_nolock /dev/bobsrhel8/test_lv
/dev/bobsrhel8/test_lv is a symbolic link to /dev/dm-2
This will destroy any data on /dev/dm-2
[root@host-117 ~]# mount -tgfs2 -o noatime /dev/bobsrhel8/test_lv /mnt/gfs2
mount: /mnt/gfs2: can't read superblock on /dev/mapper/bobsrhel8-test_lv.

======= CONSOLE OUTPUT =======================

host-117 login: [ 7179.693421] gfs2: GFS2 installed
[ 7179.698670] gfs2: fsid=dm-2: Trying to join cluster "lock_nolock", "dm-2"
[ 7179.700305] gfs2: fsid=dm-2: Now mounting FS...
[ 7179.706607] gfs2: fsid=dm-2.0: fatal: filesystem consistency error
[ 7179.706607]   inode = 1 67
[ 7179.706607]   function = gfs2_check_internal_file_size, file = fs/gfs2/inode.h, line = 92
[ 7179.710663] gfs2: fsid=dm-2.0: about to withdraw this file system
[ 7179.712454] gfs2: fsid=dm-2.0: Journal recovery skipped for 0 until next mount.
[ 7179.714305] gfs2: fsid=dm-2.0: Glock dequeues delayed: 0
[ 7179.719564] gfs2: fsid=dm-2.0: File system withdrawn
[ 7179.720810] CPU: 0 PID: 13006 Comm: mount Kdump: loaded Not tainted 4.18.0-240.11.1.el8_3.x86_64 #1
[ 7179.722892] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[ 7179.724216] Call Trace:
[ 7179.724886]  dump_stack+0x5c/0x80
[ 7179.725688]  gfs2_withdraw.cold.10+0xd8/0x3ee [gfs2]
[ 7179.726842]  gfs2_jdesc_check+0x9c/0xb0 [gfs2]
[ 7179.727900]  init_inodes+0x56e/0x780 [gfs2]
[ 7179.728887]  ? init_inodes+0x2db/0x780 [gfs2]
[ 7179.729901]  ? snprintf+0x49/0x60
[ 7179.730691]  fill_super+0x833/0xad0 [gfs2]
[ 7179.731657]  ? vsnprintf+0x37c/0x520
[ 7179.732508]  ? gfs2_glock_nq_num+0x65/0xc0 [gfs2]
[ 7179.733620]  ? snprintf+0x49/0x60
[ 7179.734416]  ? __raw_spin_unlock+0x10/0x10 [gfs2]
[ 7179.735514]  gfs2_mount+0x255/0x280 [gfs2]
[ 7179.736482]  mount_fs+0x3b/0x167
[ 7179.737246]  vfs_kern_mount.part.35+0x54/0x120
[ 7179.738284]  do_mount+0x1fc/0xc80
[ 7179.739099]  ? memdup_user+0x61/0x70
[ 7179.739925]  ? _copy_from_user+0x37/0x60
[ 7179.740841]  ? memdup_user+0x4b/0x70
[ 7179.741685]  ksys_mount+0xb6/0xd0
[ 7179.742482]  __x64_sys_mount+0x21/0x30
[ 7179.743365]  do_syscall_64+0x5b/0x1a0
[ 7179.744236]  entry_SYSCALL_64_after_hwframe+0x65/0xca
[ 7179.745438] RIP: 0033:0x7ff3e7542a9e
[ 7179.746271] Code: 48 8b 0d ed f3 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ba f3 2b 00 f7 d8 64 89 01 48
[ 7179.750456] RSP: 002b:00007fff31392ab8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[ 7179.752226] RAX: ffffffffffffffda RBX: 000055e2b67159c0 RCX: 00007ff3e7542a9e
[ 7179.753836] RDX: 000055e2b6715ba0 RSI: 000055e2b6715c20 RDI: 000055e2b67168b0
[ 7179.755458] RBP: 00007ff3e82ed184 R08: 0000000000000000 R09: 0000000000000001
[ 7179.757103] R10: 00000000c0ed0400 R11: 0000000000000246 R12: 0000000000000000
[ 7179.758727] R13: 00000000c0ed0400 R14: 000055e2b67168b0 R15: 000055e2b6715ba0
[ 7179.760411] gfs2: fsid=dm-2.0: my journal (0) is bad: -5


[root@host-117 ~]# gfs2_edit -p journals /dev/bobsrhel8/test_lv
Block #Journal Status:       of 512000 (0x7d000) 
-------------------- Journal List --------------------
journal0: 0x43    4MB clean.
------------------------------------------------------

[root@host-117 ~]# dnf upgrade gfs2-utils-3.2.0-10.el8.x86_64.rpm 

Upgraded:
  gfs2-utils-3.2.0-10.el8.x86_64                                                                                                                                                                                                             

Complete!

[root@host-117 ~]# mount -tgfs2 -o noatime /dev/bobsrhel8/test_lv /mnt/gfs2
mount: /mnt/gfs2: can't read superblock on /dev/mapper/bobsrhel8-test_lv.

================ CONSOLE OUTPUT AFTER UPGRADE NO FS REBUILD ======================

host-117 login: [ 8040.833734] gfs2: fsid=dm-2: Trying to join cluster "lock_nolock", "dm-2"
[ 8040.837536] gfs2: fsid=dm-2: Now mounting FS...
[ 8040.855914] gfs2: fsid=dm-2.0: fatal: filesystem consistency error
[ 8040.855914]   inode = 1 67
[ 8040.855914]   function = gfs2_check_internal_file_size, file = fs/gfs2/inode.h, line = 92
[ 8040.859864] gfs2: fsid=dm-2.0: about to withdraw this file system
[ 8040.871173] gfs2: fsid=dm-2.0: Journal recovery skipped for 0 until next mount.
[ 8040.872921] gfs2: fsid=dm-2.0: Glock dequeues delayed: 0
[ 8040.874461] gfs2: fsid=dm-2.0: File system withdrawn
[ 8040.875697] CPU: 0 PID: 14697 Comm: mount Kdump: loaded Not tainted 4.18.0-240.11.1.el8_3.x86_64 #1
[ 8040.877752] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[ 8040.879171] Call Trace:
[ 8040.879808]  dump_stack+0x5c/0x80
[ 8040.880605]  gfs2_withdraw.cold.10+0xd8/0x3ee [gfs2]
[ 8040.881845]  gfs2_jdesc_check+0x9c/0xb0 [gfs2]
[ 8040.882454]  init_inodes+0x56e/0x780 [gfs2]
[ 8040.882972]  ? init_inodes+0x2db/0x780 [gfs2]
[ 8040.883504]  ? snprintf+0x49/0x60
[ 8040.883923]  fill_super+0x833/0xad0 [gfs2]

[root@host-117 ~]# mkfs.gfs2 -b1024 -Oqplock_nolock /dev/bobsrhel8/test_lv
It appears to contain an existing filesystem (gfs2)
/dev/bobsrhel8/test_lv is a symbolic link to /dev/dm-2
This will destroy any data on /dev/dm-2
[root@host-117 ~]# mount -tgfs2 -o noatime /dev/bobsrhel8/test_lv /mnt/gfs2

================ CONSOLE OUTPUT AFTER UPGRADE ==================================

Red Hat Enterprise Linux 8.3 (Ootpa)
Kernel 4.18.0-240.11.1.el8_3.x86_64 on an x86_64

host-117 login: [ 8661.244088] gfs2: fsid=dm-2: Trying to join cluster "lock_nolock", "dm-2"
[ 8661.247247] gfs2: fsid=dm-2: Now mounting FS...
[ 8661.272227] gfs2: fsid=dm-2.0: journal 0 mapped with 1 extents in 0ms
[ 8661.273776] gfs2: fsid=dm-2.0: jid=0, already locked for use
[ 8661.275091] gfs2: fsid=dm-2.0: jid=0: Looking at journal...
[ 8661.311160] gfs2: fsid=dm-2.0: jid=0: Journal head lookup took 36ms
[ 8661.312768] gfs2: fsid=dm-2.0: jid=0: Done
[ 8661.315772] gfs2: fsid=dm-2.0: first mount done, others may mount

[root@host-117 ~]# gfs2_edit -p journals /dev/bobsrhel8/test_lv
Block #Journal Status:       of 512000 (0x7d000) 
-------------------- Journal List --------------------
journal0: 0x44    8MB clean.
------------------------------------------------------

Comment 9 errata-xmlrpc 2021-05-18 14:58:31 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 (gfs2-utils 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:1641


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