#458 Issue closed: 2nd NIC interface not configured but needed for NFS access during ReaR restore

Labels: support / question

bbeaver opened issue at 2014-09-09 21:08:

Attempting a ReaR recover from a host with multiple NIC interfaces. By default, ReaR starts up eth0 with a dhcp address. Eth1 is required in order to reach the NFS server holding the restore tarfile. I can manually configure eth1 using ifconfig, by choosing the option to exit out to the shell during the ReaR recovery, which then allows the restore to complete successfully. How can I define the necessary NICs and associated IP's within my local.conf, such that ReaR will startup the interfaces automatically? Thanks

OUTPUT=ISO
BACKUP=NETFS
BACKUP_OPTIONS="nfsvers=3,nolock"
BACKUP_URL="nfs://x.x.x.x/NFS/"
BACKUP_TYPE=incremental
FULLBACKUPDAY="Mon"

bbeaver commented at 2014-09-10 17:07:

I suppose this would be one place to handle this situation, by defining the necessary ifconfig command within the PRE_RECOVER_SCRIPT variable below:

call this before Relax-and-Recover starts to do anything in the recover workflow. You have the rescue system but nothing else

PRE_RECOVERY_SCRIPT=

gdha commented at 2014-09-20 02:26:

what was the content of /etc/scripts/system-setup.d/60-network-devices.sh?

bbeaver commented at 2014-09-22 01:14:

Ah...I see now what is happening within the 60-network-devices.sh. My primary NIC, (eth0), for the boxes I'm testing on use DHCP. However, my eth1 devices are static, and are part of my "storage" network, (NFS). My eth1 device doesn't get setup when attempting a rear recover, even though it is actually defined within the bottom of the 60-network-devices.sh script, because the script exits based on this logic at the top:

if USE_DHCLIENT=y then use DHCP instead and skip 60-network-devices.sh

[[ ! -z "$USE_DHCLIENT" ]] && return

Even though this causes me to manually ifconfig my interface upon doing a rear restore, I think this is OK. In a real production-like environment, servers won't be using DHCP for their primary interface, and the additional NICs will get properly defined within the 60-network-devices.sh script.

Thanks much for your help.


[Export of Github issue for rear/rear.]