soft mount for nfs to prevent unresponsive app

This commit is contained in:
lelo 2025-03-29 08:48:23 +00:00
parent 2101669567
commit 788cf1352e

View File

@ -122,7 +122,7 @@ for server in "${SERVERS[@]}"; do
# Mount the NFS share if it's not already mounted.
if ! is_nfs_mounted "${MOUNT_POINT}"; then
echo "[INFO] NFS share is not mounted at ${MOUNT_POINT}. Attempting to mount..."
sudo mount -t nfs -o port="${LOCAL_PORT}",nolock,soft 127.0.0.1:"${NFS_SHARE}" "${MOUNT_POINT}"
sudo mount -t nfs -o ro,port="${LOCAL_PORT}",nolock,soft,timeo=5,retrans=3 127.0.0.1:"${NFS_SHARE}" "${MOUNT_POINT}"
if is_nfs_mounted "${MOUNT_POINT}"; then
echo "[SUCCESS] NFS share mounted successfully at ${MOUNT_POINT}."
else