CyberDaeng
Intern
Intern
  • UID8384
  • Fans0
  • Follows0
  • Posts17
Reads:7447Replies:2

NAS Mount to ECS

Created#
More Posted time:Dec 5, 2019 0:07 AM
So I just get my NAS from AlibabaCloud planning to use it for daily backup.

I have add mount point, enable it and everything. When ready, I try to mount it in my ECS with this command

mount -t nfs4 -o rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.nas.aliyuncs.com:/ /mnt


Of course the 'file-system-id.region.nas.aliyuncs.com' are represent your mount point. When I do that command I dont got any respond for a long time and suddently 'Connection Refused'. After several research, I just try to disable my firewall so all ports are open. After I do that, I can do the mount.
So my question is, does the NAS file system required specific port to be open? Please advice...

naikit15
Intern
Intern
  • UID7917
  • Fans0
  • Follows3
  • Posts4
1st Reply#
Posted time:Jan 29, 2020 13:24 PM
Hi @CyberDaeng,

May I know whether it is Windows or Linux ECS instance which you are using to access the NAS?

Kindly check out below link to Access an NFS file system from a Windows ECS instance.
https://www.alibabacloud.com/help/doc-detail/67165.htm?spm=a2c63.p38356.b99.54.24c02689Cr5wmc

Best Regards,
Naikit Shah.

kcloud
Engineer
Engineer
  • UID7778
  • Fans0
  • Follows0
  • Posts52
2nd Reply#
Posted time:Jan 29, 2020 14:24 PM
Hi,

NAS (Network Attached Storage) is a device that allows users to access files through a network.
NFS (Network File System) is a protocol that is used to serve and share files on a network. NFS is a type of protocol used to connect to a NAS.

Apsara File Storage NAS supports NFSv4 access control lists (ACLs) and Portable Operating System Interface (POSIX) ACLs.

One big advantage of NFSv4 over its predecessors is that only one UDP or TCP port 2049, is used to run the service, which simplifies using the protocol across firewalls.
Refer: https://en.wikipedia.org/wiki/Network_File_System#NFSv4

So, for the question:
Does the NAS file system required specific port to be open?
or:
Which ports do I need to open in the firewall to use NFS?

Answer is:

Port 111 (TCP and UDP) and Port 2049 (TCP and UDP) for the NFS server.

Check out the following links:
https://serverfault.com/questions/377170/which-ports-do-i-need-to-open-in-the-firewall-to-use-nfs

and:
https://en.wikipedia.org/wiki/Portmap#Example_portmap_instance

Cheers,
K
Guest