The Network File System (NFS) allows you to turn your Xiaomi Mi 9C into a full-fledged client to access remote folders as if they were on a local device, which is especially useful for working with large files, backing up or organizing a media library without taking up the internal memory of the smartphone. However, standard MIUI firmware does not include NFS support out of the box - it needs to be activated manually.
In this article, we will discuss the entire process: from server preparation (on Linux, Windows or NAS) to fine-tuning the client with Xiaomi Mi 9C. Particular attention will be paid to the nuances of root access, alternative methods without root and solving common errors like βPermission deniedβ or βNo route to host.β If you have never worked with NFS, do not worry: the manual is adapted for beginners, with explanations of each step.
What is NFS and why is it needed for Xiaomi Mi 9C?
NFS is a file networking protocol developed by Sun Microsystems back in 1984 that allows remote directories to be mounted as local directories, which is convenient for:
- π¬ Streaming video without downloading to the device (for example, movies in the 4K s NAS).
- π Backup photos and documents directly to the network storage.
- π Synchronize files between multiple devices (smartphone, PC, TV).
- π₯οΈ Work with large projects (e.g., editing KineMaster videos with files on the server).
On the Xiaomi Mi 9C, NFS can be an alternative to SMB (which often slows down) or cloud services (where speed depends on the Internet channel), the main advantage is the minimum overhead for data transfer over the local network, which is critical for devices with limited resources.
However, there are limitations:
- β οΈ Without root access functionality NFS will be cut down (for example, auto-mounting is impossible when loading).
- β οΈ NFS Do not encrypt traffic by default (for security use) NFS over SSH or VPN).
Requirements and preparation for setting up
Before you start, make sure you have:
| Component | Minimum requirements | Recommendations |
|---|---|---|
| Xiaomi Mi 9C | MIUI 10+, Android 9+ | Update to the latest version of MIUI for stability |
| NFS-server | Linux (Ubuntu/Debian), Windows 10/11 with WSL, or NAS (Synology, QNAP) | For beginners, it is easier to configure on Linux or ready-made solutions such as OpenMediaVault |
| Root access | Optional but expands opportunities | Use Magisk to get root without the risk of "bricking" |
| Local area network | Wi-Fi 5 GHz or Ethernet connection (via adapter) | For stability, give preference to a wired connection |
If you do not have a separate server, you can use:
- π₯οΈ Old PC with Ubuntu Server (minimum requirements: 1 GB of RAM, 20 GB) HDD).
- π¦ Ready. NAS-solution (e.g. Xiaomi Mi) NAS synology DS220+).
- βοΈ Cloudy VPS (Oracle Cloud with a free rate, but it's less secure.
π‘
Before setting up, check the speed of the local network using the WiFi Analyzer app β NFS is sensitive to delays (ping above 50 ms can cause lags).
Setting up NFS-server (for example, Linux)
Consider installing a server on Ubuntu 22.04 LTS β The most universal option. If you have Windows, use it. WSL 2 with Ubuntu distribution, or set up NFS-Windows server via haneWIN NFS (paid NFS4J (Free, but less stable).
Open the terminal on the server and execute the commands:
# Installation of NFS packages
sudo apt update && sudo apt install nfs-kernel-server -y
Creating a directory for access (e.g. /mnt/nfs_share)
sudo mkdir -p /mnt/nfs_share
sudo chown nobody:nogroup /mnt/nfs_share
sudo chmod 777 /mnt/nfs_share # Temporary solution for the test (we will configure the rights more accurately later)
Editing the export file (/etc/exports)
sudo nano /etc/exportsAdd a line to the file (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)Save the file (Ctrl+O, then Ctrl+X) and restart the server:
sudo exportfs -a
sudo systemctl restart nfs-kernel-serverCheck that the folder is exported:
sudo exportfs -vWhat do the parameters in /etc/exports mean?
Setting up NFS-client on Xiaomi Mi 9C
There are two ways to do this: root and no root. Let's look at both.
Method 1: No root (limited functionality)
Install from Google Play app NFS Manager (from the developer of Sparks) It allows you to mount NFS-balls without rue, but with limitations:
- π Manual mounting only (no automatic connection when downloading).
- π Access only to selected applications (e.g, VLC or FX File Explorer).
- β οΈ The speed of operation is lower than with native mounting.
Instructions:
- Open NFS Manager and press + to add a new server.
- Enter. IP servers (e.g., servers, 192.168.1.100) and the path to the file (/mnt/nfs_share).
- Select NFS v3 (v4 may not work without additional settings).
- Press Mount and confirm access.
Method 2: With root access (full functionality)
If you have root, use the Termux or ADB terminal:
su
mkdir /mnt/nfs
mount -t nfs -o rw,soft,intr,rsize=8192,wsize=8192 192.168.1.100:/mnt/nfs_share /mnt/nfsTo mount automatically when booting, add a line to /etc/fstab:
192.168.1.100:/mnt/nfs_share /mnt/nfs nfs rw,soft,intr,rsize=8192,wsize=8192 0 0Make sure that the /mnt/nfs folder exists.
Run mount | grep nfs β your ball should be displayed
Try to create a test file: touch /mnt/nfs/testfile
Check the availability of the file on the server
-->
Solving typical mistakes
When setting up NFS on Xiaomi Mi 9C, the following problems most often arise:
| Mistake. | Reason. | Decision |
|---|---|---|
| mount: Permission denied | Incorrect server rights or firewall block port 2049 | Check /etc/exports and turn off firewall: sudo ufw disable |
| No route to host | The server is not available over the network (incorrect IP or subnet) | Check ping to server and routing settings |
| Stale file handle | The server is restarted and the client is trying to use the old descriptors. | Remount the ball: umount /mnt/nfs &&mount /mnt/nfs |
| Slow work | Small packet size (rsize/wsize) or network congestion | Increase the size to 32,768 and check the load on the router |
β οΈ Note: If files are displayed after mounting but not opened, check the filename encoding. NFS It can be incorrectly working with Cyrillic. Solution: rename files to Cyrillic. UTF-8 or use a parameter -o nolock,vers=3 mounting.
For diagnostics, use the logs on the server:
sudo tail -f /var/log/syslog | grep nfsOptimizing NFS Performance
By default, NFS can run slowly on the Xiaomi Mi 9C due to the limitations of the hardware.
- π§ Increase the size of the read/write buffers in the mounting parameters: mount -o rsize=32768,wsize=32768
- πΆ Connect to a 5 GHz Wi-Fi router or use a USB-Ethernet adapter (e.g., Xiaomi) USB-C to Ethernet).
- π Disable atime (last access time) on the server by adding a /etc/fstab noatime.
- π‘οΈ If you use NFS v4, Turn off idmapping (add) -o noidmap to avoid delays.
To test the speed, use the command:
dd if=/dev/zero of=/mnt/nfs/testfile bs=1M count=100Compare the result with local memory β the difference should not exceed 30-40%.
π‘
For maximum speed, use a combination of mounting parameters: rw,soft,intr,rsize=32768,wsize=32768,noatime,nodiratime,vers=3.
How to protect NFS from unauthorized access
NFS does not encrypt traffic by default, so it is important to limit access to the server.
- π Replace the line in /etc/exports safer: /mnt/nfs_share 192.168.1.105(ro,sync,no_subtree_check,root_squash) (where 192.168.1.105 β IP Your Xiaomi Mi 9C).
- π‘οΈ Set up a firewall to allow connections only from trusted IP: sudo ufw allow from 192.168.1.105 to any port nfs
- π Use it. NFS over SSH (via sshfs) or VPN (WireGuard, for example, if access is required from an external network.
- π‘ Turn off folder export to the Internet: in the router, close port 2049 for external connections.
β οΈ Note: Never use the parameter. no_root_squash In public networks, this allows anyone with root access on the client to have full control of your server. In the home network, the risk is lower, but it is better to limit the rights with the chmod command. 755 exportable.