How to set up NFS on Redmi 9T: a complete guide for Xiaomi

The Network File System (NFS) allows remote storage to be used locally โ€” the perfect solution for expanding Redmi 9T memory without buying a microSD. However, setting up NFS on Xiaomi smartphones has nuances ranging from lack of built-in support to access rights issues. In this guide, we will break down the unique method of connecting NFS via Termux and Root access, which works even on non-rooted devices with MIUI limitations.

Important: NFS on Android is not a standard feature like on a Linux PC. It will require a combination of third-party apps, manual settings and sometimes superuser rights. If you're a beginner, start with a simple FTP/SMB - they're easier to set up. But if you want maximum speed and stability (for example, for 4K streaming or backup), NFS will be the best choice.

What is NFS and why is it needed on the Redmi 9T?

NFS is a network file access protocol originally developed for Unix systems, and on Redmi 9T, it allows you to:

  • ๐Ÿ“ Connect network folders as local (for example, movies with a NAS PC)
  • โšก Get data transfer speed close to local memory (up to 100 MB / s with a gigabit connection)
  • ๐Ÿ”„ Automatically sync files between devices without clouds
  • ๐Ÿ› ๏ธ Used as an alternative OTG-The port saves the port (the port saves the port). USB-C)

The main difference is SMB (Windows networks) or FTP: NFS Optimized for Unix systems and shows better performance when working with a large number of small files (for example, photos or databases). 9T It's relevant:

  • ๐ŸŽฌ High-resolution streaming video without buffering
  • ๐Ÿ“ฑ Backup via adb backup directly to the network drive
  • ๐ŸŽฎ Storage of emulator files (PS2, Nintendo Switch โ€“ eliminates lags when downloading games

โš ๏ธ Attention: MIUI By default, it blocks the background activity of applications, including NFS-Without the battery optimization switch off for Termux, the connection will break every time. 5-10 minute.

Requirements for NFS setup on Redmi 9T

Before you start, check:

ComponentMinimum requirementsRecommendations
SmartphoneRedmi 9T at MIUI 12+Root rights (optional, but make settings easier)
NetworkWi-Fi 5 (802.11ac)Gigabit router (Asus RT-AX88U, TP-Link Archer C4000)
serverAny PC/NAS Linux or Windows + NFS-serverSynology DS220+, Raspberry Pi 4 with OpenMediaVault
AnnexesTermux, nfs-commonSolid Explorer (for mounting without Root)

Critical moments:

  • ๐Ÿ”Œ Food by meal USB: Long-term data transfer to Redmi 9T It can even run out of power on a charger. Use the original power supply. 18W.
  • ๐Ÿ“ถ Wi-Fi Channel: For stability, select a fixed channel (e.g. 36 or 149) in your router settings โ€” DHCP may reset.
  • ๐Ÿ”’ Security: NFS It's the default, it's transferring data without encryption. NFS over TLS or use VPN.
๐Ÿ“Š How you plan to use it NFS on the Redmi 9T?
For streaming video
Backup
Storage of games
Documentation work
Other

Preparation of the NFS server (on the example of Linux)

If you don't have one ready. NFS-On the server, set it up on a PC with Ubuntu 22.04 or Debian 11. Windows will require third-party software (for example, haneWIN). NFS Server, but we recommend Linux as a more stable solution.

Perform in the server terminal:

sudo apt update && sudo apt install nfs-kernel-server -y


sudo mkdir -p /mnt/nfs_share




sudo chown nobody:nogroup /mnt/nfs_share




sudo chmod 777 /mnt/nfs_share

Edit the export file:

sudo nano /etc/exports

Add a line (replace 192.168.1.0/24 with your subnet):

/mnt/nfs_share 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)

Apply the changes and restart the server:

sudo exportfs -a


sudo systemctl restart nfs-kernel-server

๐Ÿ’ก

To check server availability with Redmi 9T, use the command ping your server in Termux. If there is a ping but the NFS is not connected, check the firewall (sudo ufw allow from 192.168.1.0/24 to any port nfs).

Setting up NFS-client 9T via Termux

Install Termux from F-Droid (the version from Google Play is outdated and does not support packages). Update the repositories and install the necessary utilities:

pkg update && pkg upgrade -y


pkg install root-repo stable-repo x11-repo -y




pkg install nfs-common -y

Create a mount point and connect the network folder:

mkdir ~/nfs_mount


mount -t nfs -o port=2049,nolock,proto=tcp 192.168.1.100:/mnt/nfs_share ~/nfs_mount

Replace 192.168.1.100 with your serverโ€™s IP.

Successful execution of mount command without errors |

folder ~/nfs_mount map|

Files on the server are visible via ls ~/nfs_mount|

Speed of copying of the test file >10 MB/s (cp) ~/Download/test.mp4 ~/nfs_mount)

-->

For auto-mounting when starting Termux, add to ~/.bashrc:

mount -t nfs -o port=2049,nolock,proto=tcp 192.168.1.100:/mnt/nfs_share ~/nfs_mount 2>/dev/null

โš ๏ธ Note: When connecting via mobile data (4G/5G) NFS It will be very unstable due to high delays. MIUI It can also block Termux background activity โ€“ add the app to the battery optimization exceptions (Settings) โ†’ Battery โ†’ Optimizing the battery โ†’ All applications โ†’ Termux โ†’ No restrictions).

Mounting NFS as a local storage (Root method)

If you have Root Access, you can install it. NFS-file-to-file /storage/emulated/0, So it's going to be displayed in any file manager. NFS Manager:

  1. Install NFS Manager through Magisk.
  2. Open Termux with Root Rights (su).
  3. Do it: mkdir /data/nfs mount -t nfs -o rw,noatime,nodiratime,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share /data/nfs
  4. Create a symbolic link to access without Root: ln -s /data/nfs /storage/emulated/0/NFS_Share

Now folder. NFS_Share will be visible in a standard conductor MIUI. For auto-mounting, use the task in Tasker or script in /data/adb/post-fs-data.d/.

How to check the actual speed of NFS?
Use iperf3 utility to test network bandwidth: On the server: iperf3 -s On Redmi 9T: iperf3 -c 192.168.1.100 -P 5 -t 30 Normal values for Wi-Fi 5: 300-500 Mbit / s. If the speed is below 100 Mbit / s - check the QoS settings on the router or switch to a 5 GHz channel with a width of 80 MHz.

Solving Common NFS Errors on Redmi 9T

NFS connection errors on Xiaomi are often related to MIUI features. Consider typical problems and solutions:

Mistake.Reason.Decision
mount: Operation not permittedMIUI blocks mounting without RootUse Termux with proot-distro or get a Root
RPC: Program not registeredNFS-The server is not responding to port 2049Check the server firewall (sudo ufw status)
Stale file handleThe server restarted and the client did not update the descriptors.Remount the folder (umount) ~/nfs_mount; mount...)
Slow speed (<10 MB/s)MTU fragmentation or encryptionAdd rsize=32768,wsize=32768 in the mounting option

For diagnosis, use the kernel logs:

su


dmesg | grep nfs

If you see server not responding in the logs, the problem is server-side. Redmi 9T also has an ENOSPC error (not enough space), even if there is space on the server - this is a MIUI bug, it is solved by restarting.

๐Ÿ’ก

For stable NFS performance on Xiaomi, be sure to turn off the Adaptive Battery and add Termux to the optimization exceptions. Without this, the connection will break every 5-15 minutes.

Optimizing NFS Performance

By default, NFS uses small data packets (1024 bytes), which reduces the speed on the Redmi 9T. Optimize the mounting parameters:

Add the following options to the mount command:

mount -t nfs -o rsize=65536,wsize=65536,hard,intr,noatime,nodiratime,vers=3,proto=tcp,port=2049 192.168.1.100:/mnt/nfs_share ~/nfs_mount

Decoding of keys:

  • rsize/wsize=65536 โ€” Read/write block size (increases speed on the 30-50%)
  • noatime, nodiratime โ€“ disables access time recording (reduces server load)
  • vers=3 โ€“ Forced to use NFSv3 (more stable on Android than v4)
  • hard,intr โ€“ allows you to interrupt suspended operations (important for mobile networks)

To test the speed, copy a large file (1+GB) from server to phone and back:

time cp ~/nfs_mount/big_file.mp4 ~/storage/downloads/


time cp ~/storage/downloads/big_file.mp4 ~/nfs_mount/

Normal results for the Redmi 9T:

  • ๐Ÿ“ฅ Download from the server: 40-70 MB/s (limited by Wi-Fi speed)
  • ๐Ÿ“ค Uploading to the server: 30-50 MB/s (depends on the server)

FAQ: Frequent questions about NFS on Xiaomi

Can I set up NFS without Root?
Yes, but with limitations: the folder will only be available in Termux or through special file managers (e.g. Solid Explorer with a plugin). NFS). For full installation in /storage/emulated/0 Root.
Why does NFS shut down after sleep?
MIUI aggressively optimizes background processes. Solutions: Add Termux to battery exclusions (Settings โ†’ Battery โ†’ Battery Optimization โ†’ Termux โ†’ Unlimited). Disable Adaptive Battery in the developer settings. Use Tasker to automatically reconnect after waking up.
How to connect to NFS via 4G/5G?
Technically possible, but not recommended: ๐Ÿ“ก Use it. VPN (WireGuard) for encrypting traffic. ๐Ÿ”ง Reduce. rsize/wsize before 8192 reduce packet loss. โš ๏ธ Wait for delays 100+ sms and speed <10 MB/s. WebDAV is better suited for mobile networks or SFTP.
Can I use NFS to back up through TWRP?
Yes, but only if TWRP has built-in network support. Alternative method: Connect to NFS via the adb shell in TWRP. Use dd to create a partition image directly to the network drive: dd if=/dev/block/by-name/userdata | gzip -c | nc 192.168.1.100 1234 On the server receive stream: nc -l 1234 | gunzip > backup.img
What NFS Alternatives Are Good for Redmi 9T?
If NFS too complicated to set up, consider: Protocol SpeedStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStrongStosssss SMB (Samba)20-50 MB/sโ˜…โ˜†โ˜†โŒ (only SMB3) FTP/FTPS10-30 MB/sโ˜…โ˜…โ˜†โœ… (FTPS) WebDAV5-20 MB/sโ˜…โ˜…โ˜†โœ… (HTTPS) SSHFS15-40 MB/sโ˜…โ˜…โ˜…โœ… (always)