NFS setup on Xiaomi 10: from connecting to the server to fixing errors

Network file system NFS (Network File System allows you to turn your Xiaomi 10 into a full-fledged client for working with remote storage. NAS, Linux server or even cloud-based protocol-enabled solutions, but standard Android settings don't include NFS-Customers need to use additional tools.

In this article, we will discuss three main ways to set up NFS on Xiaomi 10: through Termux with manual mounting, using the NFS Manager application, and through ADB for power users. We will focus on common errors (for example, mount: permission denied or no route to host) and how to fix them, if you plan to work with large amounts of data or integrate your smartphone into the local network – this guide is for you.

Preparation: What you need to set up NFS

Before you start setting up, make sure you have everything you need:

  • πŸ“± Xiaomi 10 smartphone (or other model based on the MIUI 12+) with or without root rights (for some methods.
  • πŸ–₯️ NFS-server (can be configured for Linux, Synology, QNAP or even Windows with additional software).
  • 🌐 Stable connection to the local network (Wi-Fi or Ethernet via the Internet) USB-adapter).
  • πŸ”§ Termux application (for manual mounting) or NFS Manager (for simplified configuration).

If you are using Termux, update the packages before you start:

pkg update && pkg upgrade


pkg install nfs-utils

⚠️ Note: On Xiaomi 10 C models MIUI 14+ You may need to disable the function MIUI Optimization in the developer settings. Otherwise, some teams in Termux will not work properly.

Also check that on NFS-server is allowed access to IP-You can edit the file to do that. /etc/exports on the server and add a line of view:

/path/to/folder 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)

Where 192.168.1.0/24 is the subnet of your local network.

πŸ“Š What kind of setting NFS you prefer?
Through Termux.
With the help of NFS Manager
Through ADB
I haven't tried it yet.

Method 1: Configure NFS over Termux (without root)

This method is suitable for users who do not want root access, but are ready to work with the command line. Termux provides a full Linux terminal on Android, which allows you to mount the device. NFS-pairs directly from the smartphone.

Steps to set up:

  1. Install Termux from F-Droid (Google Play version is stripped down).
  2. Update the repositories and install nfs-utils:
  3. Create a folder for mounting:
  4. Connect. NFS-ball:
mkdir ~/nfs_mount


mount -t nfs 192.168.1.100:/path/to/folder ~/nfs_mount -o soft,intr,rsize=8192,wsize=8192

Where:

  • 192.168.1.100 β€” IP-address NFS-server.
  • /path/to/folder: Exported directory on the server.
  • rsize/wsize β€” Read/write block sizes (optimum) 8192 local-network).

⚠️ Warning: Termux mounting is temporary - after restarting the smartphone connection will break. ~/.termux/boot/.

β˜‘οΈ Preparation of Termux for NFS

Done: 0 / 5

Method 2: Using NFS Manager (the easiest option)

Annex NFS Opensource Developer Manager Simplifies Connection Process NFS-It does not require root rights and is suitable for most Xiaomi 10 users.

Instructions for setting:

  1. Download NFS Manager from Google Play.
  2. Open the app and click + to add a new server.
  3. Enter the data: πŸ“Œ Server IP β€” address NFS-servers (e.g., servers, 192.168.1.100). πŸ“ Export Path – the path to the exported folder (for example, /mnt/nas/shares). πŸ”‘ Mount Point – Local folder on your smartphone (for example, /storage/emulated/0/NFS).
  4. Select the mounting options: βœ… Soft Mount – Automatically breaks connection in case of errors. βœ… TCP β€” A more stable protocol than UDP. ❌ Read Only – uncheck if you need a record.

Mount

If the mounting is successful, the NFS folder will appear in the file manager (for example, in Mi File Manager). To automatically connect when you start the device, activate the Auto Mount option in the application settings.

πŸ’‘

If the NFS Manager doesn’t see the server, make sure the router doesn’t block port 2049 (the default for NFS).

Method 3: Manual mounting through ADB (for experienced)

This method is suitable for users who have access to the ADB And they're willing to work with system teams. NFS-Android-level pairs, which gives you better stability but requires additional rights.

Step-by-step:

  1. Activate Debugging by USB in the developer settings (Settings β†’ About Phone β†’ MIUI version – tap 7 times).
  2. Connect your smartphone to your PC and do:
adb shell


su




mkdir /data/nfs




mount -t nfs -o nolock,soft 192.168.1.100:/path/to/folder /data/nfs

For permanent mounting, add a line to /etc/fstab:

192.168.1.100:/path/k/folder /data/nfs nfs rw,soft,intr 0

⚠️ Note: Changing fstab on Xiaomi 10 can lead to a cyclical reboot if the settings are incorrect!

To check the success of the installation, do:

df -h | grep nfs

Typical errors and their solutions

When setting up NFS on Xiaomi 10, users often encounter errors. Let’s consider the most common and ways to fix them:

Mistake.Reason.Decision
mount: permission deniedNot enough rights on the server or client.Check it out. /etc/exports Add a parameter to the server. no_root_squash. In Termux, use proot to emulate root.
no route to hostNetwork problems or firewall.Check the ping to the server. Turn off the firewall on the router/server. Make sure the smartphone and server are on the same subnet.
stale file handleThe server has rebooted or changed its export.Remount the ball (umount + mount). Re-start the nfs server on the host.

If you see an operation not allowed error in Termux, try:

  • πŸ”„ Restart Termux with Cache Cleanup.
  • πŸ“± Use another version of nfs-utils (e.g. compiled under the aarch64).
  • πŸ”§ Disable SELinux (temporary solution, not recommended for permanent use).
What to do if the NFS is slowing down?
If the data rate is low, try: - Increase rsize and wsize to 32768 (for gigabit networks). - Switch from Wi-Fi to Ethernet (via Wi-Fi). USB-Adapter. - Disable encryption on the router (if used) WPA3). - Check the loading. CPU server (may not have enough power to handle requests).

Optimizing NFS Performance on Xiaomi 10

By default, NFS can run slower than local storage. To improve performance, follow these tips:

  • πŸš€ Use the protocol. NFSv4 instead NFSv3 β€” It supports better caching and security.=4.0 to the mounting command.
  • πŸ“Ά Set up. MTU β€” If you use Wi-Fi, install mtu.=1472 to avoid packet fragmentation.
  • πŸ”„ Enable asynchronous recording on the server (async parameter in the /etc/exports), But remember, it reduces reliability.
  • πŸ“‘ Turn off Wi-Fi power saving in Xiaomi 10 settings (Settings) β†’ Wi-Fi β†’ Additionally. β†’ Energy saving regime).

You can use Termux to test the speed:

cd ~/nfs_mount


dd if=/dev/zero of=testfile bs=1M count=100




dd if=testfile of=/dev/null bs=1M

The first team tests the recording, the second one reads, and the normal speed for a gigabit network is 30-50MB/s.

πŸ’‘

For maximum performance, use a wired connection (USB-Ethernet adapter) and NFSv4 with rsize=32768,wsize=32768,hard,intr.

How to protect data when using NFS

NFS does not initially encrypt traffic, so it is important to take measures to protect data:

  • πŸ”’ Restrict access by IP β€” into /etc/exports Only provide trusted addresses.
  • 🌐 Use it. VPN β€” if you need to connect to NFS From the outside, set up WireGuard or OpenVPN.
  • πŸ”‘ Enable Kerberos – for user authentication (requires server settings).
  • πŸ“‚ Set up rights – export folders with minimum permissions (ro for reading, rw only if you need to write).

On Xiaomi 10 you can also use Scoped Storage to restrict access to mounted applications NFS-For that, folders:

  1. Open Settings β†’ Applications β†’ Permissions Management β†’ Files and Multimedia.
  2. Select the application that you want to give access to NFS.
  3. Allow access to specific folders only (e.g. /storage/emulated/0/NFS).

⚠️ Attention: If you are connecting NFS To a public network (such as a cafe or hotel), never mount folders with rights to write. Use only ro (read-only) mode).

FAQ: Frequent questions about setting up NFS on Xiaomi 10

Can I connect NFS without root rights?
Yes, with Termux or NFS Manager can be mounted NFS-However, such connections will be temporary and may have speed limits.
Why after the reboot NFS-folder disappears?
This is normal behavior for mounting via Termux or NFS Manager. To restore the connection automatically: In Termux, use the script in the ~/.termux/boot/. V NFS Manager activate the Auto Mount option.
How to connect to NFS via mobile Internet (4G/5G)
To do this, you will need to set up port port port port port port transfer on the router (port 2049 for the router). NFS). Use dynamic DNS (For example, No-IP for access to the home IP. Set up VPN (recommended for safety. ⚠️ No VPN The data transmission will be in an open form!
Can I use NFS for backup?
Yeah, but keep it in mind: πŸ“‰ The backup speed will be lower than when using local storage. πŸ”„ When the connection is broken, the copy may be incomplete. πŸ”’ For critical data, it is better to use rsync with checksum verification. Example of a command to back up via Termux: rsync -avz --progress /sdcard/DCIM/ ~/nfs_mount/backup/
Does MIUI 14 NFS support out of the box?
No, the standard firmware Xiaomi 10 is not built-in NFS-It requires one of the solutions described in the article, but some custom firmware (e.g. LineageOS) support NFS may be enabled by default.