Where am I? It’s dark and I’ve lost my network settings! How innocuous editing of NetApp config file can lead to lost IPsPosted: February 24, 2012
So I was performing an initial configuration of a FAS3270 the other day when I changed the interface group information via PuTTY. Specifically, I deleted and recreated the interface groups manually instead of running setup. After I did this and following a reboot of the filer, the IP addresses for both interface groups were missing. Performing an ‘ifconfig -a’ before the reboot, I saw the IP addresses assigned correctly:
And after the reboot, this is what I saw:
What happened to the IP addresses? The /etc/rc file appeared correct:
And the /etc/hosts file had the correct entries:
Once rebooted, the filer should replace the ‘hostname’ string in the /etc/rc file with the IP address referenced in the /etc/hosts file. All looks good. It turns out another engineer I was working with, Chris H., had run across this problem before. Again, I edited this particular filer manually with ‘ifgrp’ and ‘ifconfig’ rather than running setup and letting the filer edit the relevant text files itself. As so many folks do, I was running a console session from a Windows laptop and copying, editing, and pasting the lines to and from Windows Notepad. Apparently, the problem was that I used the wrong apostrophe, of all things.
The offending apostrophes exist on the ‘ifconfig’ lines in the /etc/rc file, here:
When I edited this file in Notepad, I used the apostrophe that exists on the quotation mark key on the standard US keyboard layout. As Chris showed me, I should have used the reverse apostrophe instead, which is colocated with the tilde (~) above the tab key.
So the proper /etc/rc file looks like this:
Notice the backward tilt of the apostrophes here. After a reboot with the proper symbol, the IP settings stuck. Even while editing the /etc/rc directly within Data ONTAP via a console session, one can still input the wrong apostrophe. I also used Notepad++ with the same results. I don’t necessarily suggest not editing NetApp configuration files manually, but you should know the intricacies of doing so. Then again, running setup again for interface groups shouldn’t harm much. Setup keeps your previously entered values so you should be able to skip right to what you wish to edit without affecting other settings. Cheers!