New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use UserInput in some more usual places #1573
Use UserInput in some more usual places #1573
Conversation
…_layout.sh) and in 100_confirm_layout_code.sh (renamed from 100_ask_confirmation.sh) to improve that 'rear recover' can run unattended in migration mode (issue 1399)
Now for me "rear recover" in migration mode RESCUE e205:~ # rear recover ... Current disk mapping table (source -> target): /dev/sda /dev/sda Confirm or edit the disk mapping 1) Confirm disk mapping and continue 'rear recover' 2) Edit disk mapping (/var/lib/rear/layout/disk_mappings) 3) Use Relax-and-Recover shell and return back to here 4) Abort 'rear recover' (default '1' timeout 300 seconds) User confirmed disk mapping Confirm or edit the disk layout file 1) Confirm disk layout and continue 'rear recover' 2) Edit disk layout (/var/lib/rear/layout/disklayout.conf) 3) View disk layout (/var/lib/rear/layout/disklayout.conf) 4) View original disk space usage (/var/lib/rear/layout/config/df.txt) 5) Use Relax-and-Recover shell and return back to here 6) Abort 'rear recover' (default '1' timeout 300 seconds) User confirmed disk layout file Partition primary on /dev/sda: size reduced to fit on disk. Confirm or edit the disk recreation script 1) Confirm disk recreation script and continue 'rear recover' 2) Edit disk recreation script (/var/lib/rear/layout/diskrestore.sh) 3) View disk recreation script (/var/lib/rear/layout/diskrestore.sh) 4) View original disk space usage (/var/lib/rear/layout/config/df.txt) 5) Use Relax-and-Recover shell and return back to here 6) Abort 'rear recover' (default '1' timeout 300 seconds) User confirmed disk recreation script Start system layout restoration. ... |
…sh) to improve that 'rear recover' is prepared so that it could theoretically run unattended even if the diskrestore.sh failed (issue 1399)
I have a question to all ReaR maintainers: Can one of you perhaps explain to me what ( source $LAYOUT_CODE ) && break does not work because it seems this way ( source $LAYOUT_CODE ) (( $? == 0 )) && break so that the 'set -e' inside LAYOUT_CODE still makes it On plain command line such code works for me # echo 'set -e ; cat qqq ; echo hello' >script.sh # ( source script.sh ) && echo ok || echo failed cat: qqq: No such file or directory failed # echo QQQ >qqq # ( source script.sh ) && echo ok || echo failed QQQ hello ok but it seems same kind of code does not work within ReaR. |
I found the root cause of my question in In ReaR it does not work because on my SLES12 test system The bash version makes the difference here: With bash 4.x it also does not work on plain command line: # echo 'set -e ; cat qqq ; echo hello' >script.sh # ( source script.sh ) && echo ok || echo failed cat: qqq: No such file or directory hello ok # ( source script.sh ) ; (( $? == 0 )) && echo ok || echo failed cat: qqq: No such file or directory failed |
… && echo ok || echo failed' does no longer work with bash 4.x in particular not when in script.sh 'set -e' is set (issue 1399)
…' is prepared to run unattended when recreating HP SmartArray stuff (issue 1399)
@gozora via |
…pt.sh ) && echo ok || echo failed' does not work with bash 4.x in particular not when in script.sh 'set -e' is set (issue 1399)
Hello @jsmeix What I can tell you from top of my head.
cciss is no longer module to be used, HP(E) switched to hpsa some time ago. Unfortunately I don't have access to any HPE test HW right now, so I can't really tell you whether recreation of SmartArray works or not :-( V. |
Topic of creating SmarArray (SA) from OS can be even more complicated due special branch of SA called HPE Dynamic Smart Array (cf. specification link) which is "kind of" smart array but can be used only in UEFI mode and uses different Linux driver hpdsa dependent on hpsa. I actually never used ReaR feature for creating logical volumes during restore process, but rather created them manually prior V. |
I tried hard to not change what the code I only changed (i.e. cleaned up) the syntax and |
Regarding The cciss driver has been removed from RHEL7 and SLES12. If you really want cciss on RHEL7 checkout the elrepo directory. A new Smart Array driver called "hpsa" has been accepted into the main line linux kernel as of Dec 18, 2009, in linux-2.6.33-rc1. This new driver will support new Smart Array products going forward, and the cciss driver will eventually be deprecated. Accordingly my hopefully non-behavioural changes |
…ay controillers that use the cciss kernel module which will eventually be deprecated (issue 1399)
@gozora |
@jsmeix anytime ;-) |
FWIW: |
Use UserInput in 500_confirm_layout_file.sh
(renamed from 500_confirm_layout.sh)
and in 100_confirm_layout_code.sh
(renamed from 100_ask_confirmation.sh)
to improve that 'rear recover' can run
unattended in migration mode, cf.
#1399