Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: HA-WG-Technical

patch to nfsserver

 

 

Linux-HA ha-wg-technical RSS feed   Index | Next | Previous | View Threaded


xwhu at suse

Nov 14, 2011, 1:07 AM

Post #1 of 2 (462 views)
Permalink
patch to nfsserver

i all,


The current nfs-utils package on most distribution obsolete the nfsserver RA.
The proposed patch attached fix that problem.


It'll be better to do a version detection for nfs-utils, so the code path
can be chosen based on the version. However, I failed to figure out how to do
that.


The patch is tested on ubuntu and openSUSE. Comments from other distributions
are welcome ;)


Thanks.
Attachments: fix-nfsserver-sm-notify.DIFF (0.56 KB)


dejan at suse

Nov 15, 2011, 6:47 AM

Post #2 of 2 (439 views)
Permalink
Re: patch to nfsserver [In reply to]

Hi Xinwei,

On Mon, Nov 14, 2011 at 02:07:10AM -0700, Xinwei Hu wrote:
> i all,
>
>
> The current nfs-utils package on most distribution obsolete the nfsserver RA.

I guess that you mean that new nfs-utils were modified in such a
way as to make the RA actions insufficient in this case.

> The proposed patch attached fix that problem.
>
>
> It'll be better to do a version detection for nfs-utils, so the code path
> can be chosen based on the version. However, I failed to figure out how to do
> that.

In case some of the new directories which are to be copied don't
exist, cp would still copy those that do exist. So, this change
should be safe.

Cheers,

Dejan

> The patch is tested on ubuntu and openSUSE. Comments from other distributions
> are welcome ;)
>
>
> Thanks.
>
>

> Index: heartbeat/nfsserver
> ===================================================================
> --- heartbeat.orig/nfsserver 2011-11-14 16:28:37.000000000 +0800
> +++ heartbeat/nfsserver 2011-11-14 16:30:00.000000000 +0800
> @@ -174,8 +174,9 @@
> prepare_directory
> bind_tree
>
> - rm -f /var/lib/nfs/sm.ha/* > /dev/null 2>&1
> - cp -f /var/lib/nfs/sm/* /var/lib/nfs/sm.ha > /dev/null 2>&1
> + rm -rf /var/lib/nfs/sm.ha/* > /dev/null 2>&1
> + cp -rf /var/lib/nfs/sm /var/lib/nfs/sm.bak /var/lib/nfs/state /var/lib/nfs/sm.ha > /dev/null 2>&1
> +
>
> ocf_log info "Starting NFS server ..."
>

> _______________________________________________
> ha-wg-technical mailing list
> ha-wg-technical [at] lists
> https://lists.linuxfoundation.org/mailman/listinfo/ha-wg-technical

_______________________________________________
ha-wg-technical mailing list
ha-wg-technical [at] lists
https://lists.linuxfoundation.org/mailman/listinfo/ha-wg-technical

Linux-HA ha-wg-technical RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.