What is NFS and why you need it on your smartphone
Protocol NFS (Network File System allows you to connect remote folders as local drives, which is convenient for working with large files, backup or streaming media. 9C (model M2006C3LG helio-chip G35) NFS It's supported at the Android kernel level, but it requires manual tuning. SMB or FTP, NFS Provides faster read/write speeds with a stable network connection 80-90 MB/s on gigabit routers.
Main use cases NFS on the Redmi 9C:
- ๐ Storage of films and music on NAS (For example, Synology or a homemade server on a Raspberry Pi with access directly from a gallery or player.
- ๐ Automatic photo backup via rsync or Tasker.
- ๐ฎ Connecting game images (ISO) emulator PPSSPP Dolphin without internal memory.
- ๐ Work with databases or projects in Termux (e.g., nginx web server with files on the Internet) NFS-ball).
Important: Redmi 9C It works on Android. 10/11 (depending on the version MIUI), support NFS It's implemented through the kernel module nfs.ko. However, by default it's disabled - it needs to be activated manually or using third-party applications. NFS (v3 or v4) and router settings.
Requirements and preparation for setting up
Before the connection NFS Make sure your network meets the minimum requirements:
| Component | Requirements | Recommendations |
|---|---|---|
| router | Support NFS-server (or separate device with a NFS, for example, NAS) | OpenWRT (Xiaomi Mi Router) 4A Gigabit) or firmware DD-WRT |
| Network connection | Stable Wi-Fi 5 (802.11ac) or Ethernet (through USB-adapter) | Use 5 GHz channel to minimize delays |
| Smartphone | Xiaomi Redmi 9C root-rights or client-app | Firmware MIUI 12.5+ (stable-version) |
| NFS-server | Installed nfs-kernel-server (Linux) or enabled service NAS | You can use the tests for this. NFS-server on a PC (for example, through haneWIN) NFS Windows) |
If you are planning to connect to NAS (for example, Synology DS220+ or QNAP TS-251), check in on his settings:
- Is the service on? NFS in the control panel (usually in the File Service section) โ NFS).
- Whether an access rule has been added to your routerโs subnet (for example, 192.168.1.0/24).
- Whether the user has read/write rights (anonymous or nobody is often used by default).
โ ๏ธ Attention: On Redmi 9C rootless NFS You can only connect through third-party applications (for example, NFS Manager, but they are slower due to the limitations of Android.To fully integrate (mount as a system folder) you will need Magisk and a module. NFS Mount System.
Connection methods NFS on the Redmi 9C
There are three main methods of adjustment NFS Xiaomi Redmi 9C, Each of which is suitable for different scenarios:
1. Through the application without root (the easiest way)
If you do not have root rights, use the app. NFS Manager from Google Play. It creates a virtual drive in the /storage/emulated/0/NFS And he mounts the remote folder there, and the speed is limited because of the work through the FUSE (Userspace Filesystem, but for media files, this is enough.
Install the application NFS Manager from Google Play
Connect to the same network as you NFS-server
Find out. IP-server address and path to the ball (e.g, /mnt/nas/media)
Shut down. VPN Proxies (they can block local traffic)-->
2. Through Termux with manual mounting (for experienced)
If you have Termux installed, you can connect it. NFS This is a method that requires Linux knowledge, but it gives you more control, like temporarily mounting a folder:
pkg install nfs-utils
mkdir ~/nfs_mount
mount -t nfs 192.168.1.100:/mnt/nas/media ~/nfs_mount -o soft,udpWhere 192.168.1.100 โ IP yours NFS-servers, and /mnt/nas/media โ For automatic mounting when Termux starts, add a command to ~/.bashrc.
3. Through Magisk and system mounting (maximum performance)
This is a good way for users with an unlocked bootloader and Magisk installed. NFS The Mount System that Integrates NFS It's like a native disk:
- ๐ The speed is close to local memory (due to direct mounting in the computer). /system).
- ๐ฑ Folders are displayed in the standard file manager MIUI.
- ๐ Automatic connection when loading a smartphone.
Disadvantage: Requires manual editing /etc/fstab It may cause problems when updating. MIUI.
๐ก
If you use NFS For video streaming, add rsize option to the mounting options=8192,wsize=8192 โ This will increase the read/write buffer and reduce stuttering when playing.
Step-by-step adjustment NFS through NFS Manager
Consider the most affordable way - connecting through the application NFS Manager without root rights. This method works on Redmi. 9C any version MIUI (including MIUI 12.5 and MIUI 13).
Step 1: Installation and preparation
- Download NFS Manager from Google Play.
- Open the application and provide all the permissions requested (storage, network).
- On the main menu, click + (Add a server).
Step 2: Configure the connection
Fill in the fields as follows:
- Server Name: Any convenient name (e.g., My name) NAS).
- IP-Address: Local IP yours NFS-servers (e.g. 192.168.1.100).
- Port: Leave 2049 (standard port) NFS).
- Exportable folder: The path to the ball on the server (for example, /mnt/nas/media).
- Mounting point: folder on the smartphone, where the disk will be connected (by default) /storage/emulated/0/NFS/server).
- Version. NFS: Choose. NFSv3 (more stable on Android, or NFSv4 (If the server supports it).
Step 3: Additional parameters
In the additional section, it is recommended to indicate:
- soft โ for automatic reconnection at a cliff.
- udp or tcp - Transfer protocol (TCP more stable but slower).
- rsize=32768,wsize=32768 โ Increase the size of the buffer for large files.
Example of a parameter string:
soft,udp,rsize=32768,wsize=32768,timeo=14Step 4: Connection and verification
Click Save, then go back to the main menu and tap on the server you created. /storage/emulated/0/NFS You'll see a new directory with files from the server. Check the read/write speed with the DiskSpeed app on Redmi. 9C It should be no lower. 10-15 MB/s.
โ ๏ธ Note: When connecting through NFS Manager files on the smartphone take place in the /storage/emulated/0, But it's physically stored on the server. NFS manually โ this can lead to errors in the application.
๐ก
NFS Manager is suitable for most tasks, but does not support automatic mounting when rebooting. NFS Plugin.
Setting up NFS via Termux (for advanced users)
If you prefer to work through a console, Termux gives you full control over the console. NFS-This method requires basic knowledge of Linux commands, but allows you to flexibly configure settings.
Step 1: Establishing dependencies
Open Termux and do:
pkg update && pkg upgrade
pkg install nfs-utils openssl-tool proot-distroThis will install utilities to work with NFS, and proot-distro to isolate the environment (optional).
Step 2: Creating a mounting point
Create a folder where it will be mounted NFS:
mkdir ~/nfs_shareFor continuous installation, add a line to ~/.bashrc:
echo"mount -t nfs 192.168.1.100:/mnt/nas/media ~/nfs_share -o soft,udp" >> ~/.bashrcStep 3: Mounting and working with files
Run the mounting command:
mount -t nfs 192.168.1.100:/mnt/nas/media ~/nfs_share -o soft,udp,rsize=8192,wsize=8192Check the result:
df -h | grep nfsIf you're successful, you'll see a string of information about the disk you've connected to. You can now work with files through cd. ~/nfs_share.
Step 4: Automatic connection when Termux starts
So NFS It is automatically installed, edit the file. ~/.bashrc:
nano ~/.bashrcAdd to the end:
if [! -d ~/nfs_share ]; then
mount -t nfs 192.168.1.100:/mnt/nas/media ~/nfs_share -o soft,udp,rsize=8192,wsize=8192
fiSave it (Ctrl)+O) and close (Ctrl)+X) editor. NFS It will be connected every time Termux is launched.
โ ๏ธ Note: When using Termux files in ~/nfs_share They're only available inside the application, and to make them visible to other programs (like galleries), you need to mount a folder in the app. /sdcard using termux-setup-storage and creating a symbolic link.
How do you do it? NFS-Files are available for all applications?
Addressing common mistakes
When you set up NFS on the Redmi 9C You can have typical problems. Here's how to fix them:
1. "Permission denied" error
Reason: Incorrect access rights on the server or incorrect mounting parameters.
- ๐ง Check the file on the server. /etc/exports โ it should have a line of form:
- ๐ง Reset it. NFS-server:
2. Slow reading/write speed
Reason: Suboptimal mounting parameters or congested network.
- ๐ถ Try changing the protocol from udp to tcp (or vice versa).
- ๐ Increase the buffer size: add rsize to the settings=32768,wsize=32768.
- ๐ก Check the load on the router โ if it is overloaded, NFS will slow down.
3.The connection is broken after sleep
The reason: Android shuts down network connections in power saving mode.
- โก Add Termux or NFS Manager excludes battery optimization:
- ๐ In the settings of installation, specify timeo=14,retrans=2 for more aggressive reconnection.
4. It is impossible to write files (read only)
Reason: The server does not have a write permission for your IP.
- ๐ง Edit it. /etc/exports on the server, adding rw:
- ๐ง Check the file rights:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: Operation not permitted | No root rights or module NFS loadless | Use it. NFS Manager or get root |
| Stale file handle | The server rebooted or changed the exported folder | Remount the disk or restart it NFS-server |
| No route to host | Smartphone and server in different subnets | Check the router settings or use VPN |
| Connection timed out | Firewall blocks port 2049 | Open the port on the router and server |
๐ก
If you use NFS for backup, configure on the snapshot server (for example, via rsnapshot) โ this will protect your data from accidental deletion from your smartphone.
Optimizing NFS Performance
To maximize the speed of work NFS on the Redmi 9C, follow these recommendations:
1. Network setup
- ๐ถ Use 5 GHz Wi-Fi instead of 2.4 GHz โ this reduces latency.
- ๐ If possible, connect via Ethernet. USB-adapter (e.g, USB-C to Ethernet from UGREEN).
- ๐ก On the router, turn on Jumbo Frames (MTU 9000 โ This speeds up the transfer of large files.
Mounting parameters
Optimal Options for Redmi 9C:
rw,soft,intr,tcp,rsize=65536,wsize=65536,timeo=600,retrans=2Explanation:
- rw is reading and writing.
- Tcp is more reliable than UDP, stable-network.
- rsize/wsize=65536 โ Maximum buffer size for Helio G35.
- timeo=600 โ Extended timeout for slow networks.
3. Server configuration
On the side. NFS-server (Linux/NAS):
- ๐ฅ๏ธ Increase the number of flows NFS-server:
- ๐ฆ Optimize the file system: for ext4 add in /etc/fstab Options noatime, nodiratime.
- ๐ If you use Synology/QNAP, turn on the caching NFS service settings.
4. Speed testing
Check the performance with Termux:
pkg install iperf3
iperf3 -c 192.168.1.100 # Network Speed Test
dd if=/dev/zero of=~/nfs_share/testfile bs=1M count=100 # Recording test
dd if=~/nfs_share/testfile of=/dev/null bs=1M # Reading testNormal performance for Redmi 9C:
- ๐ฅ Reading: 30-50 MB/s (wi-fi), 70-90 MB/s (Ethernet).
- ๐ค Recording: 10-20 MB / s (limiting the flash memory of the smartphone).
โ ๏ธ Attention: On Redmi 9C firmware MIUI Global Stable 12.5.4 and later may have a cliff problem NFS-Connected to long-term work due to aggressive memory management. MIUI 12.0.8 or use the Disable Memory Killer module".