Thursday, December 5, 2013

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

This problem is caused due to rman  the backup location is  NFS file system if the NFS file system has the wrong Permissions or Stale then the error occurs while Restoring to Resolve it   .. we need to umount the mount point and mount with the correct parameters
Check whether the   RMAN is  configured  to store the backup's in the O/S file system path 
In the below example /shared is the nfs file system 
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/shared/oracle/%U';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/shared/oracle/%F';
Once this parameter is configured and your default device is disk then all the backups will be place in the particular path by rman
when we run the recovery script to Restore the backup then the backup piece is not readable due to the mount point and the below error Message will be displayed 
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /shared/oracle/c-728861041-20120710-02
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /shared/oracle/c-728861041-20120710-02
ORA-19505: failed to identify file "/shared/oracle/c-728861041-20120710-02"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
Additional information: 9
failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /shared/oracle/14nfonv7_1_1
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /shared/oracle/14nfonv7_1_1
ORA-19505: failed to identify file "/shared/oracle/14nfonv7_1_1"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
Additional information: 9
Here the file which is inside the /shared is not readable by the destination machine so we need to check the mount parameters for the /shared
192.168.5.90:/shared on /shared type nfs (rw,rsize=8192,wsize=8192,timeo=14,intr,addr=192.168.5.90)
 stop all the Process which is running on the /shared and then 
umount /shared
Now  we have to mount the /shared by giving the necessary parameters

mount -o rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768,tcp 192.168.5.90:/shared /shared

If the server is the NFS file system then you have to specify which NFS version and for the fake nfs we need not specify the version 
execute the command in both of the servers
Starting restore at 11-JUL-12
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2828 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: copied control file copy
input file name=/shared/oracle/control01.dbf
output file name=/u06/app/oracle/oradata/datafile/control01.ctl
output file name=/u06/app/oracle/oradata/datafile/control02.ctl
Finished restore at 11-JUL-12

Wednesday, December 4, 2013

Shut Down or Reboot a Solaris System

Shut Down or Reboot a Solaris System

Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn’t any data loss.
For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.

ShutdownYou have more than one command option that you can use. The best command is this, executed as root:
shutdown -y -i5 -g0
This will immediately shut the system down. You can also use the older command that still works:
sync;sync;init 5
You can even use:
poweroff
Reboot If you are trying to reboot the system as opposed to turning it off, you could use:
shutdown -y -i6 -g0
Or:
sync;sync;init 6
Or even:
reboot

Monday, December 2, 2013

How do I restart sshd on my Linux/Unix system

After you have changed your configuration on your remote Unix/linux server you must restart your ssh service. The easiest way to do this is to simply restart your Unix machine. This is not always possible however.
To restart sshd without restarting your whole system, enter the following command as root

RedHat and Fedora Core Linux

/sbin/service sshd restart

Suse linux

/etc/rc.d/sshd restart

Debian/Ubuntu

/etc/init.d/sshd restart

Solaris 9 and below

/etc/init.d/sshd stop
/etc/init.d/sshd start

Solaris 10

svcadm disable ssh
svcadm enable ssh

AIX

stopsrc -s sshd
startsrc -s sshd

HP-UX

/sbin/init.d/secsh stop
/sbin/init.d/secsh start

Reference: http://www.starnet.com/xwin32kb/restart_sshd