#2459 PR merged: Let 'dd' read and write up to 1M=1024*1024 bytes at a time to speed up things

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2020-07-20 13:25:

jsmeix commented at 2020-07-20 14:08:

@gozora
while working on this I checked all dd comands in ReaR
and found one remaining dd command without a bs option
that I do not sufficiently understand to fix it myself in
backup/BLOCKCLONE/default/500_start_clone.sh (excerpt):

# BLOCKCLONE progs could be handled here
case "$(basename ${BLOCKCLONE_PROG})" in
    (ntfsclone)
        ...
    ;;
    (dd)
        dd $BLOCKCLONE_PROG_OPTS if=$BLOCKCLONE_SOURCE_DEV \
        of=$backuparchive
    ;;

where I think bs=1M could be added to also speed up things here like

    (dd)
        dd $BLOCKCLONE_PROG_OPTS if=$BLOCKCLONE_SOURCE_DEV of=$backuparchive bs=1M
    ;;

gozora commented at 2020-07-20 14:38:

Hello @jsmeix,

You can add bs option there, no problem with that.

V.

jsmeix commented at 2020-07-20 15:15:

@gozora
I also found analogous code in restore/BLOCKCLONE/default/400_restore_clone.sh
where I also added bs=1M.

But there is a possible issue when e.g.
BLOCKCLONE_PROG_OPTS="bs=4k" is set by the user, cf.
https://github.com/rear/rear/blob/master/doc/user-guide/12-BLOCKCLONE.adoc

Please double check
https://github.com/rear/rear/pull/2459/commits/dcdc026b72b3d2cb8bd9449bd346d1016a8cc753
and
https://github.com/rear/rear/pull/2459/commits/88c71642a7c8c86cfb3411b4482004c6bd8745d5
if I did things right.

gozora commented at 2020-07-20 15:58:

@jsmeix yes it is fine, since dd picks last option specified, BLOCKCLONE_PROG_OPT will be able to override hard-coded value and user will have the final word.

V.

jsmeix commented at 2020-07-21 09:14:

@gozora
thank you for your review!


[Export of Github issue for rear/rear.]