[Rear-users] rear mkrescue hangs on SLES 9 (SP4)

Werner Flamme werner.flamme at ufz.de
Fri Jan 25 12:05:49 CET 2008


Hi Schlomo,

nice to read you :-) I am sorry, it isn't a VM, it is real iron, a Sun
V40z in this case. I think the problem is caused by tar in in
/usr/share/rear/build/GNU/Linux/20_copy_as_is.sh

I will try to replace tar by rsync and look what happens. But at first,
I will add a corresponding rsync call after the tar ;-)

In the log, I read

2008-01-24 11:22:55 Finished copying COPY_AS_IS
2008-01-24 11:22:55 Checking COPY_AS_IS_EXELIST
ldd: missing file arguments
Try `ldd --help' for more information.
2008-01-24 11:22:55 Including build/GNU/Linux/39_copy_binaries_libraries.sh
2008-01-24 11:22:55 Copy program files & libraries
2008-01-24 11:22:55 Binaries: /usr/sbin/grub /usr/sbin/partprobe [...]
/bin/loadkeys /bin/kbd_mode /bin/dumpkeys /usr/bin/diff /sbin/sfdisk
strip: /tmp/rear.26317/rootfs/bin/ldd: File format not recognized
strip: /tmp/rear.26317/rootfs/bin/xfs_admin: File format not recognized
strip: /tmp/rear.26317/rootfs/bin/egrep: File format not recognized
strip: /tmp/rear.26317/rootfs/bin/fgrep: File format not recognized
strip: /tmp/rear.26317/rootfs/bin/rear: File format not recognized

The "strip" infos occur on the other systems as well, but I don't have
the "ldd: missing file arguments" there.
At the moment the script hangs (it does not really 'hang', it's sed
waiting for input, since the input file parameter is empty),
$TMP_DIR/copy-as-is-filelist is empty while $TMP_DIR/copy-as-is-exclude
contains "/dev/shm/SAP*" on the 2nd line (as I configured in
/etc/rear/local.conf).

Oh - I added a line
for g in "${COPY_AS_IS[@]}" ; do echo "$g" ; done
>$TMP_DIR/copy-as-is-werner
after the "for f"... line in 20_copy_as_is.sh, and the resulting
$TMP_DIR/copy-as-is-werner is not an empty file but has 700 bytes and
contains all the files that should be copied.

Changing the tar command to
for g in "${COPY_AS_IS[@]}" ; do echo -n "$g " ; done
>$TMP_DIR/copy-as-is-filelist
tar -X $TMP_DIR/copy-as-is-exclude \
        -P -C / -v -c $TMP_DIR/copy-as-is-filelist | \
        tar -C $ROOTFS_DIR/ -xv 1>&8
does not help.

When I look into $ROOTFS_DIR/etc, I see:
/tmp/rear.2053/rootfs/etc # ls
.         bash.bashrc   event.d  hosts    ld.so.cache  modules  mtab
       passwd   scripts
..        dumpkeys.out  fstab    inittab  ld.so.conf   moduli
network.sh     profile  syslog-ng.conf
HOSTNAME  ethers        group    issue    lilo.conf    motd
nsswitch.conf  rear     syslog.conf

/etc/rear is the first entry in $TMP_DIR/copy-as-is-filelist, but the
following ones (e.g. /etc/protocols, /etc/services) do not show up. Even
the 2nd entry in COPY_AS_IS[@], /usr/share/rear, is not copied.

Now I tried -P -C / -v -c -T $TMP_DIR/copy-as-is-filelist | \ as 2nd
line, and sed is not hanging any more. BUT -X is not regarded any more
:-( - and I do not need 3+G temp files on recovery time...

Since it works on all other servers, and I saw your demo at SLAC on
SLES9, it seems to be a broken version of tar.
# tar --version
tar (GNU tar) 1.13.25
# rpm -q tar
tar-1.13.25-325.10

The tar command seems to get the right parameters, because I see in the
log (rear -d mkrescue):
tar: /etc/rear /usr/share/rear /dev /etc/protocols /etc/services
/etc/rpc /etc/termcap /usr/share/terminfo /etc/resolv.conf /etc/hosts
/etc/host.conf /etc/iproute2 /lib/modules/2.6.5-7.286-smp/modules.alias
/lib/modules/2.6.5-7.286-smp/modules.ccwmap
/lib/modules/2.6.5-7.286-smp/modules.dep
/lib/modules/2.6.5-7.286-smp/modules.ieee1394map
/lib/modules/2.6.5-7.286-smp/modules.inputmap
/lib/modules/2.6.5-7.286-smp/modules.isapnpmap
/lib/modules/2.6.5-7.286-smp/modules.pcimap
/lib/modules/2.6.5-7.286-smp/modules.symbols
/lib/modules/2.6.5-7.286-smp/modules.usbmap /etc/modules.conf
/etc/modprobe.conf /etc/modprobe.conf.local /etc/modprobe.conf.local~
/etc/modprobe.d /etc/ntp.conf /etc/ssh /root/.ssh : Cannot stat: No such
file or directory

When using "export CAIFLS=$(cat copy-as-is-filelist)" and having a
protocol with "echo $CAIFLS > caifls.log; for DAT in $CAIFLS; do echo
"--- $DAT ---"; ll $DAT; done >> caifls.log", there is no "Cannot stat"
in caifls.log. What may cause this "Cannot stat:"?

So far, so bad. now I replaced tar by rsync. The command reads:
rsync -vau --files-from=$TMP_DIR/copy-as-is-filelist \
           --exclude-from=$TMP_DIR/copy-as-is-exclude \
           / $ROOTFS_DIR/ 1>&8
and the log says:
rsync: link_stat "/etc/rear /usr/share/rear /dev /etc/protocols
/etc/services /etc/rpc /etc/termcap /usr/share/terminfo /etc/resolv.conf
/etc/hosts /etc/host.conf /etc/iproute2
/lib/modules/2.6.5-7.286-smp/modules.alias
/lib/modules/2.6.5-7.286-smp/modules.ccwmap
/lib/modules/2.6.5-7.286-smp/modules.dep
/lib/modules/2.6.5-7.286-smp/modules.ieee1394map
/lib/modules/2.6.5-7.286-smp/modules.inputmap
/lib/modules/2.6.5-7.286-smp/modules.isapnpmap
/lib/modules/2.6.5-7.286-smp/modules.pcimap
/lib/modules/2.6.5-7.286-smp/modules.symbols
/lib/modules/2.6.5-7.286-smp/modules.usbmap /etc/modules.conf
/etc/modprobe.conf /etc/modprobe.conf.local /etc/modprobe.conf.local~
/etc/modprobe.d /etc/ntp.conf /etc/ssh /root/.ssh " failed: No such file
or directory (2)

So, next step:
for g in "${COPY_AS_IS[@]}" ; do
    if [ -f "$g" -o -d "$g" ]; then
        echo "$g" >>$TMP_DIR/copy-as-is-filelist
    fi
done
Now rsync copies like hell :-) - $ROOTFS_DIR/etc is well populated now.
With the exception of the empty /etc/ssh subdir :-(

Regards,
Werner


Schlomo Schapiro   [24.01.2008 21:06]:
> Hi Werner,
> 
> I also would guess that the ssh files are not there where the sed call expects
> them to be and the bug here is that we don't verify that come files got copied.
> 
> As to why it doesn't copy the files, I don't know. If this is a VM then you
> could send it to me and I take a look, call me for other options to solve this
> problem.
> 
> Regards,
> Schlomo
> 
> Werner Flamme wrote:
>> Werner Flamme   [23.01.2008 16:34]:
>>
>> One more debug hint:
>>
>> the script now reads like this:
>> echo "$0 part 1: $ROOTFS_DIR"
>> echo "now: ls -laR $ROOTFS_DIR/etc/ss*"
>> echo '-----'
>> ls -laR "$ROOTFS_DIR/etc/ssh*"
>> echo '-----'
>>
>> And the output is:
>> Copy kernel modules OK
>> /usr/sbin/rear part 1: /tmp/rear.26317/rootfs
>> now: ls -laR /tmp/rear.26317/rootfs/etc/ss*
>> -----
>> -----
>>
>> Hm. Though I am logged in as root and there is an entry telling me that
>> /etc/ssh is copied this obviously does not happen:
>> # grep -n /etc/ssh /tmp/rear.log
>> 69:2008-01-24 11:22:55 Will copy /etc/rear /usr/share/rear /dev
>> /etc/protocols /etc/services /etc/rpc /etc/termcap /usr/share/terminfo
>> /etc/resolv.conf /etc/hosts /etc/host.conf /etc/iproute2
>> /lib/modules/2.6.5-7.286-smp/modules.alias
>> /lib/modules/2.6.5-7.286-smp/modules.ccwmap
>> /lib/modules/2.6.5-7.286-smp/modules.dep
>> /lib/modules/2.6.5-7.286-smp/modules.ieee1394map
>> /lib/modules/2.6.5-7.286-smp/modules.inputmap
>> /lib/modules/2.6.5-7.286-smp/modules.isapnpmap
>> /lib/modules/2.6.5-7.286-smp/modules.pcimap
>> /lib/modules/2.6.5-7.286-smp/modules.symbols
>> /lib/modules/2.6.5-7.286-smp/modules.usbmap /etc/modules.conf
>> /etc/modprobe.conf /etc/modprobe.conf.local /etc/modprobe.conf.local~
>> /etc/modprobe.d /etc/ntp.conf /etc/ssh /root/.ssh and exclude  /dev/shm/SAP*
>> 93:ls: /tmp/rear.26317/rootfs/etc/ssh*: No such file or directory
>>
>> Just to be sure:
>> # ll /etc/ssh
>> total 188
>> drwxr-xr-x   2 root root   4096 Jan 23 16:35 .
>> drwxr-xr-x  72 root root   8192 Jan 23 15:35 ..
>> -rw-------   1 root root 132839 Sep 19 15:12 moduli
>> -rw-r--r--   1 root root   2517 Sep 19 15:11 ssh_config
>> -rw-------   1 root root    668 Aug 31  2005 ssh_host_dsa_key
>> -rw-r--r--   1 root root    601 Aug 31  2005 ssh_host_dsa_key.pub
>> -rw-------   1 root root    526 Aug 31  2005 ssh_host_key
>> -rw-r--r--   1 root root    330 Aug 31  2005 ssh_host_key.pub
>> -rw-------   1 root root    883 Aug 31  2005 ssh_host_rsa_key
>> -rw-r--r--   1 root root    221 Aug 31  2005 ssh_host_rsa_key.pub
>> -rw-r--r--   1 root root    239 May  8  2007 sshd_banner
>> -rw-r--r--   1 root root   3013 Jan 23 16:35 sshd_config
>> -rw-r-----   1 root root   3466 Dec  2  2005 sshd_config.rpmnew
>>
>> The directory exists and contains files. But it is not copied, so no
>> files are in $OOTFS_DIR/etc/ssh. This may be the cause for sed to hang.
>> However, I'd like to know why this directory is not copied...
>>
>> Regards,
>> Werner
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Rear-users mailing list
> Rear-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rear-users
> 


-- 
Werner Flamme, Abt. WKDV
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Permoserstr. 15 - 04318 Leipzig
Tel.: (0341) 235-1921 - Fax (0341) 235-451921
http://www.ufz.de - eMail: werner.flamme at ufz.de




More information about the rear-users mailing list