Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 537201

Summary: Better error reporting when mounting a gfs fs without enough journals
Product: Red Hat Enterprise Linux 5 Reporter: James G. Brown III <james.brown>
Component: gfs2-utilsAssignee: Abhijith Das <adas>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: bmarzins, iannis, pbatkowski, rpeterso, swhiteho
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gfs2-utils-0.1.62-25.el5 Doc Type: Bug Fix
Doc Text:
When the system attempted to mount a filesystem with an insufficient number of journals, the displayed error message was unclear. This occurred, because the kernel returned the -EINVAL error code, which could not be distinguished from other possible errors with the same error code. With this update, the kernel returns the -EUSERS code and prints an understandable error message.
Story Points: ---
Clone Of:
: 600387 635023 (view as bug list) Environment:
Last Closed: 2011-01-13 23:19:59 UTC Type: ---
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: 600387, 600408, 635023    
Attachments:
Description Flags
use EUSERS to signal to mount helper about insufficient journals so it doesn't display a cryptic message
none
We'd need this one-liner in gfs2-kernel as well.
none
Changed error message none

Description James G. Brown III 2009-11-12 19:13:42 UTC
Description of problem:

When trying to mount a gfs mount on a node and there are not enough journals the response is less than intuitive;

"/sbin/mount.gfs: error mounting /dev/mapper/vg0-gfs on /mnt/gfsdata: Invalid argument"

/var/log/messages does report this well and maybe I am being picky, but would like to see this after trying to mount it at the cli...

"Nov 12 20:05:53 node1 kernel: GFS: fsid=cluster12:gfsdata.2: can't mount journal #2
Nov 12 20:05:53 node1 kernel: GFS: fsid=cluster12:gfsdata.2: there are only 2 journals (0 - 1)"


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

gfs-utils-0.1.20-1.el5

How reproducible:

100%

Steps to Reproduce:
1. create a gfs fs with 2 journals
2. mount the fs on 3 machines
3. the third will report the message

Comment 1 Robert Peterson 2009-11-13 20:16:59 UTC
Changing release to 5 due to the ".el5" above.

I thought we had already fixed this.  That message is coming from
the gfs mount helper, which is a link to the gfs2 mount helper,
which is part of gfs2-utils.

Comment 6 Abhijith Das 2010-02-02 01:03:25 UTC
Created attachment 388170 [details]
use EUSERS to signal to mount helper about insufficient journals so it doesn't display a cryptic message

Comment 7 Abhijith Das 2010-02-02 01:21:58 UTC
Created attachment 388174 [details]
We'd need this one-liner in gfs2-kernel as well.

Comment 8 Abhijith Das 2010-02-05 23:08:35 UTC
Created attachment 389215 [details]
Changed error message

Comment 10 Steve Whitehouse 2010-02-12 15:30:42 UTC
Patch is posted to Linus now.

Comment 14 Abhijith Das 2010-06-04 16:31:50 UTC
Pushed patch in comment #8 to RHEL56 git branch. For the R5 gfs2 kernel fix, see bz 600387 and for R6 gfs2 kernel fix, see bz 600408

Comment 15 Steve Whitehouse 2010-07-14 09:34:01 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
The error message printed when a failed attempt to mount a filesystem with too few journals for the requested mount occurs was rather cryptic. The error code returned by the kernel has now been updated to return -EUSERS in this case which allows mount.gfs2 to distinguish this case from other possible errors and print a more understandable message.

Comment 16 Robert Peterson 2010-09-17 15:50:22 UTC
Build 2768496 successful.  Changing status to Modified.
This fix is in gfs2-utils-0.1.62-25.el5.

Comment 18 Nate Straz 2010-12-03 15:09:34 UTC
[root@dash-01 ~]# mkfs -t gfs2 -O -p lock_dlm -j 1 -t dash:grow /dev/dash/grow
Device:                    /dev/dash/grow
Blocksize:                 4096
Device Size                30.00 GB (7864320 blocks)
Filesystem Size:           30.00 GB (7864318 blocks)
Journals:                  1
Resource Groups:           120
Locking Protocol:          "lock_dlm"
Lock Table:                "dash:grow"
UUID:                      CC2A810E-F28E-8195-ED5B-EFAB5CAB2AC7

[root@dash-02 ~]# mount /dev/dash/grow /mnt/grow
[root@dash-02 ~]# mount | grep grow
/dev/mapper/dash-grow on /mnt/grow type gfs2 (rw,hostdata=jid=0:id=262146:first=1)
[root@dash-01 ~]# mount /dev/dash/grow /mnt/grow
/sbin/mount.gfs2: Too many nodes mounting filesystem, no free journals

Comment 19 Eva Kopalova 2010-12-10 13:35:15 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The error message printed when a failed attempt to mount a filesystem with too few journals for the requested mount occurs was rather cryptic. The error code returned by the kernel has now been updated to return -EUSERS in this case which allows mount.gfs2 to distinguish this case from other possible errors and print a more understandable message.+When the system attempted to mount a filesystem with an insufficient number of journals, the displayed error message was unclear. This occurred, because the kernel returned the -EINVAL error code, which could not be distinguished from other possible errors with the same error code. With this update, the kernel returns the -EUSERS code and prints an understandable error message.

Comment 21 errata-xmlrpc 2011-01-13 23:19:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0135.html