#3412 PR merged: enhance 300_map_disks.sh script to also print the disk sizes

Labels: enhancement, fixed / solved / done

gdha opened issue at 2025-02-28 10:43:

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Enhancement

  • Impact: Normal

  • Reference to related issue (URL): #3411

  • How was this pull request tested? In a real DR test

  • Description of the changes in this pull request: The sizes of the disks will now also be saved in the ReaR log file which makes it easier to link the original disk with the new mapped one.
    Furthermore, a new script 960_save_disk_and_vgs_mappings.sh was added to assist further in the disk mapping process (even before we execute the recovery itself).

jsmeix commented at 2025-02-28 12:54:

@pcahyna
could you please - as time permits - have a look here?
I ask you because I think you know much better than me
about LVM stuff (I am out of that game here).

pcahyna commented at 2025-03-04 18:30:

@jsmeix done, sorry for the delay! Your suspicion looks justified to me.

jsmeix commented at 2025-03-05 07:35:

@pcahyna
thank you for your review and in particular
thank you for providing an example case.

When you did a review, could you then please also
select one of the choices that one gets in the
GitHub web frontend under "Review changes" on
https://github.com/rear/rear/pull/3412/files

  • Comment: Submit general feedback without explicit approval.
  • Approve: Submit feedback and approve merging these changes.
  • Request changes: Submit feedback that must be addressed before merging.

The default is "Comment".

gdha commented at 2025-03-06 10:14:

@gdha please drop the usr/share/rear/layout/save/default/960_save_disk_and_vgs_mapping.sh from commit 3cc7ee4 (it should not have been part of the commit in any case, as it is unrelated to the commit subject) and drop commits 45eed45 and 59e7694 . The rest should be OK.

@jsmeix Oops, sorry, I thought I already did that, but apparently GitHub does not like Request changes without providing a comment why (although I provided the explanation inline before). Also sorry for the delay again, I was ill yesterday.

done with it.

pcahyna commented at 2025-03-06 10:30:

@gdha thanks, looks good. Can you please squash the commits and force-push to avoid having the noise from .../960_save_disk_and_vgs_mapping.sh in the Git history? If you don't want to bother with such details, I can do it myself.

By the way, the commits are done with an unusual address: D'Haese, Gratien [GTSBE - Non JJ] <GDHAESE1@ITS.JNJ... . Is that intended? If not, this could be corrected as well when squashing (if yes, you can leave it this way of course).

pcahyna commented at 2025-03-06 11:10:

@jsmeix a note regarding

... and when it is already ensured that the ordering
of the output from both commands is same ...

no amount of ordering would make this approach correct, as disks and PVs do not need to have a 1:1 relationship. A disk can have no PVs (having just traditional file systems on top of partitions) or multiple PVs (having multiple partitions and a PV on each of these). The latter might be a bit unusual, but certainly possible.

pcahyna commented at 2025-03-06 11:29:

@gdha in your last changes there is still addition and deletion of 960_save_disk_and_vgs_mapping.sh

gdha commented at 2025-03-06 13:07:

@gdha in your last changes there is still addition and deletion of 960_save_disk_and_vgs_mapping.sh

I think I cannot prevent this as it was part of the 1st commit too.

pcahyna commented at 2025-03-06 22:16:

@gdha I removed it from the first commit and forece-pushed it. Please let me know if that's ok and if so I can merge the PR.

gdha commented at 2025-03-07 07:07:

@gdha I removed it from the first commit and forece-pushed it. Please let me know if that's ok and if so I can merge the PR.

@pcahyna Great nice job. I'm okay for the PR.

pcahyna commented at 2025-03-07 11:08:

Rebased on top of current master to fix Differential ShellCheck error.


[Export of Github issue for rear/rear.]