Total text: 1234 words 16 pictures, estimated reading time: 2 minutes
Earlier we introduced the sharedNFS (Network File System, Network File System)storage(Windows Server2012 R2 to build an NFS server based on Windows Server 2012 R2 >), and also introduces how to configure the NFS server on CentOS 7 system(CentOS 7 builds NFS server). Isn’t this a newly installed PVE? It has been confirmed that PVE8.0 is developed based on Debian 12(Quickly deploy a Debian system), we Use it to try how to configure the NFS server on the Debian 12 system.
First update the software repository.
apt-get update
Oops, an error was reported, indicating that it was not authenticated. Open the link and take a look. It turns out that you need to log in to your account.
Isn’t this ruined? It turns out to be related to subscriptions. We are now using the free version of open source. Without a paid subscription, the repository cannot be used.
The command line is not intuitive. Let’s take a look at the WEB page, find the PVE node, and go to “Repository” under “Update”.
It can be seen that there are a total of 5 sources of the APT repository, all of which are enabled, divided into Debian and Proxmox. The components of Proxmox are divided into enterprise and pve-enterprise. Judging from the names, both are enterprise versions.
In fact, pve-enterprise is the Proxmox VE enterprise repository, which contains the most stable software packages and is suitable for production use. It is the officially recommended, default and stable repository and is available to all Proxmox VE subscriber users. Another enterprise is the repository of the Ceph distributed storage system, which also requires subscription to use.
In fact, PVE also has a no-subscription repository pve-no-subscription. We do not need a subscription key to access the pve-no-subscription repository. It’s just that its packages have not been rigorously tested and verified, but it is also acceptable as a repository for testing and non-production use.
We click the “Add” button, select “No-Subscription” for the repository, and then click “Add”.
Then select the two repositories whose sources are Proxmox and click “Disable” to stop these two sources.
Then we start installing the NFS package nfs-server. At the same time, it is recommended to install nfs-common. This package contains most of the tools and libraries required by NFS clients:
apt-get install nfs-server nfs-common
Like CentOS, create a directory that needs to be shared, such as /nfs/tt, and give the directory read and write permissions. :
mkdir -p /nfs/tt chmod 777 /nfs/tt/
Then configure the main NFS configuration file /etc/exports and add the directories and clients that need to be shared:
/nfs/tt/ *(rw,sync,insecure,no_root_squash)
The first part /nfs/tt/ in the configuration file is the path to be shared. The second part* is the host or network segment that is allowed to access the NFS server. The third part is the part in brackets, indicating the user-related permission configuration: rw represents read and write, which means having read and write permissions; sync means that the data in the memory is written to the disk in real time, and the NFS server must issue a confirmation after writing the file; no_root_squash means that the root user has the highest permission control on the shared directory; the insecure option allows the client to use insecure authentication methods to access the NFS service; other parameters can also be configured, all_squash means that no matter who the NFS user is, he The identity will be limited to a specified ordinary user identity; no_subtree_check means that the subtree will not be checked. The subtree check is used to verify whether the file being accessed is located in a subfolder on the same volume. If the entire drive volume is shared, Configuring this option will speed up access to subfolders and files; anonuid/anongid is used together with root_squash and all_squash to specify user-limited uid and gid using NFS.
After everything is configured, we can start the nfs service and set it to run automatically.
/etc/init.d/nfs-kernel-server start
Note that PVE also has a system firewall. Check whether it is running. If it is running, it needs to be closed and disabled.
Interestingly, the status seen by pve-firewall is disabled, and the status seen by using systemctl is enabled. If you are worried, you can use systemctl directly.
Then we click on “New Data Storage” on the “Data Storage” page in the storage of ESXi Navigator, and select “Mount NFS Data Storage” for the creation type. , click Next page.
Fill in the details of the NFS mount, including the locally displayed “name”, as well as the IP address, share path and version information of the NFS server. Note that the shared path must be the same as that configured in the configuration file /etc/exports.
Finally confirm the configuration information and click “Finish”.
After the addition is successful, we can see the newly added data storage nfs153, type NFS, capacity 58.51 GB, and usable 55.14 GB.
The capacity and usage information is slightly different from the disk usage seen on the PVE command line.
Then we create a new directory test in the data storage nfs153 through the data storage browser. Checking from the host, you can see that the root user has created a test directory, the operation is successful, and the read and write permission tests are normal.
OK, the demonstration is over.
Long press the QR code
Follow us
CentOS 7 builds NFS server
PVE8.0-2 Quick Guide for Installation and Use
FortiGate configuration$$しνρη
Teach you step by step how to deploy a FortiGate cloud host on Tianyi Cloud
VMware storage management command vmkfstools usage guide
VMware uses the vmkfstools command to convert thick provisioning virtual machine disks to thin provisioning
MSR810 configures wireless portal authentication
MSR810 uses iMC as the authentication server to configure Portal authentication
What? Have you ever used Hyper-V virtualization that comes with Windows?
I can’t use VMware after turning on Hyper-V. How to fix it?
Can you find a way for Hyper-V and VMware to coexist?
Configuring SSH remote login on Huawei switch S3700/S5700/CE6800
I picked up a FortiGate-VM64, how do I use it?
Go all out, use a real machine to demonstrate the business of upgrading ESXi 6.7 to 7.0 U3