Bug 1655580 - [storage] bad error message when formatting LV with too long label
Summary: [storage] bad error message when formatting LV with too long label
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Marius Vollmer
QA Contact: Jan Ščotka
Depends On:
TreeView+ depends on / blocked
Reported: 2018-12-03 13:18 UTC by Vendula Ferschmannova
Modified: 2019-06-14 01:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-06-14 01:39:16 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

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?

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