Koozali.org: home of the SME Server

additional lan adapter

Offline Stefano

  • *
  • 10,894
  • +3/-0
additional lan adapter
« on: October 23, 2008, 10:13:05 AM »
hi all

I have a SME 7.3 running as a guest on an ESX machine.. I have no control on ESX..

SME is setup as server only..

for backup purpose, sysadmin has connected a nas on the second physical lan adapter of ESX host, added an second virtual lan adapter on each virtual machine and told us to use it to store backup.

10.0.0.X/8 is internal lan, currently used by SME and all the other servers and clients
192.168.1.X/24 is the secondary lan for virtual servers and nas only for backup purpose.

I'm in the need of configure eth1 and make its setup persistent..

the script I'm using to backup is something like
Code: [Select]
ifup eth1
mount //nas_storage /my_mount_point
do backup into my_mount_point
umount
ifdown eth1

all is working fine, but each time I run the signal-event post-upgrade command I loose my ifcfg-eth1 file.

I've already tried to create a template in /etc/e-smth/templates-custom/etc/sysconfig/networks-scripts/ifcfg-eth1/ but without success.

any hint?

what's the SME's way to achieve this setup?

TIA

Ciao
Stefano

Offline gzartman

  • *
  • 306
  • +0/-0
    • LEI Engineering & Surveying
Re: additional lan adapter
« Reply #1 on: October 23, 2008, 11:23:57 AM »

I've already tried to create a template in /etc/e-smth/templates-custom/etc/sysconfig/networks-scripts/ifcfg-eth1/ but without success.
Ciao
Stefano

The post-upgrade event does not expand this template fragment directly.  Access the directory templates2expand in the post upgrade event and add your fragment there.

Greg
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: additional lan adapter
« Reply #2 on: October 23, 2008, 11:37:50 AM »
The post-upgrade event does not expand this template fragment directly.  Access the directory templates2expand in the post upgrade event and add your fragment there.

Greg

Hi Greg..

do you mean I have to put my template directly into /etc/e-smith/events/post-upgrade/templates2expand?

thanks
Ciao
Stefano

Offline gzartman

  • *
  • 306
  • +0/-0
    • LEI Engineering & Surveying
Re: additional lan adapter
« Reply #3 on: October 23, 2008, 09:43:16 PM »
Hi Greg..

do you mean I have to put my template directly into /etc/e-smith/events/post-upgrade/templates2expand?


It is even easier than that.  Simply create an empty file in templates2expand representing the configuration file you want to expand templates for.  For example: touch ~/templates2expand/etc/sysconfig/networkscripts/ifcfg-eth0.  Of course, you'll very likely need to create the directory where the config file lives in templates2expand first.

Greg
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: additional lan adapter
« Reply #4 on: October 24, 2008, 06:11:23 PM »
for backup purpose, sysadmin has connected a nas on the second physical lan adapter of ESX host, added an second virtual lan adapter on each virtual machine and told us to use it to store backup.

10.0.0.X/8 is internal lan, currently used by SME and all the other servers and clients
192.168.1.X/24 is the secondary lan for virtual servers and nas only for backup purpose.

I'm in the need of configure eth1 and make its setup persistent..

No, you do not have that need. Someone just needs to configure a router between 10.0.0.X/8 and 192.168.1.X/24. Or if such a router already exists, you just need to use the local networks panel so that SME server knows about the router.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: additional lan adapter
« Reply #5 on: October 24, 2008, 06:23:21 PM »
hi

@Greg: I've done.. but it did not work.

Code: [Select]
[root@rscvs network-scripts]# pwd
/etc/e-smith/events/post-upgrade/templates2expand/etc/sysconfig/network-scripts
[root@rscvs network-scripts]# ls -la
total 8
drwxr-xr-x  2 root root 4096 Oct 23 11:31 .
drwxr-xr-x  3 root root 4096 Oct 23 11:30 ..
-rw-r--r--  1 root root    0 Oct 23 11:31 ifcfg-eth1


[root@rscvs ~]# config show ExternalInterface
ExternalInterface=interface
    Broadcast=192.168.1.255
    Configuration=disabled
    Driver=pcnet32
    IPAddress=192.168.1.3
    Name=none
    Netmask=255.255.255.0
    Network=192.168.1.0

[root@rscvs ~]# more /etc/sysconfig/network-scripts/ifcfg-eth1
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------

TYPE=Ethernet
DEVICE=eth1


USERCTL=no
ONBOOT=no
PEERDNS=no

IPV6INIT=no

IPADDR=1.1.1.1

@Charlie: do you know if such a setup is possible on ESX?

I mean.. ESX physical server has 2 lan adapter, each one has been associated with different virtual network.. could be this router a virtual one?

TIA

Ciao
Stefano

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: additional lan adapter
« Reply #6 on: October 24, 2008, 07:10:11 PM »
@Charlie: do you know if such a setup is possible on ESX?

I'd be very surprised if it was not, but I don't use ESX so I don't know. [Google suggests esxcfg-route might be useful to you.]