Skip to content

Network Attached Storage (NAS)

What is Network Attached Storage (NAS)

Network Attached Storage (NAS) is a file-level computer data storage server connected to a computer network providing data access to a heterogeneous group of clients. NAS is specialized for serving files either by its hardware, software, or configuration. It is often manufactured as a computer appliance – a purpose-built specialized computer.

Major NAS Protocols

  1. NFS (Network File System)

    • NFS is a distributed file system protocol that allows you to share files and directories over a network. It is a client-server system that allows users to access files across a network and treat them as if they are on a local file system.
    • NFS is a stateless protocol, meaning that the server does not keep track of the state of the client. This allows the client to recover from network failures without the server being involved.
    • NFS is a popular choice for sharing files between Unix-like systems.
    • NFSv4 is the latest version of NFS and includes features such as strong security, better performance, and support for file locking.
  2. SMB (Server Message Block)

    • SMB is a network file sharing protocol that allows applications on a computer to read and write to files and to request services from server programs in a computer network.
    • SMB is used by Windows operating systems to share files, printers, and serial ports.
    • SMB is also known as CIFS (Common Internet File System) and is the protocol used by Windows for file sharing.
    • SMB is a stateful protocol, meaning that the server keeps track of the state of the client. This allows the server to recover from network failures without the client being involved.
    • SMBv3 is the latest version of SMB and includes features such as strong security, better performance, and support for file locking.

Setting up NFS

Server-side setup:

#1. Install NFS server:
sudo apt-get update
sudo apt-get install nfs-kernel-server

#2. Create a shared directory:
sudo mkdir -p /var/nfs/shared
sudo chown nobody:nogroup /var/nfs/shared
sudo chmod 755 /var/nfs/shared

#3. Configure NFS exports:
sudo nano /etc/exports
#Add the following line: /var/nfs/shared 10.1.100.0/24(ro,async,no_subtree_check)

#4. Restart NFS server:
sudo service nfs-kernel-server restart

Client-side setup:

#1. Install NFS client:
sudo apt-get update
sudo apt-get install nfs-common

#2. Create a mount point:
sudo mkdir -p /mnt/my_nfs_share

#3. Mount the NFS share:
sudo mount -t nfs 10.1.100.159:/var/nfs/shared /mnt/my_nfs_share

#4. Make the mount persistent:
sudo nano /etc/fstab
#Add the following line: 10.1.100.159:/var/nfs/shared /mnt/my_nfs_share nfs defaults 0 0

NFS (Network File System) uses several ports for its operation:

  1. Port 111 (TCP and UDP): This is the port used by the NFS portmapper (rpcbind) service, which maps NFS services to specific ports.
  2. Port 2049 (TCP and UDP): This is the default port used by the NFS server (nfsd) for NFSv4 and later versions.
  3. Port 2050 (TCP and UDP): This port is sometimes used for NFSv3 and earlier versions.

Additionally, NFS may also use other ports for related services, such as:

  • Port 635 (TCP and UDP): Used by the NFS mount daemon (mountd).
  • Port 892 (TCP and UDP): Used by the NFS status monitor (nfsstat).

To ensure NFS works correctly, you may need to open these ports in your firewall configuration.

Why Pick Unraid for NAS

  1. Unriad is designed to boot from a USB drive and run from RAM, minimizing the OS footprint allowing all storage drives to be used for data storage. This is a great feature for NAS hardware with limited storage options.
  2. Set it and forget it. Though it is a paid software, it is easy to use, relatively stable and has a large community for support.
  3. If you have random old HDDs (different sizes) lying around, Unraid can use them in the array without any issues. Make sure to have a parity drive equal to or larger than the largest data drive.
  4. Unraid has a great web interface for managing the NAS, Docker, VMs, and plugins.
The content provided is generated with the help of artificial intelligence (AI) and may contain inaccuracies or outdated information due to the limitations of AI. While I strive to review and validate the content, some errors or inaccuracies may still be present in the final output. Please use this content as a general guide only and verify any critical information through reputable sources before relying on it. I appreciate your understanding and feedback in helping us improve the accuracy and quality of our AI-generated content."