How to set up NFS Xiaomi Redmi 9T: server-to-client

Network file system NFS (Network File System allows you to turn your Xiaomi Redmi 9T c a full-fledged client for working with remote folders - whether it is a home NAS, server or even some other Android device. SMB or FTP, protocol NFS Provides higher data transfer speeds with minimal overhead, which is critical for working with large files or streaming video.

However, the setup NFS Xiaomi smartphones have nuances: the lack of built-in support for the protocol in the MIUI, The need for root rights for full mounting and specific server configuration requirements, and in this guide, we will discuss two scenarios: connecting to an existing server. NFS-server (for example, on a router or Linux PC) and organization of the server directly on Redmi 9T We will focus on solving common errors such as Permission denied or mount: Operation not allowed, which often occur on Android 10 devices.+.

We will proceed to the detailed configuration โ€“ from infrastructure preparation to performance testing.

1.Preparation of Xiaomi Redmi 9T work-in NFS

Before setting up the protocol, make sure your device meets the minimum requirements:

  • ๐Ÿ“ฑ Android version: MIUI 12+ Android 10 or later, older versions may not have critical patches for network protocols.
  • ๐Ÿ”Œ Network Connection: stable Wi-Fi connection 5 GHz (recommended) or Ethernet connection via USB-adapter. NFS delay-sensitive!
  • ๐Ÿ”ง Access rights: mounting system folders will require a root (Magisk) or ADB-Without the root, access will be restricted to user directories.
  • ๐Ÿ“ฆ Free space: not less 500 MB on an internal cache drive NFS (tune in /data/local/nfs).

Important: If you are planning to use Redmi 9T how NFS-server, note that performance is limited by the Qualcomm Snapdragon hardware platform 662. The maximum capacity will be ~30-40 MB/s under ideal conditions (gigabit network, no background tasks). For comparison: the same router Xiaomi AX3600 on NFS pitch 80 MB/s.

โš ๏ธ Attention: On devices with MIUI 14 and may be more likely to block the installation NFS through /etc/fstab Because of the SELinux policy, in which case, use wrapping applications like this. NFS Manager or Total Commander with a plugin NFS.

To check current network settings, run in Termux or via ADB:

ping -c 4 192.168.1.1 # Replace with your server's IP


netstat -tuln | grep 2049 # NFS port by default

2. Selection of the configuration method: server or client?

NFS Xiaomi Redmi 9T You can play two roles:

ScriptRequirementsPlusesCons
Client NFS(server-connection)NFS-server on the network, application client (for example, NFS Manager)High speed access to files, no load on the smartphoneDependence on external server, possible delays
server NFS(smartphone-handling)Root rights, Servers Ultimate Pro application or NFS ServerAutonomy, access to smartphone files from other devicesHigh battery load, limited performance
Hybrid mode (client) + server)Root-rights, two applications (client) + server)Maximum flexibilityDifficulty configuring, risk of port conflicts

For most users, the client mode is optimal - it is easier to set up and does not require root rights. Server mode is relevant if you need to distribute files from your smartphone to other devices (for example, to back up photos on your phone). NAS).

๐Ÿ“Š How you plan to use it NFS on the Redmi 9T?
Only as a client (to connect to the server)
How to send files from a smartphone (Server)
Both options
I haven't decided yet.

If you choose server mode, consider: Redmi 9T It is not designed for round-the-clock operation as a file server. With a long load, the processor can overheat (limit on the use of a file server). TDP โ€” 15 watts) and accelerated battery wear. It is better to use a router with a regular battery. USB-port (for example, Xiaomi) R4A) full-fledged NAS.

3.Tune in. NFS-client on Xiaomi Redmi 9T

To connect to the existing NFS-For servers (such as Linux PCs or routers) follow the following steps:

โ˜‘๏ธ Preparation for connection NFS-client

Done: 0 / 4

Installation and adjustment NFS Manager

1. Download the app. NFS Manager from Google Play (free version has a 1 connection limit).

2. Open the app and press Add NFS Share.

3. Fill in the fields:

  • ๐Ÿ“Œ Server IP: IP-address NFS-servers (e.g. 192.168.1.100).
  • ๐Ÿ“ Export Path: The path to the exported folder (e.g, /mnt/data).
  • ๐Ÿ”‘ Mount Point: Local folder for mounting (e.g, /sdcard/nfs_share).
  • ๐Ÿ”„ Options: add rw, noatime, nolock, rsize=8192,wsize=8192 for optimizing performance.

4. Press Mount. If mount: Operation not permitted error appears, do:

su


mount -o rw,noatime,nolock,rsize=8192,wsize=8192 192.168.1.100:/mnt/data /sdcard/nfs_share

โš ๏ธ Attention: MIUI 13+ mounting /etc/fstab In this case, use the Termux application with termux-nfs: pkg install termux-nfs nfsmount. 192.168.1.100:/mnt/data /data/data/com.termux/files/home/nfs_share

Connection check and error correction

After mounting, check the availability of files:

  • ๐Ÿ“‚ Open the File Manager MIUI and go to the file. /sdcard/nfs_share.
  • ๐Ÿ“ฅ Try copying a test file (e.g. test.txt) in both directions.
  • ๐Ÿ“Š Run the speed test with the help of A1 SD Bench (Random Write section) Normal values for NFS: 20-30 MB/s on Wi-Fi 5 GHz.

Common mistakes and their solutions:

Mistake.Reason.Decision
Permission deniedIncorrect rights on the server or clientOn the server: chmod 777 /mnt/dataIn mounting options: add soft,intr
No route to hostNetwork screen blocks port 2049Disable the firewall on the server: ufw allow 2049/tcp
Stale file handleThe server restarted and the client did not update the descriptors.Rewire the folder: umount /sdcard/nfs_share; mount...

๐Ÿ’ก

If the data rate is below 10MB/s, try reducing the packet size in the mount options: replace the rsize=8192,wsize=8192 on the rsize=4096,wsize=4096. This will help on unstable networks.

4. Organization NFS-servers on Xiaomi Redmi 9T

If you need to distribute files from a smartphone, you will need to install NFS-This scenario is suitable for temporary data exchange (for example, transferring photos to a PC without any need for a computer). USB-cable) or backup.

Installation of server software

1. Get root rights with Magisk (instructions for Redmi) 9T available XDA).

2. Install the Servers Ultimate Pro app (cost) ~5$) free-of-charge NFS Server by Ice Cold Apps.

3. In the server settings, specify:

  • ๐Ÿ“‚ Export Path: Export folder (e.g., export folder, /sdcard/DCIM/Camera).
  • ๐Ÿ”’ Permissions: Read-Write (if you need a record) or Read-Only.
  • ๐ŸŒ Allowed IPs: The range of your network (e.g, 192.168.1.0/24).
  • ๐Ÿ”„ Port: 2049 (default) or other free port.

4. Start the server and check its availability from another device:

showmount -e 192.168.1.XX # IP of your Redmi 9T


mount -t nfs 192.168.1.XX:/sdcard/DCIM/Camera /mnt/nfs_test

4.2. Optimization of server performance

By default. NFS-Android servers are synchronous, which guarantees data integrity but reduces speed. For temporary tasks (such as copying files), you can turn on asynchronous mode:

  • ๐Ÿ”ง In the server settings add the option async.
  • ๐Ÿ“ถ Turn off background tasks in Settings โ†’ Battery โ†’ Performance mode.
  • ๐Ÿ”Œ Connect your smartphone to charging โ€“ this will prevent restriction CPU energy-saving.

โš ๏ธ Note: When using Redmi 9T how NFS-The server temperature of the processor can reach 60-70ยฐC under intense load. Watch the heating using the app AIDA64 And take breaks every time. 30 minute.

How to check the load on CPU during work NFS-server?
Open Termux and execute the command: watch -n 1 "cat /proc/loadavg && top -n 1 -d 0.5 | grep -E 'CPU|Nfsd' Normal load: load average below 2.0. If the values are higher 4.0 โ€” Reduce the number of connections or disable background processes.

5. Alternative ways of connecting NFS

If the standard methods do not work (for example, due to limitations) MIUI), Consider alternative options:

5.1.Use of Termux for mounting

Termux with termux-nfs package allows you to mount NFS without root rights, but with restrictions:

  1. Install Termux and do:
  2. Create a folder for mounting:
  3. Connect to the server:

Limitations:

  • ๐Ÿ”ด Access only from Termux (not visible in the standard file manager).
  • ๐Ÿ”ด No auto-mounting when restarting.
  • ๐ŸŸข Plus: It works without root rights.

5.2 Total Commander application with plugin NFS

1. Install Total Commander and plugin NFS Plugin.

2. In the settings of the plugin, specify:

  • ๐Ÿ“Œ IP-server address.
  • ๐Ÿ“ The road to exports.
  • ๐Ÿ”‘ Login/password (if authentication is required).

3. Connect as if to a network drive.

Advantage: Integration with Android file system, but speed is lower than that of the Android file system NFS Manager.

5.3. Circumvention of restrictions MIUI assisted ADB

If the mounting is blocked by the system, try to execute the command through ADB:

adb shell


su




mount -t nfs -o rw,noatime,nolock,rsize=8192,wsize=8192 192.168.1.100:/mnt/data /sdcard/nfs_share

If there is a mount error: /sdcard/nfs_share: No such file or directory, create a folder in advance:

mkdir /sdcard/nfs_share


chmod 777 /sdcard/nfs_share

๐Ÿ’ก

Nana MIUI 14 and newer mounting NFS You can't use fstab without modifying the kernel. Use wrapping applications or Termux.

6. Security and optimization NFS Xiaomi Redmi 9T

NFS โ€” protocol without built-in encryption, so it is important to ensure data protection:

6.1 Basic security measures

  • ๐Ÿ” Restrict access to IP: server-configuration (/etc/exports) Only provide trusted addresses:
  • ๐Ÿ›ก๏ธ Use it. VPN: If you need access from the outside, pick up WireGuard or OpenVPN on the router.
  • ๐Ÿ”‘ Disable anonymous access: in export options add no_all_squash.
  • ๐Ÿ“ก Change the port. NFS: default 2049, So, that makes it easier to scan the network. /etc/sysconfig/nfs.

Performance optimization

To increase the data transfer speed:

ParameterRecommended valueThe effect
rsize, wsize8192 (for Wi-Fi 5 GHz)4096 (for unstable networks)Increases package size, reducing overhead costs
timeo14Reduces the timeout of waiting for a response from the server
retrans2Number of repeated attempts in case of error
noatimeTurn onDisables file access time recording, speeding up operations

Example of an optimized mounting command:

mount -t nfs -o rw,noatime,nolock,rsize=8192,wsize=8192,timeo=14,retrans=2 192.168.1.100:/mnt/data /sdcard/nfs_share

Monitoring and logging

To debug the problems, use:

  • ๐Ÿ“œ Server Logs (Linux): tail -f /var/log/syslog | grep nfs.
  • ๐Ÿ“Š Statistics NFS on the client: nfsstat -c (Termux).
  • ๐Ÿ” Port check: nmap -p 2049 192.168.1.100.

โš ๏ธ Attention: Xiaomi Redmi 9T s MIUI 13+ log (/dev/log) Unavailable without root rights. Use MatLog or Logcat Extreme to collect logs.

7. Solving common problems

Even with the right setup, you can get errors.

Error "mount: Operation not permitted"

Causes and solutions:

  • ๐Ÿ”น No root rights: use Termux or apps without mounting in /system.
  • ๐Ÿ”น SELinux in enforcing mode: check status with getenforce command. If Enforcing, temporarily transfer to Permissive:
  • ๐Ÿ”น Prohibition of mounting in MIUI: try mounting in /data/local/tmp instead /sdcard.

Slow data transfer speed

Check the following parameters:

  • ๐Ÿ“ถ Wi-Fi quality: Use a network analyzer (such as WiFi Analyzer) to check for interference.
  • ๐Ÿ”„ Protocol Version: Forced to specify nfsvers=3 in mounting options (sometimes faster than NFSv4).

7.3 Loss of connection after sleep

By default, Android breaks network connections when it goes to sleep.

  • ๐Ÿ”‹ Turn off the battery optimization for NFS Manager in Settings โ†’ Annexes โ†’ Permits โ†’ Optimizing the battery.
  • ๐Ÿ”„ Enable permanent Wi-Fi retention:
  • ๐Ÿ”Œ Use Tasker to automatically rewire after waking up.

Error "Stale file handle"

It occurs when a server is restarted or changes in the folder exported.

  • ๐Ÿ”„ Rewire the folder: umount /sdcard/nfs_share; mount....
  • ๐Ÿ“‚ On the server, perform: exportfs -ra.
  • ๐Ÿ”ง In the mounting options add soft (allows interruption of operations in case of errors).

๐Ÿ’ก

If the problem recurs, check the time synchronization between the client and the server. A difference of more than 5 minutes can cause authentication errors.

FAQ: Frequent questions on NFS Xiaomi Redmi 9T

โ“ Can we set up? NFS rootless?
Yes, but with limitations: ๐Ÿ”น Apps like this NFS Manager or Total Commander allows you to mount folders in user space (/sdcard). ๐Ÿ”น In Termux you can connect to the NFS No root, but files will only be available inside the terminal. ๐Ÿ”น Auto-mounting when loading is impossible without root rights. /system, Automatic connection) Root is mandatory.
โ“ What's the maximum speed? NFS on the Redmi 9T?
Performance depends on several factors: Wi-Fi speed 5 GHz, server to SSD30-40 MB/s Wi-Fi 2.4 GHz10-15 MB/s USB-Ethernet adapter (100 Mbit)10-12 MB/s Server on HDD15-20 MB/s (restricted to disk) For comparison: SMB on the same device gives ~20-25 MB/s, a FTP โ€” 15-18 MB/s.
โ“ Why? NFS shuts down after restart?
Android does not keep the mount state between reboots.Solutions: Use Tasker to automatically mount after boot. Add the command to /data/local/userinit.sh (required root: mount -t nfs -o... 192.168.1.100:/mnt/data /sdcard/nfs_share V NFS Manager enable Auto-mount on boot (not working on all firmware).
โ“ Can I use it? NFS video-streaming?
Yes, but with reservations: ๐ŸŸข Supported formats: NFS transfers files without conversion, so playback depends on the codecs in the player. ๐Ÿ”ด Buffering: Stuttering is possible in unstable Wi-Fi. Use caching players (e.g., caching players, VLC or MX Player). ๐Ÿ“ถ Recommendations: For Full HD (1080p) You need a speed of at least 20 MB/s. Use the rsize option=32768,wsize=32768 for large files. Turn off Wi-Fi Power Save Mode in router settings.
โ“ How to turn off NFS, if he's no longer needed?
For unmounting, perform: umount /sdcard/nfs_share If the folder is busy, find the processes: lsof | grep /sdcard/nfs_share kill -9 [PID] To completely remove configuration: Remove the line from /etc/fstab (If you've added it, delete the mount folder: rmdir. /sdcard/nfs_share. V NFS Manager removes the saved connection.