Bug 572935 - RFE: Misleading error message from mke2fs -J option
Summary: RFE: Misleading error message from mke2fs -J option
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-12 11:44 UTC by Richard W.M. Jones
Modified: 2010-05-14 16:52 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-03-12 11:44:21 UTC
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 14:54:43 UTC
sure, suppose that could be changed, to be clearer.  Maybe even "device with label XXX not found"

Comment 2 Eric Sandeen 2010-04-01 19:28:22 UTC
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 16:00:17 UTC
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 16:39:23 UTC
(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 16:52:44 UTC
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.