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@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/ha-wg-technical
_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/ha-wg-technical