Bug 1655580

Summary: [storage] bad error message when formatting LV with too long label
Product: Red Hat Enterprise Linux 8 Reporter: Vendula Ferschmannova <vferschm>
Component: cockpit-appstreamAssignee: Marius Vollmer <mvollmer>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Ščotka <jscotka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: mpitt, vferschm
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:39:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 1 Martin Pitt 2018-12-03 20:41:59 UTC
Marius, can you please have a look at this?

Comment 2 Marius Vollmer 2018-12-04 08:19:43 UTC
This is a known problem with the error messages produced by mkfs.xfs.

The name "lv-filesystem" is too long by one character.  If you read the error message carefully, you can see that it does indeed tell you:

    ...
    Invalid value lv-filesystem for -L option
    ...
    /* label */ [-L label (maximum 12 characters)]
    ...

I have long hemmed and hawed about this.  Should we code all the rules for valid names for all filesystem types into Cockpit?  Should mkfs.xfs produce useful error messages?

I guess it's "all of the above".  I'll make backlog item for Cockpit to do explicit pre-validation of filesystem labels.

Comment 3 Marius Vollmer 2018-12-05 09:44:28 UTC
Proposed fix: https://github.com/cockpit-project/cockpit/pull/10754

Comment 4 Marius Vollmer 2018-12-05 09:48:33 UTC
> The "Overwrite existing data with zeros" option works fine.

This option shouldn't make any difference, and I could reproduce the error message with both "Overwrite existing data with zeros" and "Don't overwrite existing data".  The only thing that matters is the length of the "Name" field.

Can you confirm?