当前位置:网站首页>[Galaxy Kirin V10] [desktop] build NFS to realize disk sharing
[Galaxy Kirin V10] [desktop] build NFS to realize disk sharing
2022-07-04 10:35:00 【GUI Anjun @kylinos】
Environmental Science : Galaxy Unicorn V10 0710 desktop
Experimental scenario : take A Mechanical sdb1 The disk is shared to the machine B,AB All kylin V10 0710 Desktop system
A machine IP:192.168.1.64
B machine IP:192.168.1.72

The first 1 Step :
Mount the disk directory to the folder , If it is mounted, it can be ignored
# mkdir /home/arvin/ desktop / share //arvin Is the actual user name , This path can be customized
# mount /dev/sdb1 /home/arvin/ desktop / share
# chmod -R 777 /home/arvin/ desktop / share
# lsblk

# blkid /dev/sdb1 // obtain UUID

# vim /etc/fstab // write in fstab, It can start automatically , Add a line as shown in the figure below ,UUID Modify... According to the actual situation

# mount -a // verification fstab File format , No error can be reported
The first 2 Step : install
install nfs Related components , And open nfs service
# apt search nfs-kernel-server -y
# apt install rpcbind -y
# systemctl enable nfs-server.service
# systemctl enable rpcbind
The first 3 Step : Configure sharing
# vim /etc/exports
Add the following :
/home/arvin/ desktop / share 192.168.1.0/24(rw,sync,no_subtree_check,crossmnt)

Pictured above :/home/arvin/ desktop / share Indicates the shared directory path ,192.168.1.0/24 Means that only 192.168.1.0 The machines in this network segment discover and share this directory , among 24 It's the subnet mask , If any host is allowed to access 192.168.1.0/24 Replace with *
# systemctl restart rpcbind
# systemctl restart nfs-server.service
# showmount -e localhost // Verify whether the server configuration is successful

The first 4 Step : Open the server (A machine ) Security center firewall
( If you can turn off the firewall directly, you can skip this step , If there is no firewall closing function, please refer to this step )
# apt install ksc-defender -y // Press enter directly in the prompt pop-up box , Reopening the security center after installation has the function of closing the firewall
The first 5 Step : Client side Settings
# showmount -e 192.168.1.64 // The following shows that the server can be found successfully nfs service

Client create directory , And mount
# sudo mkdir /home/arvin/ desktop / share // You can create a shared directory under the local desktop directory ,arvin Normal user name , Modify according to the time ,“ share ” For folder name , Customizable
# sudo chmod -R 777 /home/arvin/ desktop / share /
# sudo mount -t nfs 192.168.1.64:/data2 /home/arvin/ desktop / share /
The first 6 Step : Set up auto mount after power on
( It is not recommended to write /etc/fstab, Prevent the client from failure of post due to abnormal server , It is suggested that /etc/rc.local)
# chmod 755 /etc/rc.local
# vim /etc/rc.local // Add the following
sudo mount -t nfs 192.168.1.64:/home/arvin/ desktop / share /home/arvin/ desktop / share

The first 7 Step : Verify that the restart takes effect
# reboot // Restart first A machine
# lsblk // see sdb1 Whether the disk is powered on and mounted

# showmount -e localhost // see nfs Startup and self startup

# reboot // restart B machine
# showmount -e 192.168.1.64
# df -Th // Check whether the mount realizes automatic startup

Finally, on the desktops of both systems “ share ” Folder directory create file , See if you can see both sides at the same time
边栏推荐
- OSPF summary
- Seven examples to understand the storage rules of shaped data on each bit
- system design
- Recursion and divide and conquer strategy
- From programmers to large-scale distributed architects, where are you (I)
- Snake (C language)
- [200 opencv routines] 218 Multi line italic text watermark
- C language - stack
- Occasional pit compiled by idea
- 【Day1】 deep-learning-basics
猜你喜欢

MFC document view framework (relationship between classes)

Software sharing: the best PDF document conversion tool and PDF Suite Enterprise version sharing | with sharing

PHP代码审计3—系统重装漏洞

Rhcsa - day 13

Virtual machine configuration network

Dichotomy search (C language)

Reprint: summation formula of proportional series and its derivation process

Reasons and solutions for the 8-hour difference in mongodb data date display

Dynamic memory management

Static comprehensive experiment ---hcip1
随机推荐
Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment
RHCE day 3
/*Rewrite the program, find the value of the element, and return the iterator 9.13: pointing to the found element. Make sure that the program works correctly when the element you are looking for does
/*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
Crawl Zhejiang industry and trade news page
【OpenCV 例程200篇】218. 多行倾斜文字水印
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
system design
Latex learning insertion number - list of filled dots, bars, numbers
【Day2】 convolutional-neural-networks
【Day1】 deep-learning-basics
Error C4996 ‘WSAAsyncSelect‘: Use WSAEventSelect() instead or define _ WINSOCK_ DEPRECATED_ NO_ WARN
uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
Write a program that uses pointers to set all elements of an int array to 4.18: 0.
Velodyne configuration command
Check 15 developer tools of Alibaba
Network disk installation
Write a program to judge whether the elements contained in a vector < int> container are 9.20: exactly the same as those in a list < int> container.