NFS on Xiaomi Redmi Note 9: a complete guide to setting up network storage

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).
πŸ“Š How do you plan to use NFS on the Redmi Note 9?
To exchange files between devices
Like backup storage.
For streaming multimedia
For development/testing
Another option

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:

  1. 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.
  2. Access Rights: On the server (NAS/Linux) the folder must be exported with read/write rights for your IP.
  3. On the Redmi Note 9, install Termux (from F-Droid) or NFS Manager.
  4. 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).
ComponentWhere to find it.Note
TermuxF-DroidInstall packages: pkg install nfs-utils busybox
NFS ManagerF-DroidSupports mounting without root, but with limitations
NFS Client (Windows)Windows componentsRequires restarting after installation

β˜‘οΈ Preparation for setup NFS

Done: 0 / 5

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 0
What happens if mount returns "Permission denied"?
1. Check server rights: the folder must be exported with the no_root_squash option for your IP. 2. Make sure that the server runs rpcbind (sudo systemctl start rpcbind). 3. If you use MIUI, try mounting to /storage/emulated/0 instead of /data (requirequirete root).

Method 2: Use NFS Manager (without root)

NFS Manager simplifies the process, but has limitations:

  1. Open the app and click + β†’ Add NFS Share.
  2. 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 start

Transcript 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_folder

Note: 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 deniedNot enough rights on the server or client.Check the export options (rw,no_root_squash) and folder rights (chmod 777).
Stale file handleThe server has restarted and the client is trying to access the old session.Remount the ball (umount -f β†’ mount).
RPC: Program not registeredRpcbind is not running on the server.Do sudo systemctl start rpcbind.
Connection timed outFirewall 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 nfs

On the client (Redmi Note 9) logs can be viewed via logcat:

adb logcat | grep -i nfs
How to speed up the NFS?
1. Use the option rsize=8192,wsize=8192 when mounting to increase packet size. 2. Turn off atime (noatime) to reduce disk load. 3. If the server and client are in the same subnet, use tcp instead of udp for stability.

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_point

For speed testing, use dd:

dd if=/dev/zero of=/data/nfs/mount_point/testfile bs=1M count=100

Note: 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.
ProtocolSpeed.Difficulty setting upSupport 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.

FAQ: Frequent questions about NFS on Redmi Note 9

❓ Can I use NFS without root?
Yes, but with limitations. The NFS Manager app allows you to mount balls without root, however: The mounting point will be inside /storage/emulated/0 (only available to your user). There is no automatic mounting after rebooting. Speed is lower due to MIUI limitations on background processes. For full operation, we recommend getting root through Magisk.
❓ Why does NFS shut down after a laptop sleeps?
This is related to food management policies. MIUI. Solutions: Add Termux to battery optimization exceptions (Settings) β†’ Battery β†’ Battery optimization. Use Termux:Wake-Lock to block sleep while working NFS. Configure cron in Termux to check connection and rewire: /5 * ping -c 1 192.168.1.100 || mount -t nfs...
❓ How to transfer files between Windows and Redmi Note 9 over NFS?
Windows does not support NFS out of the box (except for the Pro/Enterprise versions). Instructions: Install NFS Client for Windows (see Preparation section). Open PowerShell on behalf of the administrator and run: mount -o anon 192.168.1.50:/storage/emulated/0/Download Z: Where Z: is the disk letter you assign to the ball.
❓ Can NFS be used to stream 4K- video?
Theoretically, yes, but there are nuances in practice: πŸ“Ά Network: Wi-Fi 5/6 or Gigabit Ethernet adapter for Redmi Note 9 is required. πŸ“ File system: NFS v3 is slower v4.1. Make sure the server supports nfsvers=4.1. 🎞️ Codecs: MIUI may not support hardware decoding for network files. Use VLC or MX Player. Play the video using NFS for the test and check the download CPU to Termux (top. If the download is greater than 70%, try SMB or DLNA.
❓ How to unmount NFS- ball if its system is "hang"?
If the regular umount does not work, use forced unmounting: su -c "umount -f /data/nfs/mount_point" If this does not work: Kill all processes using the ball: fuser -km /data/nfs/mount_point. Reboot the device. Attention: forced unmounting may lead to the loss of unsaved data!