Bug 1463377 - rear won't backup network config
Summary: rear won't backup network config
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rear
Version: 6.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jakub Mazanek
QA Contact: Tereza Cerna
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 16:57 UTC by Blair Aitken
Modified: 2018-10-05 11:26 UTC (History)
5 users (show)

(edit)
Clone Of:
: 1484051 (view as bug list)
(edit)
Last Closed: 2017-08-16 16:50:10 UTC


Attachments (Terms of Use)
/bin/rear -d -v mkbackup (186.03 KB, text/plain)
2017-06-20 16:57 UTC, Blair Aitken
no flags Details
Patch proposal including basic bridged interface support (11.27 KB, patch)
2017-07-10 07:20 UTC, Renaud Métrich
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1484051 None None None Never

Internal Trackers: 1484051

Description Blair Aitken 2017-06-20 16:57:44 UTC
Created attachment 1289743 [details]
/bin/rear -d -v mkbackup

Description of problem:
~~~~~~~~~~~~~~~~~~~~~~~
I have successfully created a ReaR backup (rear -d -v mkbackup )and restored it to new hard drive but it doesn't contain network configuration (/etc/sysconfig/network-scripts is empty) when I am in recover/rescue mode.  I created /etc/rear/site.conf and added this line prior to running the backup:  

   USE_STATIC_NETWORKING=y

but it didn't work.
During recovery (rear recover) I had to run :

 o   ip addr add 10.106.51.20/24 dev bond0.441
 o   ip route add 10.106.6.172 via 10.106.51.1

in order for the restore to work.
What am I doing wrong?


Version-Release number of selected component (if applicable):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rear-1.17.2-4.el6.x86_64             Thu Jun 30 09:16:41 2016

Comment 4 Renaud Métrich 2017-06-28 14:24:08 UTC
The issue comes from the way the bridge "br0" is set up in /etc/scripts/system-setup.d/60-network-devices.sh:

ip addr add 10.106.51.20/27 dev br0
ip link set dev br0 up
ip link set dev br0 mtu 1500

The "br0" device doesn't exist unless the corresponding "brctl" command is used.

They are 2 issues here:
1. "brctl" utility is not part of the rescue image
2. "brctl addbr br0" is missing in 60-network-devices.sh

Comment 6 Renaud Métrich 2017-07-10 07:20 UTC
Created attachment 1295709 [details]
Patch proposal including basic bridged interface support

This patch has been successfully tested with the following configuration:
1. eth0 + eth1 bonded as bond0 (no IP address)
2. bond0.441 configured as vlan441 on bond0 (no IP address)
3. br0 configured as a bridge on bond0.441 (with IP address)

For now, only STP is configured for the bridge interface. This should be sufficient.
The brctl utility is includes as REQUIRED_PROGS automatically upon need.

The resulting /rootfs/etc/scripts/system-setup.d/60-network-devices.sh file is as follows:

if [ ! -d /sys/class/net/br0/bridge ]; then
    brctl addbr br0
    brctl stp br0 no
fi
ip addr add xxx/xx dev br0
ip link set dev br0 up
ip link set dev br0 mtu 1500
ip link set dev eth0 up
ip link set dev eth0 mtu 1500
ip link set dev eth1 up
ip link set dev eth1 mtu 1500
modprobe bonding max_bonds=1 miimon=100 mode=1 use_carrier=0
ip link set dev bond0 up
ifenslave bond0 eth0 eth1
sleep 5
modprobe 8021q
sleep 5
ip link add link bond0 name bond0.441 type vlan id 441
if [ ! -d /sys/class/net/br0/bridge ]; then
    brctl addbr br0
    brctl stp br0 no
fi
brctl addif br0 bond0.441
ip link set dev bond0.441 up


Note You need to log in before you can comment on or make changes to this bug.