Bug 572935 - RFE: Misleading error message from mke2fs -J option
RFE: Misleading error message from mke2fs -J option
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: e2fsprogs (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-12 06:44 EST by Richard W.M. Jones
Modified: 2010-05-14 12:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-14 12:52:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-03-12 06:44:21 EST
Description of problem:

Normally you can specify a UUID for creating a filesystem with an external
journal, eg:

/sbin/mke2fs -t ext2 -J device=UUID=298765c4-c6a7-49a6-b53b-9df92aad9ebe -b 4096 /dev/vda2

That works fine.  However, if you typo the UUID string, then you get this
misleading error message:

/sbin/mke2fs -t ext2 -J device=UUID=12345678 -b 4096 /dev/vda2 
Bad journal options specified.

Journal options are separated by commas, and may take an argument which
	is set off by an equals ('=') sign.

Valid journal options are:
	size=<journal size in megabytes>
	device=<journal device>

The journal size must be between 1024 and 10240000 filesystem blocks.

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

e2fsprogs-1.41.10-5.fc13.i686

How reproducible:

Always.

Expected results:

It should say something like 'device does not exist'.
Comment 1 Eric Sandeen 2010-03-12 09:54:43 EST
sure, suppose that could be changed, to be clearer.  Maybe even "device with label XXX not found"
Comment 2 Eric Sandeen 2010-04-01 15:28:22 EDT
Sent a patch upstream for this:

# mke2fs -j  -J device=UUID=12345678 /dev/sdb5 

Could not find journal device matching UUID=12345678

Bad journal options specified.

....

http://marc.info/?l=linux-ext4&m=127015000013807&w=2

-Eric
Comment 3 Eric Sandeen 2010-05-14 12:00:17 EDT
Ok, patch is committed upstream:

From: Eric Sandeen <sandeen@redhat.com>
Date: Thu, 1 Apr 2010 19:26:30 +0000 (-0500)
Subject: mke2fs: be explicit if external journal device is not found
X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=1bb14a22b5ea31ce4b9b5d9d8c7e75f02fad77ee

mke2fs: be explicit if external journal device is not found

This for RH bug #572935 -
RFE: Misleading error message from mke2fs -J option

If the journal device UUID is typo'd or otherwise not found,
the error message looks like it's a usage() type of problem.

It'd be helpful to explicitly say that the device requested
could not be found.

Addresses-Red-Hat-Bug: #572935

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---

Any particular desire for a fix pushed to F13 or should I just move this to rawhide and we'll pick it up when the next e2fsprogs is released?

Thanks,
-Eric
Comment 4 Richard W.M. Jones 2010-05-14 12:39:23 EDT
(In reply to comment #3)
> Any particular desire for a fix pushed to F13 or should I just move this to
> rawhide and we'll pick it up when the next e2fsprogs is released?

Just rawhide is fine for me.
Comment 5 Eric Sandeen 2010-05-14 12:52:44 EDT
Ok, I'm going to take it one step further and close it NEXTRELEASE, Ted should have updated e2fsprogs soon and then it'll be in rawhide.

Thanks for the report, that's a useful fix.

-Eric

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