Why do you need NFS on a Redmi Note 9?
The NFS Network File System allows you to turn your Xiaomi Redmi Note 9 into a complete file sharing node over a local network β whether itβs sharing media, backing up or working with remote projects. Unlike SMB or FTP, NFS is optimized for Unix-like systems (including MIUI based on Android), making it an ideal solution for integrating with Linux servers or NAS- storage.
However, setting up NFS on Redmi laptops has nuances, from the lack of built-in support in Windows to the need for manual mounting in MIUI. In this article, we will discuss three key scenarios: 1 connecting NFS- balls from Linux/NAS to a laptop, 2 setting up the NFS- server on the Redmi Note itself 9 (via Termux), 3 fixing typical errors (Permission denied, Stale handle).
We warn you right away: to work with NFS, you will need root rights (on Android) or administrative access (on Windows), as well as basic command line knowledge. If you are a beginner, start with the section "NFS Basics for Beginners".
1.The basics of NFS: What it is and how it works on the Redmi Note 9
NFS is a file-sharing networking protocol developed by Sun Microsystems in 1984, and its key advantage over SMB is that it has minimal data overhead, which is critical for high-resolution video or large databases. On the Redmi Note 9, NFS can be used in two roles:
- π₯οΈ Client - Connection to an external NFS- ball (e.g., Synology NAS or Linux-PC).
- π‘ Server - Distributing your own laptop folders over the network (requires root or Termux).
It is important to understand that MIUI does not include NFS support by default.
- π± On Android: the NFS Manager app (from F-Droid) or Termux with nfs-utils package.
- π» On Windows: Service component NFS (installed through Control Panel β Programs and Components β Incorporate Windows components).
NFS works on a client-server model, where the server exports directories and clients mount them. For example, if your NAS has a movie in /mnt/media/movies on your ZXQPH0002, you can mount this folder on Redmi Note 9 as /storage/emulated/0/nfs_movies and open files directly, without copying.
π‘
If you use NFS for multimedia, add the noatime option when mounting β this will reduce the load on the disk and speed up reading.
2.Preparation: What You Need to Set Up NFS
Before setting up, check four critical conditions:
- Network infrastructure: All devices must be on the same subnet (e.g. 192.168.1.x/24). Use static IP or DHCP redundancy on the router.
- Access Rights: On the server (NAS/Linux) the folder must be exported with read/write rights for your IP.
- On the Redmi Note 9, install Termux (from F-Droid) or NFS Manager.
- Firewall: Disable the lock on 2049/TCP and 2049/UDP ports on the server and client.
For Windows, you will need additionally:
- π Enable the Service NFS (see screenshot below).
- π§ Install NFS Client for Windows (if you are using Windows 10 Home, you will need to manually install via DISM).
| Component | Where to find it. | Note |
|---|---|---|
| Termux | F-Droid | Install packages: pkg install nfs-utils busybox |
| NFS Manager | F-Droid | Supports mounting without root, but with limitations |
| NFS Client (Windows) | Windows components | Requires restarting after installation |
βοΈ Preparation for setup NFS
Note: If you are using MIUI 12+, note that the system aggressively closes the background processes. For stable NFS performance, add Termux to the battery optimization exceptions (Settings β Applications β Permissions β Autostart).
3. Setting up the NFS- client on the Redmi Note 9 (connection to the ball)
Consider two ways to mount NFS- Shares: through Termux (for power users) and NFS Manager (for beginners).
Method 1: Termux Mounting (requires root)
Open Termux and execute the commands:
pkg update && pkg upgrade
pkg install nfs-utils busybox
su -c "mkdir -p /data/nfs/mount_point"
su -c "mount -t nfs -o nolock,soft,intr 192.168.1.100:/mnt/media /data/nfs/mount_point"Where:
- 192.168.1.100 β IP yours NFS-server.
- /mnt/media is an exportable folder on the server.
- /data/nfs/mount_point is the mounting point on the Redmi Note 9.
To keep the mounting after the reboot, add a line to /etc/fstab:
192.168.1.100:/mnt/media /data/nfs/mount_point nfs defaults,user,noauto 0 0What happens if mount returns "Permission denied"?
Method 2: Use NFS Manager (without root)
NFS Manager simplifies the process, but has limitations:
- Open the app and click + β Add NFS Share.
- Enter server data: π Server: IP or hostname (e.g., 192.168.1.100). π Export Path: path to the ball (e.g., /mnt/media). π Mount Point: local folder (e.g., /storage/emulated/0/nfs_share).
soft
intr
tcp
Mount
NFS Manager does not support automatic mounting after reboot β you will have to repeat the process manually or use Tasker to automate.
4. Setting up a NFS- server on Redmi Note 9 (file sharing)
To make the Redmi Note 9 NFS- server, you will need a Termux root or Magisk embroidered.
pkg install nfs-utils busybox proot
termux-setup-storage
echo "/data/data/com.termux/files/home/storage/shared/Download 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)" > ~/nfsexports
sudo mkdir -p /data/nfs
sudo mount -o bind ~/nfsexports /data/nfs/exports
sudo nfsd startTranscript of commands:
- π /storage/shared/Download is a folder that we give away.
- π 192.168.1.0/24 is the IP band that is allowed access.
- π§ rw,sync - read/write rights and synchronous writing rights.
To connect to this server from another device, use the command:
mount -t nfs 192.168.1.50:/data/data/com.termux/files/home/storage/shared/Download /mnt/local_folderNote: NFS- server on Android is not designed for round-the-clock operation. MIUI can force the background processes to close, which will lead to connection breakage. For stable operation, use Termux:Boot to autostart the server.
π‘
The NFS- server on Android is only suitable for temporary file sharing. For permanent storage, use NAS or a dedicated Linux-PC.
5. Typical NFS errors and their solutions
Even when set up correctly, NFS can produce errors, and let's look at the most common ones.
| Mistake. | Reason. | Decision |
|---|---|---|
| Permission denied | Not enough rights on the server or client. | Check the export options (rw,no_root_squash) and folder rights (chmod 777). |
| Stale file handle | The server has restarted and the client is trying to access the old session. | Remount the ball (umount -f β mount). |
| RPC: Program not registered | Rpcbind is not running on the server. | Do sudo systemctl start rpcbind. |
| Connection timed out | Firewall is blocking port 2049. | Open the port on the router and server (iptables -A INPUT -p tcp --dport 2049 -j ACCEPT). |
If the error persists, check the logs on the server:
sudo tail -f /var/log/syslog | grep nfsOn the client (Redmi Note 9) logs can be viewed via logcat:
adb logcat | grep -i nfsHow to speed up the NFS?
6. Optimizing NFS performance
By default, NFS uses small data packets (rsize=1024), which reduces the transfer speed. For the Redmi Note 9, we recommend the following settings:
- π Increase packet size: add rsize=32768,wsize=32768 when mounting.
- π Turn off synchronous recording: Use async instead of sync (but risk losing data if you crash).
- π Prioritize TCP: add proto=tcp for stability.
Example of an optimized mounting command:
mount -t nfs -o rsize=32768,wsize=32768,tcp,noatime,soft,intr 192.168.1.100:/mnt/media /data/nfs/mount_pointFor speed testing, use dd:
dd if=/dev/zero of=/data/nfs/mount_point/testfile bs=1M count=100Note: If you use NFS to stream video, add actimeo=0 to disable file attribute caching and reduce playback delays.
7. NFS Alternatives for the Redmi Note 9
If NFS seems too complex, consider alternatives:
- π SMB (Samba): easier to set up, but slower. MIUI runs via FX File Explorer or Solid Explorer.
- π WebDAV: Supported by most file managers, but requires a HTTP- server.
- βοΈ Syncthing: Decentralized sync without server. Perfect for backups.
- π SSHFS: mounting remote folders over SSH. Requires Termux with openssh.
| Protocol | Speed. | Difficulty setting up | Support for MIUI |
|---|---|---|---|
| NFS | βββββ | βββ | Requires root/Termux |
| SMB | βββ | β | Yes (via file managers) |
| SSHFS | ββββ | βββ | Demands Termux |
| Syncthing | ββ | ββ | Yes (app from F-Droid) |
The choice of protocol depends on the task:
- π¬ For streaming video, NFS or SMB.
- π For backups, Syncthing or rsync.
- π§ For remote file management, SSHFS.