From ce36bf591a007d376382baf586a17f9087b498cb Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Thu, 15 Oct 2015 15:26:30 -0400 Subject: [PATCH] enable nfsv3 Signed-off-by: Huamin Chen --- exporter/run_nfs | 6 +++--- nfs-server-pod.yaml | 32 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/exporter/run_nfs b/exporter/run_nfs index 3b71622..ec38c8b 100755 --- a/exporter/run_nfs +++ b/exporter/run_nfs @@ -27,8 +27,8 @@ function start() mount -t nfsd nfds /proc/fs/nfsd # from /lib/systemd/system/rpcbind.service -# . /etc/sysconfig/rpcbind -# /sbin/rpcbind -w ${RPCBIND_ARGS} + . /etc/sysconfig/rpcbind + /usr/sbin/rpcbind -w ${RPCBIND_ARGS} # from /lib/systemd/system/nfs-config.service /usr/lib/systemd/scripts/nfs-utils_env.sh @@ -40,7 +40,7 @@ function start() # from /lib/systemd/system/nfs-server.service . /run/sysconfig/nfs-utils /usr/sbin/exportfs -r - /usr/sbin/rpc.nfsd -N 2 -N 3 -V 4 -V 4.1 $RPCNFSDARGS + /usr/sbin/rpc.nfsd -N 2 -V 3 -V 4 -V 4.1 $RPCNFSDARGS echo "NFS started" } diff --git a/nfs-server-pod.yaml b/nfs-server-pod.yaml index adea606..47dee1a 100644 --- a/nfs-server-pod.yaml +++ b/nfs-server-pod.yaml @@ -1,17 +1,19 @@ -apiVersion: v1beta1 +apiVersion: v1 kind: Pod -id: nfs-server -desiredState: - manifest: - version: v1beta1 - id: nfs-server - containers: - - name: nfs-server - image: jsafrane/nfs-data - privileged: true - ports: - - name: nfs - containerPort: 2049 - protocol: tcp -labels: +metadata: name: nfs-server + labels: + role: nfs-server +spec: + containers: + - name: nfs-server + image: jsafrane/nfs-data + ports: + - name: nfs + containerPort: 2049 + - name: rpcbind + containerPort: 111 + - name: mountd + containerPort: 20048 + securityContext: + privileged: true