The filer executes the commands in the /etc/rc file on the root volume at boot time to configure the filer.
If your filer is licensed to run the CIFS protocol, the /etc/rc file must be present at boot time for the CIFS protocol to be enabled. No CIFS-specific information is entered in /etc/rc as a result of the setup procedure.
All the commands in the /etc/rc file are executable from the command line--there are no commands that are restricted to being executed from within the /etc/rc file.
The following table describes how to make changes in the filer configuration that take effect every time the filer is booted.
| Step | Action |
|---|---|
| 1 | Make a backup copy of the /etc/rc file. |
| 2 |
Edit the /etc/rc file.
Note: Do not add CIFS commands in /etc/rc. See "Editing configuration files" for instructions about editing files from NFS and CIFS clients. |
| 3 | Save the edited file. |
| 4 | Reboot the filer to test the new configuration. If the new configuration does not work as desired, repeat Steps 2 through 4. |
The best way to understand the commands used in /etc/rc on the root volume is to examine the following sample /etc/rc file:
#Auto-generated /etc/rc Fri May 30 14:51:36 PST 1997
hostname toaster
ifconfig e0 `hostname`-0
ifconfig e1 `hostname`-1
ifconfig fi0 `hostname`-fi0
ifconfig a5 `hostname`-a5
route add default MyRouterBox
routed on
options dns.domainname netapp.com
options dns.enable on
options nis.domainname netapp.com
options nis.enable on
timezone US/Pacific
savecore
exportfs -a
nfs on
The following table explains the commands in the sample /etc/rc file.
| Command | Explanation |
|---|---|
hostname toaster |
Sets the filer's host name. |
ifconfig e0 `hostname`-0 |
Sets the IP address for the filer's Ethernet, Gigabit Ethernet, FDDI (Fiber Distributed Data Interface), and ATM (Asynchronous Transport Mode) interfaces with a default network mask. The arguments in single backquotes expand to "toaster" if you specify "toaster" as the host name during setup. The actual IP addresses are obtained from the /etc/hosts file on the root volume; you might prefer to enter IP addresses directly in /etc/rc on the root volume. If the specified network interface is not present, ifconfig issues an error message and has no other effect. The actual interface names and numbers depend on the filer model. Refer to "Naming conventions for network interfaces" for more information about interface names. If you change the filer's host name, you must modify the /etc/hosts file on the root volume to substitute the new host name. If you don't, ifconfig fails. To override the default network mask, explicitly specify the network mask in the ifconfig command after the host name; for example: ifconfig e1 `hostname`-1 netmask 255.255.0.0 route add default LocalRouter 1 The preceding command specifies the default router. You can add route commands to /etc/rc on the root volume to set static routes for the filer. The network address for LocalRouter must be in /etc/hosts on the root volume. |
routed on |
Starts the routing daemon. See "Routing" for more information about routing. |
options dns.domainname netapp.com options dns.enable on |
These options set the DNS domain. |
options nis.domainname netapp.com |
These options set the NIS domain name and enable NIS. |
timezone US/Pacific |
Sets the time zone. The argument to the timezone command specifies which file in the /etc/zoneinfo directory on the root volume describes the time zone you want. |
savecore |
Saves the core file from a system panic, if any, in the /etc/crash directory on the root volume. Core files are created only during the first boot after a system panic. |
exportfs -a |
Exports all directories specified in the /etc/exports file on the root volume. This command is included only if the filer runs NFS. |
nfs on |
Turns on NFS file service. This command is included even if NFS is not licensed for your filer. When the filer runs this command from /etc/rc on the root volume on a filer without an NFS license, the command fails and the following messages appear: NFS service is not licensed. (Use the "license" command to license it.) NFS server is NOT running. |
Regardless of whether SNMP is enabled at your site, add the following commands to /etc/rc on the root volume:
snmp contact "your email and telephone number"
snmp location "location of your filer"
snmp init 1
For example:
snmp contact "jdoe@abc.com 415-555-1212"
snmp location "ABC corporation, engineering lab"
snmp init 1
The information provided by these commands enables Network Appliance Technical Support to contact you after receiving automatic email messages about your filer from your site. For information about automatic email messages, refer to "Sending automatic email to Network Appliance."
Copyright © 1999, Network Appliance, Inc. All rights reserved.
Part No. 210-02334
File: routin13.htm
Last updated: 04/26/99 08:11:10