openwrt development board and ubuntu nfs mount

1. Ubuntu needs to install nfs service

sudo apt-get install nfs-common nfs-kernel-server

2. Modify the /etc/ exports file:

/home/test *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

The front is the mounted directory, and the back is the corresponding permission
rw: read and write
insecure: allow unauthorized access
sync: synchronously write data to the internal and hard disk
no_root_squash: shared directory user permission 4. You can set the highest permission for the created directory, or you can Choose not to set:

3. Modify directory permissions

chmod 777 test/ -R

777 is the highest authority, test is the mount directory, and -R means that everything in this directory will have this authority

4. After the configuration is complete, restart the service

sudo service nfs-kernel-server restart

5. The development board kernel opens nfs

Select Kernel modules —> Filesystems —> kmod-fs-nfs

Compile and download firmware

6. Development board fsrab file settings

vi /etc/fstab

 

Then add an entry in the /etc/fstab file using the following format.

NFS server:directory mountpoint nfs defaults 0 0

Among them, the NFS server: directory is the NFS server IP and its shared directory, the mount point is the mount point on the client machine where the NFS directory is mounted, and nfs defines the file system type.

Add at the end of fsrab:
192.168.10.100:/home/test /mnt nfs defaults 0 0
where 192.168.10.100 is our NFS server IP, /mnt/ is the shared directory on the NFS server, /mnt/client_sharedfolder is the client system the mount point.


7. mount

mount -t nfs -o nolock 192.168.10.100:/home/test /nfs/


 

Guess you like

Origin blog.csdn.net/jhyBOSS/article/details/129067091