#3640 PR closed: Unsupported option xfs sparse¶
Labels: enhancement, bug, won't fix / can't fix / obsolete
sebastian-koehler opened issue at 2026-09-18 05:19:¶
-
Type: Bug Fix
-
Impact: High โ
rear recovercurrently fails to (re)create the root filesystem at all on any target whosemkfs.xfspredates-i sparse=support (e.g. RHEL 7.9 / xfsprogs 4.5.0), and the failure isn't a clean abort: the disk-layout-recreation menu just keeps re-running the same failing command forever, which looks like a hang rather than an error. -
Reference to related issue (URL): None filed โ found during live end-to-end BACKUP=NBU recovery testing, not tracked as a separate issue.
-
How was this pull request tested?
Reproduced on a real RHEL 7.9 NetBackup client (
xfsprogs/mkfs.xfs4.5.0).rear recoverconsistently failed at the disk-layout-recreation step with:mkfs.xfs -f -m uuid=... -i sparse=0 ... /dev/mapper/rhel-root unknown option -i sparse=0Confirmed via the captured
rear recoverlog andlsblk/xfs_info output thatxfs_infoon this xfsprogs version already reports aspinodesattribute, but the pairedmkfs.xfsbinary doesn't accept-i sparse=at filesystem-creation time โ soxfs_parse()was generating an option the localmkfs.xfscan't handle. Validated the fix withbash -n, then deployed it into the live booted rescue environment on the same RHEL 7.9 host for arear recoverretest. -
Description of the changes in this pull request:
Adds
mkfs_xfs_supports_sparse_inodes()tousr/share/rear/lib/filesystems-functions.sh, which probes the target's ownmkfs.xfsusage output (run without a device argument) to check whether it actually supports the-i sparse=suboption, rather than assuming a fixed xfsprogs version cutoff.xfs_parse()now skips emitting-i sparse=...when the probe says it's unsupported, so filesystem recreation falls back tomkfs.xfsdefaults for that option instead of failing outright.
codacy-production commented at 2026-09-18 05:20:¶
Not up to standards โ¶
๐ด Issues 14 high ยท 9 medium
> > > **Alerts:** > โ 23 issues (โค 0 issues of at least minor severity) > > **Results:** > `23` new issues > >
| Category | >Results | >
|---|---|
| BestPractice | >8 medium |
>
| ErrorProne | >1 medium 14 high |
>
NEW Get contextual insights on your PRs based on Codacy's
metrics, along with PR and Jira context, without leaving GitHub. Enable
AI
reviewer
TIP This summary will be updated as you push new changes.
jsmeix commented at 2026-09-18 07:15:¶
@sebastian-koehler
the changes in this pull request contain too much.
It seems all changes from your other pull request
https://github.com/rear/rear/pull/3638
are included in this pull request again.
This pull request should only contain the changes
which belong to what this pull request is about which
are - as far as I see - only the changes in the file
usr/share/rear/lib/filesystems-functions.shโ
but I did not check the details if perhaps also
some parts of the changes in other files also
belong to what this pull request is about.
jsmeix commented at 2026-10-02 10:41:¶
This one is superseded by
https://github.com/rear/rear/pull/3647
[Export of Github issue for rear/rear.]