Saturday, January 7, 2012

Ignite-UX make_net_recovery, nfs mount: ux-memoirs01:/archives/ux-memoirs02: Permission denied

 Ignite server :   ux-memoirs01
 Client :             ux-memoirs02
 Location of ignite backups for clients : /archives in ux-memoirs01

     Today while taking backup using make_net_recovery for a newly configured client I am getting below error.

ERROR:   Failed to Create NFS mount Archive directory.

nfs mount: ux-memoirs01:/archives/ux-memoirs02: Permission denied

=======  01/06/12 06:16:32 IST  make_net_recovery completed unsuccessfully

Upon digging more in the  make_net_recovery log  I am able to find following  information also

ERROR:   Unable to mount or write ux-memoirs01:/archives/ux-memoirs02
         On  ux-memoirs01 you may need to:
         mkdir -p /archives/ux-memoirs02
         chown bin:bin /archives/ux-memoirs02

If the OS on  ux-memoirs01 is 11.31 or later, vi /etc/dfs/dfstab. The /etc/dfs/dfstab file on "ux-memoirs01" should contain the entry:
"share -F nfs -o sec=sys,anon=2,rw=<client> /archives/ux-memoirs02".
Where <client> is replaced by a fully qualified client name.

         After editing the /etc/dfs/dfstab file, run "shareall -F nfs"
         If you need to change the owner of the directory,
         you will also need to re-share the directory.

Otherwise, vi /etc/exports. The /etc/exports file on " ux-memoirs01" should contain the
entry: "/archives/ux-memoirs02 -anon=2,access=ux-memoirs02".

         After editing the /etc/exports file, run exportfs -av
         If you need to change the owner of the directory,
         you will also need to re-export the directory.

         See make_net_recovery(1M) for more information.

I have checked the archive location ( ux-memoirs01:/archives/)  for existence of  ux-memoirs02 (directory for client OS backup )

Yeah, its there and permissions are fine also.

$ ls -ld /archives/ux-memoirs02
drwxr-xr-x   2 bin        bin             96 Jan  6 11:49 /archives/ux-memoirs02
$

The  ignite server OS is HP-UX 11.11. NFS exports is defined in /etc/exports. lets see, whether its correct or not

$ grep ux-memoirs02 /etc/exports
/archives/ux-memoirs02 -anon=2,access=ux-memoirs02

$ showmount -e | grep ux-memoirs02
/archives/ux-memoirs02                        ux-memoirs02
$

Its correctly exported. Also same as the instruction below
"
Otherwise, vi /etc/exports. The /etc/exports file on " ux-memoirs01" should contain the
entry: "/archives/ux-memoirs02 -anon=2,access=ux-memoirs02".

         After editing the /etc/exports file, run exportfs -av"

let's give  FQDN instead  of hostname and try 

Edited /etc/exports and added FQDN
# grep ux-memoirs02 /etc/exports
/archives/ux-memoirs02 -anon=2,access=ux-memoirs02.ux-memoirs.com

Re-exported the file systems


#exportfs -av


Verify
 #showmount -e | grep ux-memoirs02
/archives/ux-memoirs02                        ux-memoirs02.ux-memoirs.com
$

Try to manually mount the directory at client.

#mount -F nfs ux-memoirs01:/archives/ux-memoirs02 /tmp/testnfs
Permission denied.

Removed FQDN and re-exported it again

There is no error in syslogs .

Then what will be the issue. Normally permission denied error will come when there is DNS issues. Lets see,

Doing nslookup for client in ignite server
$ nslookup ux-memoirs02
Using /etc/hosts on:  ux-memoirs01

looking up FILES
Name:    ux-memoirs02.ux-memoirs.com
Address:  192.168.1.2
Aliases:  ux-memoirs02
 
Doing nslookup for server in client
$ nslookup ux-memoirs01
Using /etc/hosts on:  ux-memoirs02

looking up FILES
Name:    ux-memoirs01.ux-memoirs.com
Address:  192.168.1.1
Aliases:   ux-memoirs01

Hmm still no luck...  what to do... After digging lot finally found the issue.

Doing a nslookup for client ip in  ignite/nfs server
nslookup  192.168.1.2


Using /etc/hosts on:  ux-memoirs01

looking up FILES
Name:    ux-memoirs05.ux-memoirs.com
Address:  192.168.1.2
Aliases:  ux-memoirs05

Wow this is the issue !!!

grep  192.168.1.2 /etc/hosts

192.168.1.2 ux-memoirs05.ux-memoirs.com ux-memoirs05
 192.168.1.2 ux-memoirs02.ux-memoirs.com ux-memoirs02

Issue is  same ip given for  different  hosts in /etc/hosts in ignite server/nfs server. Because of this NFS is denying  permission to mount the directory/archives/ux-memoirs02.  Host ux-memoirs05is  already decommissioned. So I removed entry it from /etc/hosts (remember to take backup of /etc/hosts). After that run make_net_recovery which successfully completed.



nohup /opt/ignite/bin/make_net_recovery -s ux-memoirs01 -a ux-memoirs01:/archives/ux-memoirs02 -P s -n 1 -x inc_entire=vg00 -x exclude=/var/adm/crash &


Here

-s - ignite server name
-a - archive_server:archive_directories
-P - When a disk or volume group is partially included in the system recovery archive, generate an ERROR   (e), WARNING (w), or SUPPRESS (s) any warning messages that would normally be generated when partial inclusions occur.
-x  inc_entire -  Includes all file systems contained on the specified disk or volume group
-x exclude - Excludes the file or directory from the archive

Finally ignite backup successfully completed !!!  Below is the status from make_net_recovery log

=======  01/06/12 11:24:13 IST  make_net_recovery completed successfully!

No comments:

Post a Comment