Setting NFS ports

  • date 7th July, 2021 |
  • by Prwatech |
  • 0 Comments

Prerequisites

GCP account

Open Console.

Open Cloud Shell

Paste the below code

$     cat /etc/default/nfs-common

It  will display the nfs-common file. In this file we can see STATDOPS have no value.

Paste the  code  below to open the nfs-common file

$   sudo nano /etc/default/nfs-common

It will open the file.

Change  STATDOPTS="-p 2046"

Then press Ctrl + x then y to confirm following press Enter.

Open

$     cat /etc/modprobe.d/lock.conf

If its displaying No such file or directory, then Open the file

$     sudo nano /etc/modprobe.d/lock.conf

In this file Paste the below code

options lockd nlm_tcpport=4045
options lockd nlm_udpport=4045

Then press Ctrl + x then y to confirm following press Enter.

Paste the below code

$     cat /etc/default/nfs-common

It  will display the nfs-common file with the STATDOPS value updated.

Open

$     cat /etc/modprobe.d/lock.conf

It’ll display the updated lock.conf file

Quick Support

image image