Simple use of NFS under CentOS and NFS storage methods for Windows off Linux

Source: Internet
Author: User
Tags k8s

1. NFS has been installed on the server in full installation, if not installed, you need to install it with the following command

Yum-y Install Nfs-utils Rpcbind

2. Create the NFS directory you want to use

Mkdir-p/nfs/k8s

3. Modify the Service configuration directory for NFS

vim/etc/Exports Add content /nfs/k8s * (Rw,insecure,sync,no_subtree_check,no_root_squash)

The meaning of this code copy from other people's Blog park

common parameters are: parameter value    content description rw ro    The directory share permissions are erasable (read-write) or read-only (read-only), but ultimately can not read or write, or rwx and identity of the file system. Sync  Async    sync means that data is written synchronously to the memory and hard disk, andasync  means that the data is staged in memory, not directly to the hard disk! No_root_squash root_squash    Client uses NFS file system when the account is root, how can the system determine the identity of this account? By default, the identity of the client root is compressed into nfsnobody by the Root_squash setting, so the system for the server will be more secure. But if you want to open the client to use root to operate the server's filesystem, then you need to open No_root_squash! All_squash regardless of who is logged in    to NFS, his identity will be compressed into anonymous users, usually nobody (nfsnobody)! Anonuid anongid    *_squash refers to the UID setting value of the anonymous user, usually nobody (nfsnobody), but you can set the value of this UID yourself! Of course, this UID must exist in your/etc/passwd! Anonuid refers to the UID and Anongid is the group GID.

4. Restart NFS-related services

First make the previously modified document effective

Command

Exportfs-r

Systemctl Restart NFS systemctl Restart Rpcbindsystemctl enable Nfssystemctl enable Rpcbind

5. Add roles and features to Windows

Run-as input control-> open programs with features-open enable live shutdown Windows features

To add related features

6. Working with the command line

10.24. 103.1  10.24. 103.1:/nfs/k8s z: #mount挂在该目录 to Z disk to open Z disk for viewing
Uninstall the Directory
Umount Z:
Can

Simple use of NFS under CentOS and NFS storage methods for Windows off Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.