Hi, By the way, with regard to a very older version of ocf script exportfs, there was a exportfs_backup function which was launching the backup_rmtab every 2 seconds. In the new script , the backup_rmtab is executed at each monitoring call , meaning every "op monitor interval value". But it seems not reasonable to set this interval to 2s , meaning it would be at least 30s ... is there any recommandation about this ? isn't there any drawback to do a backup rmtab only every 30s ? particularly in case of one node breakdone leading to failover ?
Thanks Alain De : [email protected] A : [email protected] Date : 26/07/2012 16:49 Objet : [Linux-HA] tuning of ocf script exportfs Envoyé par : [email protected] Hi Dejan a little contribution on the script exportfs , last release found here (delivered 16 days ago): https://github.com/ClusterLabs/resource-agents/tree/master/heartbeat two things except if I'm mistaking: 1/ little typo : I think the "." is missing for .ocf-shellfuncs 2/ the script does not work if we set the OCF_RESKEY_clientspec="*" in params of the exportfs resource, due to the exportfs_monitor function : when using * instead of hostname, the exportfs is displaying for example : /alain <world> and the line : exportfs | sed -e '$! N; s/\n[[:space:]]\+/ /; t; s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' | grep -q -x -F "${OCF_RESKEY_directory} ${OCF_RESKEY_clientspec}" returns 1 and then $OCF_NOT_RUNNING So I don't know if it is the more elegant manner to fix this little issue, but I've added at the begining of exportfs_monitor : exportfs_monitor () { # exportfs output wraps lines for long export directory names. # We unwrap here with sed. # We then do a literal match on the full line (grep -x -F) if [ "${OCF_RESKEY_clientspec}" == "*" ]; then CLIENTSPEC="<world>" else CLIENTSPEC=${OCF_RESKEY_clientspec} fi and use $CLIENTSPEC on the grep : exportfs | sed -e '$! N; s/\n[[:space:]]\+/ /; t; s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' | grep -q -x -F "${OCF_RESKEY_directory} ${CLIENTSPEC} With this tuning, it works fine. Regards Alain _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
