Configuring network storage by protocol NFS (Network File System on Xiaomi RedmiBook 9 Pro allows you to quickly and securely access files from other devices on the local network, which is especially useful for working with large amounts of data, backing up or sharing files between multiple computers. However, the setup process has its own nuances: from choosing the right version of the protocol to the configuration of the firewall and access rights.
In this article, we will analyze the step-by-step instructions for setting up NFS-The server and client on RedmiBook 9 Pro running Windows 11 or Linux (if you use dual-boot), especially focus on common errors such as mount: wrong fs type or access rights issues, as well as performance optimization. If you havenβt worked with network protocols before, donβt worry β weβll explain each step in as much detail as possible, including hardware preparation and connection testing.
1. Preparing RedmiBook 9 Pro for setup NFS
Before you start installing and configuring, make sure your laptop is ready to run on network storage.
- π Stable network connection: NFS Use an Ethernet cable (recommended) or check the quality of the Wi-Fi signal (at least lower) 802.11ac).
- π₯οΈ Free disk space: The partition you will share should have at least 10-15% free space for stable operation.
- π Administrative rights: Set-up NFS requires sudo (Linux) rights or run on behalf of an administrator (Windows).
- π‘ Local area network: All devices must be on the same subnet (e.g, 192.168.1.x/24).
RedmiBook 9 Pro with Windows 11 protocol preinstalled NFS It's not supported out of the box. You'll either need to install additional components or use them. WSL 2 (Linux for Windows) for deployment NFS-The alternative is to configure the server. NFS on another device (for example, on a router with OpenWRT or NAS), Make your laptop a customer.
β οΈ Note: If you are planning to use NFS For storing critical data (e.g., 1C databases or virtual machines), please note that the protocol does not provide built-in encryption. VPN or use NFS over TLS (requires additional configuration).
Installation NFS-server on Windows 11
Windows 11 does not include built-in support NFS-server, we will consider two options: installation through the "Services for NFS" (The client part is there, but the server part is not, and the deployment through WSL 2.
Option 1: Services for NFS (client)
If you need to connect to an existing one NFS-server (for example, on a router or NAS), execute:
- Open Control Panel β Programs β Enable or disable Windows components.
- Find the item "Services for NFS" and mark: π Client for NFS (server-connect). π Administration of the server for NFS (optionally).
OK
For a full-fledged NFS-Windows servers will require third-party software, such as haneWIN NFS Server or FreeNFS. However, these solutions are often paid or have limitations. WSL 2.
Option 2: NFS-server WSL 2 (Ubuntu)
This method allows you to deploy a full-fledged NFS-Linux server directly in Windows:
- Install. WSL 2 and Ubuntu distribution via Microsoft Store.
- Launch the Ubuntu terminal and update the packages: sudo apt update & & sudo apt upgrade -y
- Install. NFS-server: sudo apt install nfs-kernel-server -y
- Create a folder for access (for example, in the home directory): mkdir ~/nfs_share chmod 777 ~/nfs_share
Next, you will need to configure the export of the catalog in the file /etc/exports (about this in the next section).
[wsl2]
memory=4GB
processors=2That'll speed up the work. NFS-server.-->
3. File configuration /etc/exports
File. /etc/exports It determines which directories will be available over the network and with which rights. Setup requires care: a syntax error will cause the server to not start.
Open the file in any text editor (such as nano):
sudo nano /etc/exportsAdd a line for the shared folder. Example for access from any device on the LAN (192.168.1.0/24):
/home/ Your user/nfs_share 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)Decoding of parameters:
| Parameter | Description |
|---|---|
| rw | It allows reading and writing (read-write). |
| sync | Synchronous recording (data is written to the disk at once) More reliable, but slower. |
| no_subtree_check | Disables subdirectory checks (accelerates work). |
| no_root_squash | Retains root rights for the connected client (not secure for public networks!). |
After saving the file, restart NFS-server:
sudo exportfs -a
sudo systemctl restart nfs-kernel-serverβ οΈ Attention: Parameter no_root_squash Gives the client full permissions on the server. If you have unmanaged devices on your network (for example, smart TVs or IoT gadgets), replace it with a new one. root_squash, limiting privileges.
4. Connection NFS-Disc on RedmiBook 9 Pro (client)
Now we'll set up the connection to NFS-Let's look at the options for Windows 11 and Linux.
For Windows 11 (through Services for the NFS")
If you have installed a "Customer for" component NFS" (see section 2), follow:
- Open this computer. β Connect the network disk.
- In the "Folder" field, specify the path in format: \\nfsserver\path/folder For example, if IP server 192.168.1.100, and folder /nfs_share, enter: \\192.168.1.100\nfs_share
- Mark "Plug in at the entrance" and click "Prepared".
For Linux (Ubuntu/Debian)
On Linux systems, the connection is made via the mount command:
- Install utilities to work with NFS: sudo apt install nfs-common -y
- Create a mounting point: sudo mkdir /mnt/nfs_share
- Connect the folder: sudo mount -t nfs 192.168.1.100:/nfs_share /mnt/nfs_share
- Check the connection: df -h | grep nfs
For automatic mounting, add a line to /etc/fstab:
192.168.1.100:/nfs_share /mnt/nfs_share nfs defaults 0 0Make sure the server is running (sudo systemctl status nfs-server)
Check port availability (telnet 192.168.1.100 2049)
Perform test mounting with parameter -v detailing
Create a test file in a shared folder (touch) /mnt/nfs_share/test.txt)
-->
5. Optimizing NFS performance
By default. NFS It can run slower than a local drive, especially when transferring small files:
- β‘ Use it. NFSv4: The more modern version of the protocol supports caching and reduces overhead. To enable it, add the vers parameter.=4 when mounted: sudo mount -t nfs -o vers=4 192.168.1.100:/nfs_share /mnt/nfs_share
- π¦ Customize buffer size: Increase rsize and wsize settings (recommended values β 8192 or 32768): sudo mount -t nfs -o rsize=32768,wsize=32768 192.168.1.100:/nfs_share /mnt/nfs_share
- π Disable Attributes (if not): Noatime reduces the number of records per disk: sudo mount -t nfs -o noatime 192.168.1.100:/nfs_share /mnt/nfs_share
On RedmiBook 9 Pro with SSD-storage device NFS For example, to reduce disk wear, it is recommended to use the sync parameter (despite the performance decrease), since it guarantees that data is written to the disk, not only to the cache.
To test the speed, use the dd utility:
dd if=/dev/zero of=/mnt/nfs_share/testfile bs=1M count=1024Compare the result to writing to a local drive. If the speed is lower by 30% or more, check the network settings or try other mounting options.
π‘
For maximum performance, combine the parameters: vers=4,rsize=32768,wsize=32768,noatime, but remember that noatime can cause files to lose their access timestamps.
6. Solving typical errors NFS
When you set up NFS Most of the time, you're going to have errors that are related to access rights, network settings, or mounting incorrect settings:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: wrong fs type | No nfs-common (Linux) or "Client for" component is installed NFS" (Windows). | Install the missing packages (see section 4). |
| Permission denied | Incorrect rights to folder or settings in /etc/exports. | Check chmod and restart the server (sudo exportfs) -r). |
| Connection timed out | The firewall blocks ports 2049 or 111. | Open ports on the server and client: sudo ufw allow 2049/tcp sudo ufw allow 111/tcp |
| Stale file handle | The server has been rebooted and the client is trying to access the old session. | Remount the folder (sudo umount) /mnt/nfs_share; sudo mount -a). |
If the error does not disappear, turn on logging on the server:
sudo rpcinfo -p
sudo tail -f /var/log/syslog | grep nfsFor a Windows client, check the event log (eventvwr.msc) under Applications and Services β Microsoft β Windows β NFS-Client".
What to do if NFS It works slowly through Wi-Fi?
Alternatives NFS For RedmiBook 9 Pro
If NFS Seems too complicated or not suitable due to low speed, consider alternative protocols for network storage:
- π SMB (Samba: Easy to set up, built into Windows. Speed comparable to NFSv3, But above the overhead. sudo apt install samba
- π SSHFS: He's mounting a remote folder on SFTP. Slower. NFS, but encrypt traffic. sudo apt install sshfs sshfs user@192.168.1.100:/path /mnt/ssh_share
- βοΈ WebDAV: Works through HTTP/HTTPS, It is supported by most operating systems. Suitable for access from outside the local network. sudo apt install apache2 davfs2
Comparison of protocols by key parameters:
| Protocol | Speed. | Security | Difficulty setting up | Windows Support |
|---|---|---|---|---|
| NFS | βββββ | ββ (codeless) | βββ | Partial (requires) WSL) |
| SMB | ββββ | βββ (you can turn on encryption) | ββ | βββββ |
| SSHFS | βββ | βββββ (full-encryption) | ββ | Requires third-party software |
For most home tasks (file sharing, backup) SMB It will be the best choice. NFS It is advisable to use it if you need a high read/write speed (for example, for working with video or databases).
8 Security. NFS: Main risks and protection
NFS It was originally designed for trusted LANs, and it doesn't include built-in encryption mechanisms, and it creates risks when used in insecure environments:
- π Restrict access by IP: In the file /etc/exports point out specific IP-subnetworks: /nfs_share 192.168.1.101(rw) 192.168.1.102(ro)
- π‘οΈ Use it. NFS through VPN: Set up WireGuard or OpenVPN to encrypt traffic.
- π« Disable unused versions of the protocol: In the file /etc/default/nfs-kernel-server Just leave it. NFSv4: RPCNFSDOPTS="--no-nfs-version 2 --no-nfs-version 3"
- π Set up logging: Enable logging access to /etc/syslog.conf: kern.info /var/log/nfs.log
To check for vulnerabilities, use the Nmap utility:
nmap -sV -p 2049 192.168.1.100If you have Android or iOS devices on the network, avoid mounting. NFS These OSes do not support the protocol natively, and third-party applications often have vulnerabilities.
β οΈ Note: If your RedmiBook 9 Pro is connected to public networks (such as in a cafe or coworking), never mount it. NFS-diskless VPN. Attackers can intercept traffic and access your files.