NAS yes! - But how - iSCSI SMB NFS?

In all of our NAS network file servers, at least the ones I've seen, we have at least a couple of options with which to share files with users. I often encounter minor confusion about which method we should use. And probably more importantly why exactly this one. Therefore, I wanted to discuss the three most commonly used in my opinion, both in home and corporate environments.

 

SMB(Server Message Block)/CIFS(Common Interent File System)

I'll start with a favorite in the Microsoft-dominated world that is Server Message Block or SMB for short. The terms CIFS and SMB are sometimes interchangeably mentioned. In fact, CIFS is a rather outdated protocol and SMB is now more likely to be used. It is best used in version 3 or higher for, among other things, encryption capability but also for performance. SMB Great if you want to store and share files with other users. In tandem with Active Directory, it makes it easy to control access to individual resources based on, for example, group membership in Active Directory. If you are interested in more details, please see my material  [[link to article:TrueNAS + Active Directory - why is it worth it?]

 

SMB is mainly used in the Windows family system environment and integrates very well with it. An example is the native access to older versions of files. As someone's hand slips, and who sometimes doesn't 🙂 users have backup access. So strictly speaking it is to previous versions of files preserved in snapshots. This is a great form of protection against self-purging, but also against malware that encrypts files. And here again, those interested in the details are invited to the material [[link to article:TrueNAS snapshots - Protect your data from ransomware and]].

 

NFS (Network File System)

The other also frequently used network file system on NAS is NFS. However, it is very rarely used in a Microsoft environment. Windows without additional software only in the Professional version is able to work with NFS and even then you have to install components. NFS is rather used as a network file system for Linux-like environments. Mainly for mounting network drive workloads in servers. It is very common that the server where the data is processed is not the same server where the data is stored. In addition, the same data often needs to be processed by multiple servers or multiple instances of some software. Then one solution is to just mount such a directory via NFS to all our servers. Another use of NFS is to store various security copies. Often NFS is also used in virtual servers, so as not to keep virtual machine disks on the virtualizers themselves, but to keep them on NAS. Then such a VMWare, Cirtrix or XCP-NG server can have only a small disk for its own system or logs, and even this can be circumvented because it is possible to fire up the server without literally any physical disk plugged in. Then even the system disk fires up from the NAS. The entire virtual machine disks are stored on the NAS. Which is actually a very good solution, especially with several virtualization servers, because it is then possible to move virtual machines between servers very quickly, because the virtual disks are on NAS and moving such a virtual machine involves only the transfer of configuration and RAM contents, if any.

 

ISCSI (Internet Small Computer Systems Interface)

Trzecim sposób korzystania z dysku sieciowego będącym chyba najmniej oczywistym i intuicyjnym sposobem użycia NAS jest iSCSI.  Jest on zdecydowanie czymś innym od poprzedników. Jest blokową reprezentacją kawałka dysku fizycznego przez sieć.

 

Just as the previous two SMB and NFS are simply sharing some directory with users, iSCSI simply shares a piece of physical disk from point A to point B. Nothing more nothing less. What are the implications of this? Well, such that our NAS has no idea what is on that piece of shared disk. Just as in the case of SMB and NFS we can view files uploaded by users from the NAS, in the case of iSCSI we can see nothing, nothing at all. To "take a look" at an iSCSI disk, if only to, for example, recover something from a copy, you must first mount it somewhere. The big advantage of such a solution is that it is completely transparent from the user's point of view. It is very versatile. A server mounting a disk to itself via iSCSI can use it in any way it wants and format it using any file system. The NAS server is not even "aware" of what file system is so used whether Windows-based FAT, NTFS, or macOS-based APFS or Linux-based .... whatever because there are already a lot of those. Please note that in the case of SMB and NFS, we share some of our directory with users, that is, they can only use it in terms of the existing file system or type of user rights on the NAS. Sometimes effective "translation" of these rights if the server is Linux and the client is Windows or vice versa can be .... cumbersome. Well these file systems are just different. In the case of iSCSI this problem does not occur, the user formats a separate piece of disk for his own needs. The disadvantage of this solution in comparison with SMB and NFS is the fact that, due to the allocation of disk space from point A to point B, we immediately occupy a rigidly allocated disk space, regardless of whether the user uses only one percent of the space or all of it. This problem does not exist in the case of SMB and NFS, because the disk is occupied as much and only as much space as it is occupied by uploaded files.

 

AFP (Apple Filing Protocol)

There was no way to miss something for apple. AFP is a network file sharing protocol just for them. macOS can use SMB and NFS efficiently. AFP is not likely to be used often but it is worth knowing that such a thing exists.

 

WebDAV

 Finally, more as a curiosity, I left to the WebDAV era. This is a network file system that is an extension of the HTTP protocol. The same one we use when browsing the web. That is, it uses web servers or Apache or NGINX as a server. It works well for mounting yourself on your computer as a local drive for your resources from platforms such as Nextcloud or Owncloud. They natively support WebDAV.

 

Summary:

 The protocols discussed are definitely different from each other. Of course, there is no single best one and let's use the one that best covers our needs. After this little excursion, let's conclude that if we are using Windows and want to keep our files somewhere then SMB should be the right choice.

 

Please still remember that even the best NAS network drive, as much as it would have spare drives or power supplies is not a backup. Every server breaks down at some point, always have a plan B. B for backup.

 

If you would like to learn more about TrueNAS write to us. We will tell you how it works and why it is worth it?