Configure the NFS server using the Debian 12 system of PVE8.0

a6cf1ac6cf3f41284655e179cd70ed92.gif

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.

f4f0b6de9237e2ed7ef3145c89c1829c.png

First update the software repository.

apt-get update

a4a246421e71096ee10c67353f9e10d6.png

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.

288c0093351dbe0886443ba55a45d26c.png

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”.

51bf57ce13f23db611033359ca0ae6a2.png

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”.

32cfc95d670417060398c262c0e5a807.png

Then select the two repositories whose sources are Proxmox and click “Disable” to stop these two sources.

d42b5131b3596fb06a2b1fd461f0d6cd.png

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

48fef2535aaac3dbc1dc408e805a01ce.png

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/

27dc379bb3056005278b3152841767b8.png

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

9e409412ff636cf44dc0fe7c92064ffe.png

Note that PVE also has a system firewall. Check whether it is running. If it is running, it needs to be closed and disabled.

31c94383e04b00760481dbedfbcae3f3.png

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.

a0e3e68e431589d6aa2ccaea762ed39e.png

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.

6906ebffef3446b40d9262ff35fd2703.png

Finally confirm the configuration information and click “Finish”.

e2d002394c6c0e2f83a67600d70de754.png

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.

0c84e80211915c309141db8f79129f00.png

The capacity and usage information is slightly different from the disk usage seen on the PVE command line.

4bf8c7c140e9429e01ca38c98b15b853.png

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.

1d8f939be797ce53d47b0283f0757b02.png

OK, the demonstration is over.

759b98f70e0ca0f2e9554cf0be6baa72.gif

Long press the QR code
Follow us

c783fda595691274c7c2304f2dc5682d.jpeg

d2d68c464d0bdd1ba4d6174071ed964f.png

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