Xiaomi Redmi 9 is a budget smartphone with good technical characteristics, but many users face the limitations of internal memory. One effective solution to expand storage without buying microSD or cloud services is to connect using the protocol. NFS (Network File System: This method allows you to mount remote folders from a computer or NAS as local, saving space on the device and simplifying access to files.
Unlike the more popular ones. SMB or FTP, NFS offers high data transfer speeds and minimal overhead, which is especially important for working with large files (video, backups, projects). NFS Android, and especially Redmi 9 with a shell MIUI β In this article, we'll look at the step-by-step process, from server preparation to mounting folders on your smartphone, including solving common errors.
It is important to understand that MIUI supportive NFS "Out of the box, you'll need root access or third-party apps. If you're not rooting, consider alternatives like WebDAV or SSHFS. If the goal is maximum productivity, NFS It's the best choice.
What is it? NFS And why is he better? SMB/FTP for Redmi 9
Protocol NFS (Network File System was developed by Sun Microsystems in 1984 for Unix systems, but is still widely used for its simplicity and efficiency. SMB (used in Windows) or FTP, NFS:
- π Minimum overhead: Data transfers occur almost without delay, which is critical for streaming video or working with databases.
- π Without unnecessary authentication: after the initial setup, access to folders is transparent, without constant login / password requests.
- π Full file system integration: mounted folders are displayed as local, symbolic links and Unix access rights are supported.
- π οΈ Flexibility of settings: you can restrict access to IP, setting quotas and using kerberos for encryption.
On the Redmi. 9 with a MediaTek Helio processor G80 and MIUI 12-14 NFS It has better results than alternatives:
| Protocol | Reading speed (Mbps) | Recording speed (Mbps) | Delay (ms) | Demands a root |
|---|---|---|---|---|
| NFS v3 | 85-95 | 70-80 | 1-3 | Yes. |
| SMB (Samba) | 60-70 | 50-60 | 5-10 | No. |
| FTP | 40-50 | 30-40 | 10-20 | No. |
| WebDAV | 30-40 | 25-35 | 15-30 | No. |
Tests were conducted on Redmi 9 with Wi-Fi connection 5 GHz (Xiaomi router) AX3600) ce NAS synology-based DS220+. The performance difference is particularly noticeable when working with small files (e.g. Termux projects or adb backups).
β οΈ Attention: NFS v4 Supports encryption (through encryption) krb5), But it's very difficult to set up on Android. NFS v3 restricted IP into /etc/exports.
Requirements and preparation before setting up NFS
Before you start setting up, make sure your device and network meet the minimum requirements:
- π± Xiaomi Redmi 9 with unlocked bootloader and root access (required for mounting) NFS mount).
- π₯οΈ NFS-server: it can be a computer under the Linux/macOS, NAS (Synology, QNAP), Or even a router with OpenWRT firmware.
- π Local area network: both devices must be on the same subnet (e.g, 192.168.1.x/24).
- π Stable connection: for NFS Recommended Wi-Fi 5 GHz or wired connection (via USB-Ethernet adapter).
If root access is not available, you can use applications like NFS Manager (requires Android 8.0)+), But they're limited in functionality:
Unlock the bootloader via fastboot oem unlock|
Install custom recovery (TWRP) |
Get root access (Magisk)|
Install BusyBox or Termux with nfs-utils|
Check for core support NFS (cat /proc/filesystems | grep nfs)-->
On the Redmi. 9 s MIUI 12.5+ support NFS The kernel is disabled by default. To activate it, you need to edit the file. /boot/init.rc Or use the Magisk module. NFS Enabler.
Also prepare. NFS-For example, on the server. Ubuntu/Debian packet-in:
sudo apt update && sudo apt install nfs-kernel-serverAnd Synology. DSM activate the service NFS control panel β File service β NFS.
Desktop PC (Linux/macOS)|NAS (Synology, QNAP)|Router (OpenWRT, DD-WRT)|Cloud server (VPS)|Another option-->
Step-by-step adjustment NFS-server for Redmi 9
Consider the server configuration using Ubuntu 22.04 LTS. If you have a different distribution or NAS, The principles will be similar, but the paths to configuration files may be different.
1. Installation of necessary packages
Open the terminal on the server and do:
sudo apt update
sudo apt install nfs-kernel-server rpcbind2. Creating and configuring an exported folder
Create a directory that you will mount on Redmi 9 and assign rights to:
sudo mkdir -p /mnt/nfs_share
sudo chown nobody:nogroup /mnt/nfs_share
sudo chmod 777 /mnt/nfs_share # Test only!Later restrict permissions.Edit the file. /etc/exports:
sudo nano /etc/exportsAdd a line (replace 192.168.1.100 with a line) IP your Redmi 9):
/mnt/nfs_share 192.168.1.100(rw,sync,no_subtree_check,no_root_squash)3. Restarting services and applying settings
Update the list of exported folders and restart the server:
sudo exportfs -a
sudo systemctl restart nfs-kernel-server4. Accessibility check NFS
Make sure the folder is exported correctly:
sudo exportfs -v
showmount -e localhostIf everything is right, you will see the way. /mnt/nfs_share conclusionally.
β οΈ Attention: Parameter no_root_squash Redmi allows you to 9 You can write files on the root name. It's not safe for public networks. On the local network, the risk is minimal, but for additional protection, limit access to the Internet. IP Use rw only for trusted devices.
Setting up NFS-Customer on Xiaomi Redmi 9
On the smartphone side there are two main ways to connect to the NFS: via Termux (no root) or directly through mount (requires root.
Method 1: Connect via Termux (without root)
If you donβt have root access, install Termux from F-Droid (the version from Google Play is outdated) and do:
- Update packages and install nfs-utils: pkg update && pkg upgrade pkg install nfs-utils
- Create a mounting point: mkdir ~/nfs_mount
- Connect the folder (replace). 192.168.1.10 on IP servers: mount -t nfs -o soft,udp 192.168.1.10:/mnt/nfs_share ~/nfs_mount
To install the folder automatically when Termux is started, add a command to the ~/.bashrc.
Method 2: Constant mounting with root access
If you have a Magisk, the process is simplified:
- Install the module. NFS Enabler via Magisk (activated support) NFS core).
- Create a folder for mounting: su mkdir /data/nfs_share
- Edit it. /etc/fstab (Or create it if you donβt: echo "192.168.1.10:/mnt/nfs_share /data/nfs_share nfs rw,soft,udp 0 0" >> /etc/fstab
- Apply the settings: mount -a
Once the folder is rebooted, it will be mounted automatically, and you can check the connection by command:
df -h | grep nfsπ‘
If the mounting is not working, check that the server is allowed. UDP-connection (parameter udp in /etc/exports). Tcp can be used for stability, but this will increase the load on the network.
Solving Typical Errors in Configuration NFS Redmi 9
Even if you follow the instructions accurately, you can get errors, and let's look at the most common ones and how to fix them.
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: unknown filesystem type 'nfs' | Support is off in the core. NFS | Install the module. NFS Enabler via Magisk or reassemble the kernel with the option CONFIG_NFS_FS=y |
| Permission denied | Incorrect rights in /etc/exports SELinux | Check the rw parameters,no_root_squash and disable SELinux (setenforce) 0) |
| Connection timed out | Block ports 111 (rpcbind) or 2049 (nfs) | Open ports on the server and router, check the firewall (ufw allow). 2049/tcp) |
| Stale file handle | The server is restarted and the client is trying to use the old descriptor. | Remount the folder (umount) /data/nfs_share; mount -a) |
If files are not displayed in the file manager after mounting (e.g., in Mi File Explorer), try:
- π Reset the device.
- π Use an alternative manager (e.g. Solid Explorer or FX File Explorer).
- π§ Check the file rights. /data/nfs_share (chmod 755 /data/nfs_share).
How to check which ports are listening NFS-server?
Optimizing productivity NFS Redmi 9
By default. NFS It uses settings that are not always optimal for mobile devices. To improve speed and stability, edit the mounting settings.
1.Use of TCP instead UDP
Thought UDP It is considered to be a lighter protocol, TCP It is more reliable for unreliable networks (for example, Wi-Fi). /etc/fstab:
192.168.1.10:/mnt/nfs_share /data/nfs_share nfs rw,soft,tcp,vers=3 0 0Adjust the size of the buffer
Increase the rsize and wsize settings (recommended values for Redmi 9):
mount -o rsize=32768,wsize=32768,soft,udp 192.168.1.10:/mnt/nfs_share /data/nfs_share3. Disabling Attributes (noatime)
To reduce the number of records per server, add:
mount -o noatime,nodiratime,soft 192.168.1.10:/mnt/nfs_share /data/nfs_shareTo check the current speed, use Termux:
dd if=/dev/zero of=/data/nfs_share/testfile bs=1M count=100
dd if=/data/nfs_share/testfile of=/dev/null bs=1Mπ‘
For maximum performance on Redmi 9 is recommended to use NFS v3 tcp,rsize=32768,wsize=32768,noatime. NFS v4 It may be slower due to additional security checks.
Alternatives to NFS for Xiaomi Redmi 9
If the setting NFS If you feel too complicated or have encountered unsolvable errors, consider alternative protocols:
- π SMB (Samba: Easy to set up, runs without root through apps like Mi File Explorer or FX File Explorer: Lower speed, but enough for most tasks.
- π SSHFS: He's mounting a remote folder on SSH. It requires a root or a Termux, but it's reliable and safe. NFS, but above overhead.
- βοΈ WebDAV: Works through HTTP/HTTPS, It's supported by many file files. NFS, but easier to set up.
- π Syncthing: Synchronizes folders by P2P No centralized server, no root, but no streaming.
Comparison of alternatives for Redmi 9:
| Protocol | Speed. | Demands a root | Encryption | Difficulty setting up |
|---|---|---|---|---|
| NFS | βββββ | Yes. | No, only in v4) | Hardly. |
| SMB | βββ | No. | Yes (SMB3) | Just |
| SSHFS | ββββ | Yes/No | Yes (via SSH) | Middle-Average |
| WebDAV | ββ | No. | Yes (HTTPS) | Just |
If your goal is streaming video or working with large files, NFS For backups or rare file access, Syncthing or SMB.