Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
By default all RPMs are configured with a prefix of /mnt/fastpath/usr. This places the RPMs in an area of the flash storage that is persistent. For example, binary files are in /mnt/fastpath/usr/bin, the system configuration directory is in /mnt/fastpath/usr/etc and so on. In order to fit this into the more common prefix of /, a number of links are created automatically at boot time and on the installation of some RPMs:
In most cases this is all done transparently to you, and you need not being aware of the links being made at boot time. In some cases, as highlighted below, you may need to be explicitly aware of the prefix being used for the RPMs.
The crlinks.sh script, located in /sbin (/mnt/fastpath/usr/sbin), is the utility that will create all of the links from the / prefix into the /mnt/fastpath/usr prefix. It is automatically run at boot time, and should be manually run each time you create new files or directories inside /mnt/fastpath/usr.
The following illustrates how to use the crlinks.sh script:
# crlinks.sh Updating nsswitch.conf: done Creating links: bin sbin etc etc/init.d etc/rc.d #
Note that the work of crlinks.sh is done for you as part of an RPM installation, and you only need to run it manually when you are creating new configuration files or directories for existing RPMs.
Care should also be taken not to create files in /etc by accident, since these will be deleted when the switch reboots. Also, do not delete and then recreate a file in /etc. For example, do not delete /etc/resolv.conf and then copy a new file into its place. Instead copy the new file into /mnt/fastpath/usr/etc and then run crlinks.sh afterwards.
A Network File System (NFS) client is supported in the Linux kernel and can be used to mount data exported from an NFS server. If the switch does not have enough space to install applications or RPMs, you can mount a remote filesystem using NFS and download and install your applications or RPMs there. Execute cat /proc/filesystems
command in Linux Shell to find out if the Kernel supports NFS client.
# cat /proc/filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev cpuset nodev tmpfs nodev debugfs nodev sockfs nodev pipefs nodev anon_inodefs nodev rpc_pipefs nodev devpts squashfs nodev ramfs nodev nfs nodev nfs4 nodev jffs2 nodev mqueue
For information related to enabling NFS support on Linux Kernel, refer to Enable NFS Client Support in Kernel section.
Use the below command in the Linux shell to mount NFS partition.
mount -t nfs <server>:/exports/device /mnt/fastpath/usr -o nolock
Make sure to add the nolock option in the mount command in the NOS as the portmap service is not running in the NOS environment.
Note that /mnt/fastpath/usr is the mount point in the device. If the directory is not present in the device, create /mnt/fastpath/usr directory before using the above command.
Setting up an NFS server is out of the scope of this documentation. Refer to the Linux documentation for further details. Make sure the file system is exported with the no_root_squash option, for example:
/exports/device *(rw,no_root_squash,no_subtree_check)
Make sure that you use an IP address for the NFS server component, or that the NFS server name can be resolved. See the Configuring Name Resolution section for further details.
The NFS partition can be mounted at boot for devices that have NFS support in the Linux Kernel. Copy the brcm.netfs script from the scripts directory inside the examples directory in the ADK documentation to /mnt/fastpath/brcm.netfs. If this file exists then the NFS partition will be mounted at boot.
Name resolution could be done by configuring DNS as described in section DNS Configuration. You should then ensure that your /etc/resolv.conf file contains a search entry (e.g. search broadcom.com).
Alternatively you can configure name resolution using the /etc/hosts files. To do this add your NFS server name as follows. Note that this assumes your NFS server is called nfsserver and your domain is broadcom.com.
10.11.12.13 nfsserver nfsserver.broadcom.com
Note that you will also need to add a search entry to your /etc/resolv.conf file (e.g. search broadcom.com).
Once name resolution has been configured, you should ping your nfsserver server to validate connectivity.
This section describes instructions to enable NFS client in Kernel. Obtain Kernel source from Broadcom Support Portal (http://support.broadcom.com) and copy current target configuration file to top level kernel directory. The following example builds kernel for the GTO reference platform. Enable NFS by menu selection File Systems->Network File Systems->NFS Client Support
To build the new kernel into the Switch image:
If you wish to use DNS then you must create a /mnt/fastpath/usr/etc/resolv.conf with settings such as the following (these should be modified to match your network configuration):
domain mycorp.com search mycorp.com nameserver 10.10.10.10 nameserver 10.10.11.10
You should then use the crlinks.sh script, as defined in the Using the crlinks.sh Utility section, to create the /etc/resolv.conf link. This will also be automatically created for you at boot time.