So you need to connect to your Netapp filer via rsh. Maybe for example you wish to coordinate the snapshot on a volume with some other specific events in a script, as I did to perform consistent Oracle database backups.
So how do you set it up for this?
First we need to check that the Netapp settings allow rsh, it is allowed by default but it is worth us checking. Login to the filer via telnet and checks the rsh.enable parameter:
Netapp_filer> options rsh.enable
rsh.enable on
If it is set to off, we will need to turn it on with:
Netapp_filer> options rsh.enable=on
Now we need to allow our host to connect via rsh. We will also define it for a specific user as we don't want to.make the system too insecure by letting everyone run system commands on the filer!
First we need read/write access to the root filesystem on the Netapp, so we need to share the /vol/vol0 volume with read/write permissions through the nfs section of the GUI - I am not going to document that step here as it is a common task when setting up nfs shares. I will however remind you to hit the "export all" button once you have set it up, otherwise you will be left scratching your head as to why you cannot mount the filesystem as expected!
Now navigate to the /etc directory of this filesystem, and make a backup of the hosts and hosts.equiv files:
Linux> cd /vol0/etc
Linux> cp hosts hosts_080211
Linux> cp hosts.equiv hosts.equiv_080211
We know need to add our host to the hosts file, I.e. add the line:
1.2.3.4 our_host
Then we need to add the hostname and account name to the hosts.equiv file. Here we are using the Oracle account so the line we will add is:
our_host oracle
Once this is complete, we should be able to confirm the rsh command is working. To test try the following command whilst logged into the oracle account on our_host:
rsh -l root Netapp_filer df -k
This should return the df output of the filesystem on the Netapp filer.
So how do you set it up for this?
First we need to check that the Netapp settings allow rsh, it is allowed by default but it is worth us checking. Login to the filer via telnet and checks the rsh.enable parameter:
Netapp_filer> options rsh.enable
rsh.enable on
If it is set to off, we will need to turn it on with:
Netapp_filer> options rsh.enable=on
Now we need to allow our host to connect via rsh. We will also define it for a specific user as we don't want to.make the system too insecure by letting everyone run system commands on the filer!
First we need read/write access to the root filesystem on the Netapp, so we need to share the /vol/vol0 volume with read/write permissions through the nfs section of the GUI - I am not going to document that step here as it is a common task when setting up nfs shares. I will however remind you to hit the "export all" button once you have set it up, otherwise you will be left scratching your head as to why you cannot mount the filesystem as expected!
Now navigate to the /etc directory of this filesystem, and make a backup of the hosts and hosts.equiv files:
Linux> cd /vol0/etc
Linux> cp hosts hosts_080211
Linux> cp hosts.equiv hosts.equiv_080211
We know need to add our host to the hosts file, I.e. add the line:
1.2.3.4 our_host
Then we need to add the hostname and account name to the hosts.equiv file. Here we are using the Oracle account so the line we will add is:
our_host oracle
Once this is complete, we should be able to confirm the rsh command is working. To test try the following command whilst logged into the oracle account on our_host:
rsh -l root Netapp_filer df -k
This should return the df output of the filesystem on the Netapp filer.