SHIFT-WIKI

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


netappchangeip

Change NetApp Filer IP Address And Hostname

Changing the IP address of a NetApp filer is easy enough. The ONTAP operating system allows the use of the ifconfig command which is not that hard to use. What is a little bit harder is making sure the filer keeps working if it has a partner for failover functionality. My approach changes the IP address, the hostname and all other options I could find that are necessary to successfully chanhe the IP information without a reboot. By editing the /etc/rc and the /etc/hosts files you can change the current configuration and make sure the changes are persistent over reboots. Afterwards a few settings need to change as well.

Prepare And Backup

Before you continue, make a backup of your current /etc/rc and /etc/hosts files. Simply print them to the screen using the rdfile command is enough so you can copy them to a text file in your own documentation. This is because you can't edit the files, you have to recreate them from scratch. Use the rdfile command like this:

filer01a> rdfile /etc/rc
filer01a> rdfile /etc/hosts

Now, another thing befor you continue is to notice if the network change will cause a failover. There are two options that need to be checked, the ifconfig command in the /etc/rc file you just made a backup of and the cf.takeover.on_network_interface_failure option:

ifconfig e0a `hostname`-e0a netmask 255.255.0.0 flowcontrol full partner xxx.xxx.xxx.xxx

Note that if the nfo option is enabled a failover can occur:

  • nfo
    • Specifies that negotiated failover is to be enabled for the network interface.
  • -nfo
    • Specifies that negotiated failover is to be disabled for the network interface.
filer01a> options cf
cf.giveback.auto.cifs.terminate.minutes 5
cf.giveback.auto.enable      off
cf.giveback.auto.terminate.bigjobs on
cf.giveback.check.partner    on
cf.hw_assist.enable          on
cf.hw_assist.partner.address 10.18.1.32
cf.hw_assist.partner.port    4444
cf.quickloop.enable          false      (same value required in local+partner)
cf.takeover.change_fsid      on
cf.takeover.detection.seconds 15
cf.takeover.on_disk_shelf_miscompare off
cf.takeover.on_failure       on
cf.takeover.on_network_interface_failure off
cf.takeover.on_network_interface_failure.policy all_nics   (same value in local+partner recommended)
cf.takeover.on_panic         on
cf.takeover.on_short_uptime  on

As you can see, nfo is not configured and the cf.takeover.on_network_interface_failure is set to off. So the filer will not failover during a network failure. If you want to be sure even more you could issue the cf disable command, but this is not required. Just set the cf.takeover.on_network_interface_failure option to off and you're fine. If you do disable cf, make sure to issue cf enable afterwards to enable failover again.

Create New RC and HOSTS Files

Now create a temporary copy of the backups you created from the /etc/rc and /etc/hosts files and make your required changes, which should include:

  • /etc/rc:
    • hostname
    • IP address partner
    • set default route
  • /etc/hosts:
    • own IP address
    • hostname (for all references and NICs)

In my case these files now look like this:

Node A:

#Created by sjoerd 20130201 - changed IP address and hostname
hostname filer02a
ifconfig e0a `hostname`-e0a netmask 255.255.0.0 flowcontrol full partner 10.16.110.74
route add default 10.16.103.100 1
routed on
options dns.domainname prd.domain
options dns.enable on
options nis.enable off
savecore

#Created by sjoerd 20130201 - changed IP address and hostname
127.0.0.1 localhost
10.16.110.73   filer02a filer02a-e0a
# 0.0.0.0       filer02a-e0M
# 0.0.0.0       filer02a-e0b

Node B:

#Created by sjoerd 20130201 - changed IP address and hostname
hostname filer02b
ifconfig e0a `hostname`-e0a netmask 255.255.0.0 flowcontrol full partner 10.16.110.73
route add default 10.16.103.100 1
routed on
options dns.domainname prd.domain
options dns.enable on
options nis.enable off
savecore

filer01b> rdfile /etc/hosts
#Created by sjoerd 20130201 - changed IP address and hostname
127.0.0.1 localhost
10.16.110.74   filer02b filer02b-e0a
# 0.0.0.0       filer02b-e0M
# 0.0.0.0       filer02b-e0b

Now use the wrfile command to recreate the files and copy (or type) the correct body in the config files. Use the wrfile command like this:

filer01a> wrfile /etc/rc
filer01a> wrfile /etc/hosts
Note: The wrfile command requires a last empty line. When done use CTRL+C to save the file. Always use rdfile to check the files afterwards, and if the last line is missing you forgot to add the last empty line.

Use Source To Reread the Configuration Files

Before using source to set the new configuration issue route delete default to delete the old default route. Without it a new route will not be set.

Now you can use the command source to automatically issue all commands in the files. Note that source just simply issues all commands in the file, and does not stop on errors. Afterwards the IP address will be set and the hostname will be set.

Additional Configuration

There are now two more things to do. Although the configuration file hold a command to set the new default route, some old routing information could still be available. To see the route information issue netstat -rn. For more information about route information on a NetApp see NetApp: Add Route.
Also, the partner was set in the rc file, but without a reboot you also need to set the option cf.hw_assist.partner.address:

filer02b> options cf.hw_assist.partner.address 10.16.110.73
Validating the new hw-assist configuration. Please wait...
cf hw_assist Error: can not validate new config.
 No response from partner(filer02a), timed out.

If you get the time-out message (like I did, I always get that one… ) you can use these command to see if cf is working:

cf status
cf partner
cf monitor

For more information on cf failover configuration see this article which describes the initial setup of a filer.

Note this error will popup if you haven't set the above option:
[filer02a: cf.hwassist.socBindFailed:error]: Cluster hw_assist: bind failed to port 4444 on IP address xxx.xxx.xxx.xxx

The IP address in the errorline will be the old IP address of the partner.

Test

Now you will be able to test the network configuration:

filer02b> ping 10.16.110.74
10.16.110.74 is alive
filer02b> ping 10.16.110.73
10.16.110.73 is alive

filer02b> netstat -rn
Routing tables

Internet:
Destination      Gateway            Flags     Refs     Use  Interface
default          10.16.103.100     UGS         0        0  e0a
127              127.0.0.1          UGS         0    10068  lo
127.0.0.1        127.0.0.1          UH          1      149  lo
10.16           link#2             UC          0        0  e0a
10.16.4.27      2:0:0:8c:14:1      UHL         0        1  e0a
10.16.103.100   link#2             UHL         1        0  e0a
10.16.123.123   0:50:56:89:1:68    UHL         0        6  e0a
10.16.135.67    2:0:0:8c:4c:c6     UHL         0        1  e0a
10.16.196.75    44:37:e6:3e:ce:f   UHL         0        3  e0a
10.16.255.255   ff:ff:ff:ff:ff:ff  UHL         0        6  e0a
netappchangeip.txt · Last modified: 2021/09/24 00:24 by 127.0.0.1