From 233f6e2adb9f28291cbb00636fa1e215fe1dae7d Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Tue, 30 Jun 2015 19:26:27 +0530 Subject: [PATCH 193/200] common-ha: Fix '/var/lib/nfs/statd/state' path creation '/var/lib/nfs/statd/state' which contains NSM state number should be a file instead of directory. This is a backport of the below fix http://review.gluster.org/#/c/11468/ Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b BUG: 1237165 Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/11468 Reviewed-by: Kaleb KEITHLEY Reviewed-by: Niels de Vos Reviewed-on: https://code.engineering.redhat.com/gerrit/52070 Tested-by: Niels de Vos --- extras/ganesha/scripts/ganesha-ha.sh | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index ccaa3d8..69794a3 100755 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -783,7 +783,9 @@ setup_state_volume() if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd fi - touch ${mnt}/nfs-ganesha/${dirname}/nfs/state + if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then + touch ${mnt}/nfs-ganesha/${dirname}/nfs/state + fi if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov fi @@ -796,8 +798,8 @@ setup_state_volume() if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state + if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then + touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state fi for server in ${HA_SERVERS} ; do if [ ${server} != ${dirname} ]; then -- 1.7.1