The Network File System (NFS) protocol allows you to turn your Xiaomi RedmiBook 9 Pro into a distributed file system β the ideal solution for working with large amounts of data, backing up or sharing files on a local network. Unlike Samba or FTP, NFS is optimized for Unix-like systems (including Linux distributions on Xiaomi laptops) and provides high data transfer speeds at minimal overhead.
However, connecting NFS to RedmiBook 9 Pro has nuances, from choosing the correct version of the protocol (NFSv3 vs NFSv4) to setting up the firewall and access rights. In this article, we will discuss three ways of mounting (manual, automatic via /etc/fstab and using autofs), diagnose typical errors like mount.nfs: access denied by server, and optimize performance for working with media files or virtual machines.
If you are using RedmiBook 9 Pro running Windows 11/10, the process will be different β you will need to install additional software (for example, NFS Client for Windows), this instruction focuses on Linux systems (Ubuntu, Debian, Arch), which are more common on these laptops due to their popularity among developers and open source enthusiasts.
1. System Preparation: Checking network settings and dependencies
Before setting up an NFS, make sure your RedmiBook 9 Pro and server are on the same subnet and have a stable connection. Use the ping command to check server availability:
ping 192.168.1.100Replace. IP-address relevant to your NFS-If the ping doesn't go through, check it out:
- π Physical Connection: Ethernet Cable or Wi-Fi Stability (NFS delay-sensitive).
- π‘οΈ Firewall: Server and client must have 2049 ports open (NFS) and 111 (portmapper).
- π‘ Routing: Run an IP route to diagnose network paths.
Install the necessary packages to work with NFS:
sudo apt update & & sudo apt install nfs-common # For Debian/Ubuntu
Sudo pacman -S nfs-utils # For Arch Linuxβ οΈ Note: RedmiBook 9 Pro with Windows preinstalled will require you to turn off Fast Startup in power settings if you are dual-booting with Linux.This feature can block network interfaces when switching between OSes.
2. Manual mounting of NFS: a quick connection test
For a temporary connection (for example, to check the health of the device), use the mount command:
sudo mount -t nfs 192.168.1.100:/path/to/share /mnt/nfs -o nolock,softDecoding of options:
- nolock β disables file locking (useful for slow networks).
- soft - unmounts the folder when the connection breaks (prevents the system from freezing).
Check the result:
df -h | grep nfsIf you're successful, you'll see a line with the size and mounting point. On RedmiBook 9 Pro with SSD-The drive is recommended to add the option rsize=8192,wsize=8192 to increase data transfer speed.
Create a test file in a mounted folder | Check access rights (ls -l /mnt/nfs) | Copy a 100+MB file for a speed test | Unmount a folder (sudo umount /mnt/nfs)
-->
3. Automatic mounting via /etc/fstab
For a permanent connection, add a line to /etc/fstab:
192.168.1.100:/path/to/share /mnt/nfs nfs defaults,nolock,soft,rsize=8192,wsize=8192 0 0Use the changes carefully - errors in fstab can cause the system to fail.
sudo mount -a| Option. | Description | Recommended for RedmiBook 9 Pro |
|---|---|---|
| defaults | Standard parameters (rw, suid, dev, exec, auto, nouser, async) | Mandatory for proper work |
| nolock | Disables file locks | Turn on when working with slow networks |
| soft | Unmount folder in case of network error | Recommended for laptops (frequent Wi-Fi reconnects) |
| rsize/wsize | Size of the read/write block | Install 8192 for SSD or 32768 for HDD |
β οΈ Note: If the system does not boot after adding a string to fstab, load into Restore Mode (hold Shift when enabled) and edit the file by removing the problem bar.
Autofs setup: On-demand mounting
Autofs service mounts NFS-resources only when you access them, saving the system resources:
sudo apt install autofsEdit the /etc/auto.master file by adding a line:
/mnt/nfs /etc/auto.nfs --timeout=60Create /etc/auto.nfs with the following content:
share -fstype=nfs,rw,nolock,soft 192.168.1.100:/path/to/shareRestart the service:
sudo systemctl restart autofsNow, the /mnt/nfs/share folder will mount automatically when first accessed and unmount after 60 seconds of inactivity, which is especially convenient for the RedmiBook 9 Pro, as it reduces battery load when running from the battery.
π‘
To speed up mounting, add the fg (foreground) option to autofs settings. This will cause the system to wait until mounting is complete before continuing, which is useful for latency-sensitive scripts.
5. Diagnostics and solution of typical errors
Errors when connecting NFS are often associated with access rights or network settings.
- π« mount.nfs: access denied by server Problem: Server refuses access. Solution: Check exported folders on server (/etc/exports). Make sure that IP-Customer address (RedmiBook) 9 Pro) allowed in the rules. Restart the service NFS on the server: sudo exportfs -ra.
mount.nfs: Connection timed out
Problem: The network connection is blocked.
- Turn off the firewall on the server and client temporarily for the test.
- Check the routing: traceroute 192.168.1.100.
- If you use Wi-Fi, try connecting via cable.
For speed testing, use:
dd if=/dev/zero of=/mnt/nfs/testfile bs=1M count=1024 # Recording test
dd if=/mnt/nfs/testfile of=/dev/null bs=1M # Reading testCompare the results to a local drive. On the RedmiBook 9 Pro with an NVMe SSD, the difference in read/write speed between local storage and NFS (Gigabit Ethernet) should not exceed 30-40%.
π‘
Use noatime and nodiratime in mounting options to reduce the number of write operations to the server, which is especially important for laptops on a battery, as it reduces power consumption.
7. NFS Alternatives: When to Consider Other Protocols
NFS is not always the best choice. Consider alternatives in the following cases:
- π₯οΈ Windows Server or Client: Use the SMB (Samba β Itβs better integrated with Windows.
- π Access via the Internet: SSHFS WebDAV is safer for remote connection.
- π± Mobile devices: FTP or Syncthing is easier to set up for smartphones.