#1067 PR merged: Patch for newer versions of XFS with enabled CRC

Labels: enhancement, fixed / solved / done

gozora opened issue at 2016-11-13 13:38:

See #1065.
If Self-Describing Metadata (CRC) is enabled on boot filesystem, and xfs_admin updates filesystem UUID, this sets incompatible flag (IF) to prevent older kernels to mount this filesystem.
Site effect of IF is that grub-install (resp. grub-probe) fails with unknown filesystem message, which prevents ReaR to correctly install boot loader.

jsmeix commented at 2016-11-14 11:01:

@gozora
I would keep it simpler and be more brutal - I meant straightforward ;-)
Just actually run the better/newer command first and
if that worked be happy but if it fails fall back to the old method.
Cf.
https://github.com/rear/rear/issues/1065#issuecomment-260299845
and see my
https://github.com/rear/rear/pull/894/files
implementation for (ext*) filesystems.

gozora commented at 2016-11-14 11:42:

Hello @jsmeix,
This was first thing I've tryed (just to run command and collect return value, if it fails run something different).
I had to do something wrong though, because as soon as first command failed ReaR aborted with message that error occured and I should review disklayout.conf or diskrestore.sh (don't remember exact message but I guess you know what I'm talking about).
But maybe I just used wrong code (if I remember correctly, it was something like):

mkfs.xfs -m uuid=<uuid> ...
if [ $? -ne 0 ]; then
    mkfs.xfs -f ..
    xfs_admin -U <uuid> ...
fi

But I'll try style you've used in #894 and see how it behaves.

Thanks

V.

jsmeix commented at 2016-11-14 12:03:

@gozora
regarding "as soon as first command failed ReaR aborted"
have in mind that in 130_include_filesystem_code.sh
you generate code that is added (e.g. "echoed") into the
diskrestore.sh script and (in contrast to the rest of ReaR)
the diskrestore.sh script runs with

set -e
set -x

gozora commented at 2016-11-15 19:07:

Hello @gdha, @jsmeix
Hope that with commit bc09f447b18ede0218677d68dd7eb06c28152b13 is all ok now.
Must admit that I like "simpler and be more brutal" way much more ;-).

jsmeix commented at 2016-11-16 09:49:

@gozora
because you wrote "Hope that ... is all ok now."
I ask if you had tested it and if it works for you?

gozora commented at 2016-11-16 10:05:

:-)
Yes, tested on Centos 7.2 (for Disabled CRC boot) and for Ubuntu Mate 16.4 (for CRC enabled boot).

jsmeix commented at 2016-11-16 10:13:

Then I can "just merge" it.

@gozora
as always:
Many thanks for your continuous valuable contributions to ReaR!

gozora commented at 2016-11-16 11:14:

@jsmeix
as always:
You are welcome ;-)


[Export of Github issue for rear/rear.]