How to configure mounting of NFS and CIFS network file systems in Linux?
Connecting network storage in Linux allows you to expand available disk space using remote servers or network attached storage via NFS protocols for Unix systems or CIFS/SMB for interacting with Windows networks. To successfully connect a network folder on a client machine, you must first install the appropriate file system support packages through the system package manager.
The manual NFS mounting process is performed using the standard mount command by specifying the server IP address, the path to the exported folder, and the local mount point. For the CIFS protocol, you need to specify the username, password, and domain in the mount parameters; for security, these credentials are often placed in a separate secure configuration file with restricted access permissions.
To have the network drive automatically connect when the operating system boots, an entry is added to the file system configuration file specifying special connection parameters. The key parameter here is the use of deferred mounting options or network timeouts so that the system does not hang at startup if the remote server is temporarily unavailable or there is no network connection.
An alternative and more modern method of automatic mounting is using the autofd service, which mounts a remote resource only when a user or process accesses it, and automatically unmounts it after an idle time. This reduces the load on the network and storage server, eliminating the need to constantly maintain an active network connection.