#1715 Issue closed: Recover IBM Power "Failed to 'chown root:root"

Labels: support / question, fixed / solved / done

ToniSanC opened issue at 2018-01-29 10:11:

Relax-and-Recover (ReaR) Issue Template

  • rear version (/usr/sbin/rear -V):
    Relax-and-Recover 2.3 / 2017-12-20

  • OS version (cat /etc/rear/os.conf or lsb_release -a):
    OS_VENDOR=SUSE_LINUX
    OS_VERSION=11
    ARCH='Linux-ppc64'
    OS='GNU/Linux'
    OS_VERSION='11'
    OS_VENDOR='SUSE_LINUX'
    OS_VENDOR_VERSION='SUSE_LINUX/11'
    OS_VENDOR_ARCH='SUSE_LINUX/ppc64'

  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
    OUTPUT=ISO
    OUTPUT_URL="nfs://10.11.44.136/data1/chovihap/backup_Sistema"
    BACKUP=NETFS
    BACKUP_URL="nfs://10.11.44.136/data1/chovihap/backup_Sistema"
    BACKUP_PROG_EXCLUDE=('/hana/data/' '/hana/log/' '/hana/shared/backup/*')
    BACKUP_PROG_COMPRESS_OPTIONS=
    AUTOEXCLUDE_MULTIPATH=n

  • Brief description of the issue:

After recovering from the .gz data it shows the following errors when running the 900_create_missing_directories.sh and later in the 310_migrate_udev_rules.sh script it fails.

Press ENTER to include '/usr/share/rear/restore/default/900_create_missing_directories.sh' ...
Recreating directories (with permissions) from /var/lib/rear/recovery/directories_permissions_owner_group
Failed to 'chown root:root proc'
Failed to 'chown root:root sys'
Failed to 'chown root:root dev'
Failed to 'chown root:root dev/shm'
Failed to 'chown root:root dev/pts'
...
Press ENTER to include '/usr/share/rear/restore/SUSE_LINUX/910_create_missing_directories.sh' ...
Press ENTER to include '/usr/share/rear/restore/NETFS/default/980_umount_NETFS_dir.sh' ...
Press ENTER to include '/usr/share/rear/restore/default/990_move_away_restored_files.sh' ...
Press ENTER to include '/usr/share/rear/restore/default/995_remount_sync.sh' ...
Press ENTER to include '/usr/share/rear/finalize/default/010_prepare_checks.sh' ...
Press ENTER to include '/usr/share/rear/finalize/default/100_populate_dev.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/240_reassign_luks_keyfiles.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/250_migrate_lun_wwid.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/260_rename_diskbyid.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/300_create_mac_mapping.sh' ...
Press ENTER to include '/usr/share/rear/finalize/GNU/Linux/310_migrate_udev_rules.sh' ...
Updating udev configuration (70-persistent-net.rules)
ERROR: Could not copy '/etc/udev/rules.d/70-persistent-net.rules' -> '/mnt/local//etc/udev/rules.d/70-persistent-net.rules'
Aborting due to an error, check /var/log/rear/rear-chovihap.log for details
Terminated

/var/log/rear/rear-chovihap.log:

++ test /var/log
++ directory=var/log
++ test '->' = 755
++ test -e var/log
++ test -L var/log
++ mkdir -v -p var/log
mkdir: created directory `var/log'
++ test 755
++ chmod -v 755 var/log
mode of `var/log' retained as 0755 (rwxr-xr-x)
++ test root
++ test root
++ chroot /mnt/local /bin/bash --login -c 'chown -v root:root var/log'
chroot: failed to run command `/bin/bash': No such file or directory
++ LogPrintError 'Failed to '\''chown root:root var/log'\'' '
++ Log 'Failed to '\''chown root:root var/log'\'' '
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2018-01-29 10:00:30.532982992 '
++ test 1 -gt 0
++ echo '2018-01-29 10:00:30.532982992 Failed to '\''chown root:root var/log'\'' '
2018-01-29 10:00:30.532982992 Failed to 'chown root:root var/log'
++ PrintError 'Failed to '\''chown root:root var/log'\'' '
++ echo -e 'Failed to '\''chown root:root var/log'\'' '

/var/log/rear/rear-chovihap.log:

++ echo '2018-01-29 10:01:13.223825378 ERROR: Could not copy '\''/etc/udev/rules.d/70-persistent-net.rules'\'' -> '\''/mnt/local//etc/udev/rules.d/70-persistent-net.rules'\'''
2018-01-29 10:01:13.223825378 ERROR: Could not copy '/etc/udev/rules.d/70-persistent-net.rules' -> '/mnt/local//etc/udev/rules.d/70-persistent-net.rules'
++ PrintError 'ERROR: Could not copy '\''/etc/udev/rules.d/70-persistent-net.rules'\'' -> '\''/mnt/local//etc/udev/rules.d/70-persistent-net.rules'\'''
++ echo -e 'ERROR: Could not copy '\''/etc/udev/rules.d/70-persistent-net.rules'\'' -> '\''/mnt/local//etc/udev/rules.d/70-persistent-net.rules'\'''
++ LogToSyslog 'ERROR: Could not copy '\''/etc/udev/rules.d/70-persistent-net.rules'\'' -> '\''/mnt/local//etc/udev/rules.d/70-persistent-net.rules'\'''
++ logger -t rear -i 'ERROR: Could not copy '\''/etc/udev/rules.d/70-persistent-net.rules'\'' -> '\''/mnt/local//etc/udev/rules.d/70-persistent-net.rules'\'''

Situation of the file system /mnt/local

RESCUE chovihap:/mnt/local # du -hs *
4.0K    bin
4.0K    boot
1.9M    dev
20K     etc
4.0K    hana
4.0K    home
4.0K    lib
4.0K    lib64
16K     lost+found
12K     media
8.0K    mnt
4.0K    opt
4.0K    proc
4.0K    root
4.0K    sbin
4.0K    srv
4.0K    sys
4.0K    tmp
40K     usr
40K     var

RESCUE chovihap:~ # pwd
/root

RESCUE chovihap:~ # du -hs *
16M     bin
39M     boot
0       dev
168M    etc
39G     hana
2.7M    home
282M    lib
48M     lib64
0       lost+found
0       media
0       mnt
192K    opt
0       proc
433M    root
0       sapmnt
33M     sbin
0       selinux
576K    srv
0       sys
1.9G    tmp
13G     usr
434M    var

What is the cause?. Thanks

jsmeix commented at 2018-01-29 12:07:

@ToniSanC
my guess is:

When after backup restore in the ReaR recovery system the command

chroot /mnt/local /bin/bash --login -c 'chown -v root:root var/log'

fails with

chroot: failed to run command `/bin/bash': No such file or directory

it seems there was no bin/bash restored during backup restore
which means the recreated system (under /mnt/local) is incomplete
i.e. there is no '/mnt/local/bin/bash` file.

Check your backup.tar.gz what files it actually contains.

Probably you need to explicitly specify what to include
in the backup via the BACKUP_PROG_INCLUDE array.

ToniSanC commented at 2018-01-30 08:25:

Hello,

The result is the same:
....
Press ENTER to include '/usr/share/rear/restore/default/900_create_missing_directories.sh' ...
Recreating directories (with permissions) from /var/lib/rear/recovery/directories_permissions_owner_group
Failed to 'chown root:root proc'
Failed to 'chown root:root sys'
Failed to 'chown root:root dev'
Failed to 'chown root:root dev/shm'
Failed to 'chown root:root dev/pts'
Failed to 'chown root:root bin'
Failed to 'chown root:root boot'
....

more /etc/rear/local.conf
OUTPUT=ISO
OUTPUT_URL="nfs://xx.xx.xx.xxx/data1/chovihap/backup_Sistema"
BACKUP=NETFS
BACKUP_URL="nfs://xx.xx.xx.xxx/data1/chovihap/backup_Sistema"
BACKUP_PROG_EXCLUDE=('/hana/data/' '/hana/log/' '/hana/shared/backup/*')
BACKUP_PROG_COMPRESS_OPTIONS=n
BACKUP_PROG_INCLUDE=( '/' )
AUTOEXCLUDE_MULTIPATH=n
BOOT_OVER_SAN=y

schabrolles commented at 2018-02-10 12:46:

@ToniSanC
As @jsmeix, the following error message looks strange to me:

chroot: failed to run command `/bin/bash': No such file or directory

Could you please try again, and after the failure, run ls -l /mnt/local/bin/bash ... just to check.

Thanks.

schabrolles commented at 2018-05-07 13:39:

Hi @ToniSanC
Do you still have issue using ReaR on IBM Power ?

jsmeix commented at 2018-07-18 10:13:

Because there is no response
I assume this isssue was meanwhile somehow solved
so that I can close it hereby.

jsmeix commented at 2019-04-05 08:49:

@ciez
your
https://github.com/rear/rear/issues/1715#issuecomment-480014755
is useless because even very basic information is missing.
At least I won't try to guess what you might be talking about
when you do not provide sufficiently explanatory information
so that others have a chance to understand what is going on
in your particular case in your particular environment.

See
https://github.com/rear/rear/blob/master/.github/ISSUE_TEMPLATE.md
and use the [New issue] button on
https://github.com/rear/rear/issues

In general you may have a look at
http://relax-and-recover.org/documentation/
and
https://en.opensuse.org/SDB:Disaster_Recovery
and
https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

FWIW:
For me things work well all the time here.


[Export of Github issue for rear/rear.]