当前位置:网站首页>[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
边栏推荐
- C language - stack
- Rhsca day 11 operation
- Learning XML DOM -- a typical model for parsing XML documents
- Native div has editing ability
- DDL language of MySQL database: create, modify alter, delete drop of databases and tables
- AUTOSAR从入门到精通100讲(106)-域控制器中的SOA
- 20 minutes to learn what XML is_ XML learning notes_ What is an XML file_ Basic grammatical rules_ How to parse
- /*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
- Map container
- Dichotomy search (C language)
猜你喜欢
Doris / Clickhouse / Hudi, a phased summary in June
DCL statement of MySQL Foundation
Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment
leetcode1-3
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
RHCE - day one
BGP ---- border gateway routing protocol ----- basic experiment
Linked list operation can never change without its roots
如果不知道這4種緩存模式,敢說懂緩存嗎?
The most detailed teaching -- realize win10 multi-user remote login to intranet machine at the same time -- win10+frp+rdpwrap+ Alibaba cloud server
随机推荐
Introduction to tree and binary tree
Some summaries of the third anniversary of joining Ping An in China
【Day1】 deep-learning-basics
uniapp---初步使用websocket(长链接实现)
Rhcsa12
How to quickly parse XML documents through C (in fact, other languages also have corresponding interfaces or libraries to call)
Three schemes of ZK double machine room
Network connection (III) functions and similarities and differences of hubs, switches and routers, routing tables and tables in switches, why do you need address translation and packet filtering?
Seven examples to understand the storage rules of shaped data on each bit
The bamboo shadow sweeps the steps, the dust does not move, and the moon passes through the marsh without trace -- in-depth understanding of the pointer
Talk about scalability
AUTOSAR从入门到精通100讲(106)-域控制器中的SOA
Occasional pit compiled by idea
C language structure to realize simple address book
【Day1】 deep-learning-basics
System.currentTimeMillis() 和 System.nanoTime() 哪个更快?别用错了!
[Galaxy Kirin V10] [server] soft RAID configuration
Dynamic memory management
[FAQ] summary of common causes and solutions of Huawei account service error 907135701
Pod management