Windows.  Viruses.  Notebooks.  Internet.  office.  Utilities.  Drivers

" and you already have an idea about the "network file system", its capabilities and degree of security. However, in this article, everything was dealt with mainly from the point of view of the client ... but what if you wanted to have your own NFS server? (note: "fuck" does not mean "break", but means "install and configure").

Well, if you have such a desire, then the first question that you should ask yourself is: “What for a goat button accordion?”. For setting up an NFS server at home
quite pointless - no one will appreciate it, but if you were lucky enough to administer "men in black" in the office, or in the newfangled "Home Network" - then it's a completely different matter ...

Starting the server itself is a rather simple matter, if you read the previous article, then you can do it quite well. So, you will need the following daemons:

  • nfsd - direct protocol service
    NFS;
  • mountd - maintenance of mount operations;
  • rpc.portmap - RPC ports daemon; needed because requests to the NFS server are transmitted in the form of packets
    RPC;

How to do it? Very simple - go to the "/etc/rc.d/rc.inet2" file and uncomment the appropriate lines. Everything can be considered that the initial launch has been made, it will be a little more difficult to set it all up ...
The first thing to decide is who and what rights he has regarding this or that information. This is configured through the "/etc/exports" file. Permissions are "read" and "read and write". How to set it up is described in "Basics
NFS".

The second is, of course, the load on the server, i.e. the number of active users and their approximate requests. Requests to the NFS server are usually divided into two types: the first - when the client works with attributes, the second - when the client directly requests data. Requests of the first type are searching for a file, reading the list of permissions, etc., of course, you understand that they lightly load the network. Requests of the second type are the transfer and reception from the client directly of the contents of the files; and this is where the question arises: "what and how often will be transmitted?" This one is especially relevant if you have a network of 10 Mbps (well, in other words, a standard Russian network). If you know, then 10 Mbps is a little over 1 Mb per second; Naturally, if files of tens of megabytes in size are constantly transferred, the network will simply die. If this is your situation, then you will need to install data caching on the client machine (the biod daemon). Then, once requesting a file and accessing it again, the client will not "download" it again from the server, but will take it from the cache; at the same time, it will be regularly checked whether the file on the server has changed, if the fact of a change is detected, then the file in the cache will be replaced by a "fresh version"
(As you understand, checking "whether the file has changed" is a request "by attributes", which is often hundreds of times smaller than the file itself).

Well: we launched the NFS server, determined the access permissions, figured out the load ... Now it remains to fill in the screw with the necessary information and use
NFS capabilities to the fullest ...

Instead of a conclusion:

If you are faced with the question of organizing data exchange on the network, then do not hesitate to choose NFS - NFS is three heads above a head above
FTP is head and shoulders above the screw "balls", and the setup is not so complicated ...

When on NFS-the server has one main user and on the computer that acts as NFS-client, also one user, and even included in the sudousers list - : NFS partition is connected using sudo, UID and GID on the NFS server and NFS client are the same, there are no problems with read and write rights.

I had a situation when the NFS client had a regular user (regular user) without access to sudo and he had to be able to read and write to the connected NFS partition. Let's call this user reguser. Also on this computer (NFS client) there was another user who had sudo access. Let's call it: admuser.

So I had two tasks:

  1. Make it so that reguser can write to files and directories on the NFS server.
  2. Make it so that reguser can mount and disconnect the NFS partition himself.

How to allow NFS server writable users from an NFS client that has a different UID from the user's UID that owns files on the NFS server

Actions are performed on the NFS server as the root user.
Edit /etc/exports:
nano /etc/exports
Insert or change a line that says which directory will be available (exported) via NFS:

/home/nfs 192.168.1.1/24(rw,async,no_subtree_check,all_squash,anonuid=1000,anongid=1000)

Where:

  • /home/nfs— directory that will be available (exported) to the NFS client;
  • 192.168.1.1/24 - IP address or, as in this case, the range of addresses allowed to connect to NFS;
  • rw- permission to read and write;
  • async- an asynchronous mode of operation in which responses to requests will occur immediately, without waiting for writing to disk. In this case, the reliability is lower, however, the performance is greater;
  • no_subtree_check- when allowing access to a subdirectory of the file system, and not to the entire file system, the server checks whether the requested file is located in the exported subdirectory or not. no_subtree_check disables this check, which reduces security but increases data transfer speed;
  • all_squash- this option is responsible for the fact that any users of the NFS client will be considered anonymous on the NFS server or those users of the NFS server whose identifiers are specified in anonuid and anongid;
  • anonymous— OS user ID on the NFS server. Taken from /etc/passwd. For example, if you need the first non-system user (the one whose login was specified when installing the OS, in my case nfs) and in the file /etc/passwd there is a line " nfs:x:1000:1000:NFS:/home/nfs:/bin/bash» value for anonuid will be the first number 1000;
  • anonymous— OS group ID on the NFS server. Taken from /etc/group. For example, if you need a group www-data and in file /etc/group there is a line " www-data:x:33:» value for anongid will be 33;

If you need to more precisely specify which users on the NFS client correspond to users on the NFS server, then you can enable user mapping by adding the option map_static=/etc/file_maps_users. File /etc/file_maps_users should look like this:

# Mapping users # remote local comment uid 0-33 1002 # mapping users with remote UID 0-50 to local UID 1002 gid 0-33 1002 # mapping users with remote GID 0-50 to local GID 1002

We restart the nfs daemon and this completes the server configuration:
/etc/init.d/nfs-kernel-server restart

How to allow a regular user to mount and unmount an NFS partition

Create a directory to which we will mount:
sudo mkdir /media/nfs

Add to /etc/fstab mount rule. Opening the file:
sudo nano /etc/fstab
Adding a rule:
192.168.1.50:/home/nfs /media/nfs nfs rw,noauto,user 0 0
Where:

  • 192.168.1.50 — IP address of the NFS server;
  • /home/nfs- directory on the NFS server that we mount. He should be on the list /etc/exports on the NFS server;
  • /media/nfs- the directory on the NFS client, in which we mount the NFS partition;
  • nfs— file system type;
  • rw- with the right to write;
  • auto- an option indicating that the partition does not need to be mounted automatically at boot;
  • user- an option that allows any user to mount and unmount this partition.

To disable NFS:
nano ~/nfs.umount
With code:
#!/bin/bash
umount /media/nfs

Let scripts run:
chmod ug+x ~/nfs.mount ~/nfs.umount

And finally, connecting the NFS share:
~/nfs.mount

Disabling an NFS share:
~/nfs.umount

Everything, all tasks are completed.

When administering Linux-based servers in an environment where Windows is used as the primary client OS, from time to time you have to deal with the need to copy something from client Windows to a Linux system or vice versa, from a Linux system to Windows. Most often, the capabilities of the SSH / SCP protocols are used for this using tools such as the pscp.exe utility. But when you have to deal with Linux file servers that allow you to use the capabilities of the protocol NFS, we can ask questions like "can a Windows client OS act as an NFS client?", "Does the Windows client OS have some built-in implementation of an NFS client?". These are the questions I had during a period of time that coincided with the period when we moved from Windows 8.1 to the first release of Windows 10. The information that at that time could be found on this issue was that the NFS client functionality was only "older" editions of Windows client operating systems, such as Windows 7 Ultimate/Enterprise, Windows 8/8.1 Enterprise And Windows 10 Enterprise. However, in our case, we used Windows 10 editions professional so I had to put those thoughts aside.

Recently, while reading discussions on the TechNet forums, I came across information that at some point in time in Windows 10 Professional edition it became possible to use the functionality of the NFS client. According to some sources, this possibility appeared in Windows 10 versions 1607 (10.0.14393 / Anniversary Update).

Deciding to check this information on the information I have at hand Windows 10 1803(10.0.17134 / April 2018 Update) revisions professional, I found that we now actually have the ability to use this functionality.

To enable the NFS client, we can use the Programs and Features Management snap-in appwiz.cpl. Here in the list Windows components" can be found available for inclusion " Services for NFS".

After the installation of the component is completed, in the Control Panel in the " Administration"snap will appear" Services for NFS" (nfsmgmt.msc), in which we can manage some parameters of the NFS client.

We assume that permissions for access from the client system are already configured on the side of the NFS server, for example, access is explicitly allowed by the client's IP address. The simplest example of installing and configuring an NFS server on the CentOS Linux side can be found in the wiki article "Installing and configuring an NFS server and client on CentOS Linux 7.2" .

After setting up access rights on the side of the NFS server, we switch to Windows 10 and connect the network directory using the " mount". The simplest example of an anonymous connection to a network directory looks like this:

mount-o anon \\KOM-FS01\mnt\vdo-vd1\ovirt-iso-domain I:
  • "-o anon" - connect with anonymous user rights;
  • "KOM-FS01" - NFS server name;
  • "mnt\vdo-vd1\ovirt-iso-domain" - local path to a directory on the NFS server;
  • "I" is the Windows drive letter

Other available options and utility keys can be viewed with the command " mount /?". For example, when connecting, we can explicitly specify the username and password on the NFS server.

When opening the properties of directories and files in an NFS mounted directory, we will see a special tab " NFS attributes" with the appropriate attributes, including information about current permissions to a directory/file that, if we have sufficient rights, we can manage.

When you run the command again mount without specifying parameters, we will get information about the current NFS client connections and the properties of these connections:

Here we can see what UID And GUID, connected. For anonymous connections, this is the default. -2 /-2 . If for some reason we need to change these identifiers for all anonymous client connections, then we can add a couple of default registry settings like DWORD(32-bit):

  • AnonymousUid
  • AnonymousGid

to registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default

In the values ​​of the created parameters, you can write the desired UID and GUID, which will be used for all anonymous connections. The screenshot below uses an example with values 1000 :1000 (decimal).

If we want all anonymous connections to use root-ovy identifiers, then in the corresponding registry settings you need to specify AnonymousUid = 0 and AnonymousGid= 0 . Specifying root identifiers can be useful if, for example, we need not only to read, but to write to the mounted NFS directory, and the remote NFS server allows only the root user and/or members of the root group to write.

You will need to stop and restart the NFS Client service from the previously mentioned Services for NFS snap-in (nfsmgmt.msc) for the changes to take effect.

Or, if restarting the computer is not a problem, you can also restart the client computer for the changes to take effect.

My attempts to restart the system service" Client for NFS" (NfsClnt) through standard mechanisms such as the service management snap-in services.msc or utility " net", have shown that for some reason this leads to the impossibility of starting the service after it is stopped. Therefore, to restart the NFS client, it is better to use the "native" snap-in. Although, again, it has been noticed that multiple stops / starts of the service in the " Services for NFS" can also lead to inadequate operation of the NFS client. As a result, for example, the " mount" may stop mounting NFS directories, giving a network error:

In such cases, only restarting the client computer helps, after which everything starts working again.

After the changes we need have been made to the registry and the NFS client service has been successfully restarted, we will try to mount the NFS directory again and see with the command " mount" connection information.

As you can see, now exactly those that were previously indicated in the registry act as security identifiers.

Disable NFS-attached network resources is as simple as connecting, only with the help of another utility - " umount"

In general, it's good that now users of Windows 10 Professional edition have a regular opportunity to work with network file resources using the NFS protocol. We will use this at work.

Not everyone is familiar with data transfer protocols. But many would like to connect their computers to one network or use a server to store files. One way to do this is NFS. How to set up an NFS server in Ubuntu - read on.

By properly configuring NFS, you can combine computers on different operating systems into one network.

network File System- protocol network access to files. As usual, it consists of two parts. One - client, which is located on the computer from which remote data is viewed. Another - server - is located on the computer where this data is stored. Quite convenient to use additional disk space, especially in the local network . And if we are talking about some corporate PCs, then this is simply necessary.

What is the difference?

Today there are a large number of protocols and a variety of software, which performs the same functions. What makes NFS stand out?

  • Possibility of connection in one network of computers on different operating systems. It is often convenient to connect Windows OS via NFS to a Unix system, for example, Ubuntu. Samba exists and is used for the same purposes, but NFS is lighter, simpler and faster than this program, since it is implemented at the kernel level. Therefore, setting up access through it, as a rule, will be easier.
  • NFS provides transparent access to files. This means that everything deleted files are reproduced in exactly the same way as local ones. Programs do not need to be upgraded to play any file located on the server.
  • NFS sends only the requested part of the file, not the entire file.

For full-fledged work, you need to install Network File System on at least two computers: server and client. Naturally, the beginner will have to sweat the most server part, since it is there that you need to “share” (open access) folders. However, this is all fairly easy to do.

Like most data transfer protocols, NFS is anything but young. It was developed in 1984 and was intended for UNIX systems. This is still the main role of NFS, but many have found that it is very convenient to use it to connect Windows computers to Linux ones. In addition, NFS is great for playing multimedia content over a local area. home network. Samba in this role often hangs and slows down.

Installing the NFS backend

We will install the server part of the protocol on Ubuntu 16.04. Naturally, if you have the Server edition, then the process is in no way different. It's just that in the traditional version of Ubuntu, some actions can be performed using a graphical interface.

We install the program. To do this, you can use the application download center, or you can simply enter the command:

sudo apt install nfs-kernel-server

After that, it will be useful to check the correctness of the installation. You don't have to do this, but we'll check anyway. We enter the command:

The port must be 2049 everywhere.

Now we check if the kernel supports NFS. To do this, enter:

cat /proc/filesystems | grep nfs

The resulting value should look like this: nodev nfsd

This means that everything is functioning correctly. If not, then enter the command:

With it, we install the kernel module ourselves.

Add protocol to autorun. It is not necessary to do this, but it is very inconvenient to turn it on every time. Again, you can add it using a special menu item in the settings, or you can do it yourself using the command:

sudo systemctl enable nfs

So, we have installed the server part, it remains to configure it correctly and move on to the client part.

Setting

Setting up NFS in Ubuntu involves sharing certain folders.

In addition to simply opening access, you must also specify the parameters that determine the user's capabilities in relation to this folder.

  • rw - reading and writing this option allows reading and writing files in the folder.
  • ro - reading only - allows only reading the folder.
  • sync (default) - the parameter ensures the reliability of the transfer. If it is enabled, then it will not be possible to transfer several files at the same time or to different computers. This setting will prevent other requests from being answered. Prevents data loss, but transfer may be slower.
  • async - the reverse of the previous parameter. The transfer is faster, but there is a risk of information loss.
  • secure - this option allows using only ports below 1024. Enabled by default.
  • insecure - allows the use of any ports.
  • nohide - if you mount several directories, among which there are nested ones, then the nested ones, unlike the parent one, will be displayed as empty. The parameter will help fix this.
  • anonuid - specifies the uid for anonymous. This is a special user ID.
  • anongid - specifies the gid for anonymous. GID (Group ID) - another user ID.
  • no_subtree_check - function disables subtree check. The fact is that without it, NFS additionally checks that users access only desired sections directory. This slows things down. The parameter allows you to speed it up, but lowers security.

We will use them depending on what is needed in a particular situation.

Let's create a new folder. You can also use new. Our folder will be /var/network.

Now we need to add this folder to the /etc/exports file. All files and folders with open network access are stored there. The entry should look like this:

/var/network168.1.1(rw,async,no_subtree_check)

192.168.1.1 is the IP over which we are transmitting. Be sure to specify it.

Update the export table:

Now let's try to access the folder from the client side.

Installing and configuring the NFS client

ubuntu

Connecting a configured server to Ubuntu is not difficult. This is done in just a couple of commands.

Install a special client package:

sudo apt install nfs-common

sudo mount 192.168.1.1:/var/network/ /mnt/

The network folder is connected. Using df, you can check all connected network folders:

You can also check your access level with a special command:

Dismount the file system as follows:

The mount command is used almost everywhere. It is responsible for the mounting process, that is, preparing space on the hard disk for its use. operating system. It sounds complicated, but if we simplify it, it turns out that we simply transfer network files to our computer in a new folder. Here it is called /mnt/.

Windows

With Windows, as a rule, everything is much more complicated. The NFS client can be run on all server Windows without any problems. From the standard it is present on:

  • Windows 7 Ultimate/Enterprise
  • Windows 8/8.1 Enterprise
  • Windows 10 Enterprise

Nowhere else to be found. If you have one of these versions, do the following:

  1. Open the "Programs and Features" menu.
  2. Click "Add Components".
  3. We find NFS there and set only the "Client for NFS", we do not need another component.

After connecting, everything is mounted with the same command:

mount 192.168.1.1:/var/network/ /mnt/

You can unmount it like this:

Commands are entered into command line launched as an administrator. After that, you can easily find the desired network drive using Explorer.

But what if there is no client for NFS on the computer? You can try downloading the software through the Microsoft website or from third-party resources. It is possible that other commands or actions are needed here.

You now have a basic understanding of how you can use NFC and swipe the simplest setting. This knowledge is enough to establish access from one computer to another. Moreover, a Windows PC can also act as a client.

LTPNE RPDDETSLY NOPSYI RTPUYI FYRPCH ZHBKMPCHSHI UYUFEN, PE FreeBSD CHUFTPEOB RPDDETSLB UEFECHPK ZHBKMPCHPK UYUFENSCH (Network File System), Y'CHEUPOPK LBL NFS. NFS RPЪCHPMSEF UYUFENE YURPMSHЪPCHBFSH LBFBMPZY Y ZHBKMSCH UPCHNEUFOP U DTHZYNY NBYOBNY, RPUTEDUFCHPN UEFY. rPUTEDUFCHPN NFS RPMSHЪPCHBFEMY Y RTPZTBNNSC NPZKhF RPMHYUBFSH DPUFHR L ZHBKMBN OB HDBMIOOOSHI UYUFENBI FPYuOP FBL CE, LBL EUMI VSCH FFP VSCHMY ZHBKMSCH OB UVUFCHEOOOSCHI DYU LBI.

CHPF OELPFPTSCHE YЪ OBYVPMEE BENEFOSHCHI RTEINHEUFCH, LPFPTSHCHE DBЈF YURPMSHЪPCHBOYE NFS:

    pFDEMSHOP CHFSCHE TBVPYUYE UFBOGYY YURPMSHKHAF NEOSHIE UPVUFCHEOOPZP DYULCHPZP RTPUFTBOUFCHB, FBL LBL UCHNEUFOP YURPMSHKHENSCHE DBOOSCHE NPZHF ITBOYFSHUS O PDOK PFDEMSHOPK NBYOE Y VSHCHFSH DPUFHROSCHNY DMS DTHZYI NBYYO CH UEFY.

    rPMSHЪPCHBFEMSN OE OHTSOP YNEFSH DPNBYOYE LBFBMPZY, PFDEMSHOSHCHE DMS LBTsDPK NBYYOSCH CH CHBYEK UEFY. dPNBYOYE LBFBMPZY NPZHF TBURPMBZBFSHUS ABOUT NFS INFORMATION YI YI NPTsOP UDEMBFSH DPUFHROSCHNY PFPCHUADH H UEFY.

    KHUFTPKUFCHB ITBOOEIS YOZHPTNBGYY, FBLYE, LBL DYULEFSHCH, RTYCHPDSH CD-ROM Y HUFTPKUFCHB Zip (R), NPZHF YURPMSHЪPCHBFSHUS DTHZYNY NBYOBNY CH UEFY. yFP NPTCEF RTYCHEUFY L HNEOSHYOYA RETEOPUINSCHI HUFTPKUFCH ITBOOEIS YOZHPTNBGYY CH UEFY.

ChPF OEULPMSHLP RTYNETOSCHI UFTPL YJ ZHBKMB /etc/exports:

h UMEDHAEYI RTYNETBI DBЈFUS PVEBS YDES FPZP, LBL LLURPTFYTPCHBFSH ZHBKMPCHSCHE UYUFENSCH, IPFS LPOLTEFOSHCHE RBTBNEFTSHCH NPZKhF PFMYUBFSHUS Ch POZHYZHTBGYY UEFY. L RTYNETH, YUFPWSC LLURPTFYTPCHBFSH LBFBMPZ /cdrom DMS FTYYI NBYYO, OBIPDSEYIUS CH FPN CE UBNPN DPNEOE, YUFP Y WETCHET (RPFPNH PFUHFUFFCHHEF DPNEOOPE YNS DMS LBCDPK NBYOSCH) YMY DMS LPFPTSCHI YNEAFUS BRJUY CH JBKME /etc/hosts . zhMBZ -ro HLBSCCHCHBEF ABOUT YURPMSHЪPCHBOYE LLURPTFYTHENPK ZHBKMPCHPK UYUFENSCH CH TETSYNE FPMSHLP YUFEOYS. u FYN ZHMBZPN HDBMIOOBS UYUFENBOE UNPTSEF OILPIN PVTBPN YЪNEOYFSH LLURPTFYTHENHA ZHBKMPCHHA UYUFENKH.

/cdrom -ro host1 host2 host3

h UMEDHAEEK UFTPLE LURPTFYTHEFUS JBKMPCHBS UYUFENB /home , LPFPTBS UFBOPCHYFUS DPUFHROPK FTEN IPUFBN, HLBBOOSCHN RP YI IP-BDTEUBN. FP RPMEOP, EUMY X CBU EUFSH UPVUFCHEOOBS UEFSH VE OBUFTPEOOOPZP UETCHETB DNS . lBL CHBTYBOF, ZHBKM /etc/hosts RPTsBMHKUFB, PVTBFYFEUSH L URTBCHPYUOKHA UYUFENKH RP DMS RPMHYUEOYS DPRPMOIFEMSHOPK YOZHPTNBGYY. zhMBZ -alldirs RPЪCHPMSEF TBUUNBFTYCHBFSH RPDLBFBMPZY CH LBYUEUFCHE FPYUEL NPOFITPCHBOIS. dTHZYNY UMPCHBNY, LFP OE NPOFITPCHBOYE RPDLBFBMPZCH, OP TBTEYOYE LMYEOFBN NPOFITPCHBFSH FPMSHLP LBFBMPZY, LPFPTSCHE YN FTEVHAFUS YMY OHTSOSCH.

/home -alldirs 10.0.0.2 10.0.0.3 10.0.0.4

h UFTPLE, RTYCHEDIOOPK OYCE, ZHBKMPCHBS UYUFENB /a LURPTFYTHEFUS FBLYN PVTBBPN, YuFP POB DPUFHROB DCHN LMYEOFBN YJ DTHZYI DPNEOPCH. rBTBNEFT -maproot=root RPЪCHPMSEF RPMShЪPCHBFEMA root ХДБМЈООПК UYUFENSCH PUKHEEUFCHMSFSH OBRYUSH OB LURPTFYTHENHA ZHBKMPCHHA UYUFENH LBL RPMShЪPCHBFEMASH root . eUMY RBTBNEFT -maproot=root OE ЪBDBO, FP DBCE EUMY RPMShЪPCHBFEMSH YNEEF RTBCHB DPUFHRB root OB HDBMIOOPK UYUFENE, PO OE UNPTCEF NPDIZHYGYTPCHBFSH ZHBKMSCH OB LURPTFYTPCHBOOPK ZHBKM PPPK UYUFENE.

/a -maproot=root host.example.com box.example.org

DMS FPZP, UFPVSCH LMYEOF UNPZ PVTBFIIFSHUS L LLURPTFYTPCHBOOPK ZHBKMPCHPK UYUFENE, PO DPMTSEO YNEFSH RTBCHB UDEMBFSH LFP. rTPCHETShFE, UFP LMIEOF HLBBO CH CHBYEN ZHBKME /etc/exports .

h ZHBKME /etc/exports LBTsDBS UFTPLB UPDETSYF YOZHPTNBGYA PV LLURPTFYTPCHBOYY DMS PFDEMSHOPK ZHBKMPCHPK UYUFENSCH DMS PFDEMSHOP CHЪSFPZP IPUFB. hDBMIOOSHCHK IPUF NPTCEF VSHFSH ЪBDBO FPMShLP PDYO TB DMS LBTsDPK ZHBKMPCHPK UYUFENSCH, Y NPTCEF YNEFSH FPMSHLP PDOH ЪBRYUSH, YURPMSHЪKHENHA RP HNPMYUBOYA, DMS LBTsDPK MPLB MSHOPK ZHBKMPCHPK UYUFENSCH. l RTYNETH, RTEDRPMPCYN, UFP /usr SCHMSEFUS PFDEMSHOPC JBKMPCHPK UYUFENPK. uMEDHAEIK /etc/exports WHDEF OELPTTELFEO:

# Invalid when /usr is one file system /usr/src client /usr/ports client

pDOB ZHBKMPCHBS UYUFENB, /usr , YNEEF DCHE UFTPLY, BDBAEYE LLURPTFYTPCHBOYE DMS PDOPZP Y FPZP CE IPUFB, client . rTBCHYMSHOSHCHK ZHPTNBF H FFPN UMHYUBE FBLCH:

/usr/src /usr/ports client

UChPKUFCHB PFDEMSHOPC ZHBKMPCHPK UYUFENSCH, LLURPTFYTHENPK OELPFPTPNH IPUFH, DPMTSOSCH VBDBCHBFSHUS CH PDOPC UFTPLE. UFTPLY VEH HLBBOYS LMYEOFB CHPURTYOYNBAFUS LBL PFDEMSHOSHCHK IPUF. FP PZTBOYYUYCHBEF FP, LBL CHSH NPCEFE LLURPTFYTPCHBFSH ZHBKMPCHSHCHE UYUFENSCH, OP DMS VPMSHYYOUFCHB LFP OE RTPVMENB.

OYCE RTYCHEDIO RTYNET RTBCHIMSHOPZP URYULB LLURPTFYTPCHBOYS, HERE /usr J /exports

# lLURPTFYTHEN src Q ports DMS client01 Q client02, OP # FPMSHLP client01 YNEEF RTBCHB RPMSHJPCHBFEMS root OB OYI /usr/src /usr/ports -maproot=root client01 /usr/src /usr/ports client02 # lMYEOFULIE NBYJOSCH YNE AF RPMShJPCHBFEMS root Y NPZHF NPOFITPCHBFSH CHUЈ CH # LBFBMPZE /exports. LFP HZPDOP NCEPH NPOFITPCHBFS /exports/obj CH TEZYNE UFEOYS /exports -alldirs -maproot=root client01 client02 /exports/obj -ro

dBENPO mountd DPMTSEO VSHFSH RTPYOZHPTNYTPCHBO PV YNEOOYY ZHBKMB /etc/exports uFP NPCEF VShFSH DPUFYZOHFP RPUSCHMLPK UYZOBMB HUP RTPGEUUH mountd:

# kill -HUP `cat /var/run/mountd.pid`

YMY CHCHCHPCHPN ULTYRFB mountd RPDUYUFENSCH U UPPFCHEFUFCHHAEIN RBTBNEFTPN:

# /etc/rc.d/mountd onereload

b RPDTPVOPC YOZHPTNBGYEK P TBVPFE ULTYRFCH rc.d PVTBEBKFEUSH L tBEDMљ12.7, > .

LBL CHBTYBOF, RTY RETEEBZTHЪLE FreeBSD CHUI OBUFTPIFUUS RTBCHIMSHOP. IPFS CHSHCHRPMOSFSH RETEEBZTHLH CHCHUE OE PVSEBFEMSHOP. CHSHCHRPMOOEOYE UMEDHAEII LPNBOD RPMSHЪPCHBFEMEN root ЪBRHUFYF CHUЈ, UFP OHTsOP.

ABOUT NFS ACCOUNT:

# rpcbind # nfsd -u -t -n 4 # mountd -r

ABOUT LMYEOF NFS:

# nfsiod -n 4

FERETSCH CHUY DPMTSOP VSHCHFSH ZPFCHP L TEBMSHOPNKH NPOFITPCHBOYA HDBMIOOPC ZHBKMPCHPK UYUFENSCH. h RTYCHPYNSHI RTYNETBY UETCHET VKhDEF OPUIFS YNS server , B LMYEOF VKHDEF OPUIFS YNS client . eUMY CHSHCH FPMSHLP IPFIFE CHTENEOOP UNPOFYTPCHBFSH HDBMIOOHA ZHBKMPCHHA UYUFENKH, YMY CHUEZP MYYSH RTPFEUFYTPCHBFSH CHBY OBUFTPKLY, FP RTPUFP ЪBRKHUFYFE LPNBODSCH, RPDP VOSHCHE RTYCHPDINSCHN DEUSH, TBVPFBS LBL RPMSHCHBFEMSH root ABOUT LMYEOFULPC NBYOE:

# mountserver:/home/mnt

RP LFPC LPNBODE ZHBKMPCHBS UYUFENB /home ABOUT VKHDEF UNPOFYTPCHBOB CH LBFBMPZ /mnt ABOUT LMYEOFE. eUMMY CHUY OBUFTPEOP RTBCHYMSHOP, ChSCH UNPTSEFE CHPKFY CH LBFBMPZ /mnt ABOUT LMYEOFE Y HCHYDEFSH ZHBKMSCH, OBIPDSEYEUS ABOUT INFORMATION.

eUMY ChSch IPFIFE BCHFPNBFYUEULY NPOFITPCHBFSH HDBMIOOHA ZHBKMPCHHA UYUFENH RTY LBTsDPK ЪBZTHЪLE LPNRSHAFETB, DPVBCHSHFE ZHBKMPCHHA UYUFENH H /etc/fstab. hPF RTYNET:

Server:/home/mnt nfs rw 0 0

ABOUT UFTBOIGBI URTBCHPYuOPK UYUFENSCH RP RETEYUUMEOSCHUE DPUFKHROSCHE RBTBNEFTSHCH.

25.3.4. rTBLFYUEULPE YURPMSH'PCHBOYE

x NFS EUFSH NOPZP CHBTYBOFPCH RTBLFYUEULPZP RTYNEOEOYS. OYCE RTYCHPDYFUS OEULPMSHLP OBYVPMEE YITPLP TBURTPUFTBOJOYOSCHI URUPUPVPCH EJ YURPMSHEPCHBOYS:

    oBUFTPKLB OEULPMSHLP NBYYO DMS UPCHNEUFOPZP YURPMSH'CHBOYS CDROM YMY DTHZYI OPUIFEMEK. yFP VPMEE DEYЈCHSHCHK Y BYUBUFHA VPMEE HDPVOSHCHK URPUV HUFBOPCLY RTPZTBNNOPZP PVEUREYUEOYS ABOUT OEULPMSHLP NBYYO.

    h VPMSHYI UEFSI NPCEF PLBFSHUS VPMEE HDPVOSCCHN OBUFTPYFSH GEOPTBMSHOSHCHK UETCHET NFS, ABOUT LPFPTPN TBNEEBAFUS CHUE DPNBYOYE LBFBMPZY RPMSh'PCHBFEMEK. LFY DPNBYOYE LBFBMPZY NPZHF ЪBFEN LLURPTFYTPCHBFSHUS CH UEFSH FBL, UFP RPMShЪPCHBFEMY CHUEZDB VHDHF YNEFSH PYO Y FPF CE DPNBYOYK LBFBMPZ CHOE ЪBCHYUYNPUFY PF FPZP, ABOUT LBLPK TBVPYUEK UFBOGIY POY TBVPFBAF.

    oEULPMSHLP NBYYO NPZHF YNEFSH PVEIK LBFBMPZ /usr/ports/distfiles . fBLYN PVTBBPN, LPZDB ChBN OKHTSOP VKhDEF HUFBOPCHYFSH RPTF OB OEULPMSHLP NBYYO, ChSCH UNPTSEFE VSHCHUFTP RPMKHYUYFSH DPUFHR L YUIPDOSHN FELUFBN VE YI ЪBZTHЪLY ABOUT LBCDPK NBYOE.

25.3.5. bChFPNBFYUEULPE NPOFYTPCHBOYE U amd

FELUF RTEDPUFBCHYM Wylie Stilwell.

FELUF RETERJUBM Chern Lee.

(DBENPO BCHFPNBFYUEULPZP NPOFIITCHBOYS) BCHFPNBFYUEULY NPOFITHHEF HDBMIOOKHA ZHBKMPCHHA UYUFENH, LBL FPMSHLP RTPYUIPDYF PVTBEEOYE L ZHBKMH YMY LBFBMPZH H YFPK ZHB KMPCHPK UYUFENE. LTPNE FPZP, ZHBKMPCHSCHE UYUFENSCH, LPFPTSHCHE VSCHMY OEBLFICHOSCH OELPFPTPTE CHTENS, VHDHF BCHFPNBFYUEULY TBNPOFYTPCHBOSCh DBENPOPN amd. yURPMSHЪPCHBOYE amd SCHMSEFUS RTPUFPK BMShFETOBFYCHPK UVBFYUEULPNKh NPOFYTPCHBOYA, FBL LBL H RPUMEDOEN UMHYUBE PVSCHYUOP CHUЈ DPMTSOP VShFSH PRYUBOP CH ZhBKME /etc/fstab .

amd TBVPFBEF, UBN CHCHUFHRBS LBL NFS DMS LBFBMPHRH /host Y /net . lPZDB RTPYUIPDYF PVTBEEOYE L ZHBKMH H PDOPN YЪ LFYI LBFBMPZCH, amd YEEF UPPFCHEFUFCHHAEYK HDBMEOOOSCHK TEUKHTU DMS NPOFITPCHBOYS Y BCHFPNBFYUEULY EZP NPOFIYTHEF. /net YURPMSHEKHEFUS DMS NPOFITPCHBOYS LLURPTFYTHENPK ZHBKMPCHPK UYUFENSCH RP BDTEUKH IP, LPZDB LBL LBFBMPZ /host YURPMSHEKHEFUS DMS NPOFITPCHBOYS TEUKHTUB RP HDBMEOOPNKH YNEOY IPUFB.

pWTBEEOYE L JBKMH H LBFBMPZE /host/foobar/usr HLBCEF amd ABOUT CHSHCHRPMOOEOYE RPRSCHFLY NPOFITPCHBOYS TEUKHTUB /usr , LPFPTSCHK OBIPDYFUS ABOUT IPUFE foobar .

rTYNET 25.2. nPOFYTPCHBOYE TEUKHTUB RTY RPNPEY amd

chshch NPTSEFE RPUNPFTEFSH DPUFKhROSCHE DMS NPOFITPCHBOYS TEUKHTUSCH PFDBMIOOPZP IPUFB LPNBODPK showmount. l RTYNETH, YUFPVSCH RPUNPFTEFSH TEUKHTUSCH IPUFB U YNEOEN foobar , ChSh NPTSEFE YURPMSHЪPCHBFSH:

% showmount -e foobar Exports list on foobar: /usr 10.10.10.0 /a 10.10.10.0 % cd /host/foobar/usr

LBL CHYDOP YЪ RTYNETB, showmount RPLBSCHCHBEF /usr LBL LLURPTFYTHENSCHK TEUHTU. rTY RETEIPDE CH LBFBMPZ /host/foobar/usr DBENPO amd RSHCHFBEFUS TBTEYYFSH YNS IPUFB foobar Y BCHFPNBFYUEULY UNPOFYTPCHBFSH FTEVKHENSCHK TEUKHTU.

amd NPCEF VSHCHFSH BRHEEO YY ULTYRFPC OBYUBMSHOPK ЪBZTHЪLY, EUMY RPNEUFYFSH FBLHA UFTPLH CH ZHBKM /etc/rc.conf:

amd_enable="YES"

LTPNE FPZP, DBENPOH amd NPZKhF VShFSH RETEDBOSH OBUFTPEUOSCHE ZHMBZY YUETE RBTBNEFT amd_flags . rp HNPMYUBOYA amd_flags OBUFTPEO UMEDHAEIN PVTBPN:

amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map"

zhBKM /etc/amd.map ЪBDBEF PRGYY, YURPMSHЪKHENSCHE RP HNPMYUBOYA RTY NPOFITPCHBOYY LURPTFYTKHENSCHI TEUKHTUPCH. h JBKME /etc/amd.conf JBDBOSH OBUFTPCLY OELPFPTSCHI VPMEE UMPTSOSCHI CHPNPTSOPUFEK amd .

pVTBFYFEUSH L URTBCHPYUOSCHN UFTBOIGBN RP Y DMS RPMHYUEOYS VPMEE RPMOPK YOZHPTNBGYY.

25.3.6. rTPVMENSCH CHBYNPDEKUFCHYS U DTHZYNY UYUFENBNY

FELUF RTEDPUFBCHYM John Lind.

oELPFTTSCHE UEFECHSCHE BDBRFETSCH DMS UYUFEN PC U YOPK ISA YNEAF PZTBOYUEOIS, LPFPTSHCHE NPZHF RTYCHEUFY L UETHEOSCHN RTPVMENBN H UEFY, CH YUBUFOPUFY, U NFS. ffy rtpvmentsch OE UREGYJYUOSCH DMS FreeBSD, PDOBLP LFH UYUFENH POI ЪBFTZYCHBAF.

rTPVMENB, LPFPTBS CHPOYLBEF RTBLFYUEULY CHUEZDB RTY TBVPFE RP UEFY UYUFEN PC (FreeBSD) PJFEMSNY, LBL Silicon Graphics, Inc. th Sun Microsystems, Inc. nPOFYTPCHBOYE RP RTPFPLPMH NFS VHDEF TBVPFBFSH OPTNBMSHOP, Y OELPFPTSCHE PRETBGYY FBLCE VHDHF CHSHCHRPMOSFSHUS HUREYOP, OP OEPTSYDBOOP UETCHET PLBCEFUS OEDPUFHROSCHN DMS LMYEOF, IPFS ЪBRTPUSCH L Y PF DTHZYI UYUFEN VHDHF RTPDPMTSBFSHUS PVTBVBFSCHCHBFSHUS. fBLPE CHUFTEYUBEFUS U LMYEOFULYNY UYUFENBNY, OE ЪBCHYUYNP PF FPZP, SCHMSEFUS MY LMYEOF NBYOPK U FreeBSD YMY TBVPYUK UFBOGYEK. PE NOPZYI UYUFENBI RTY CHPOYOLOPCHEOYY FFK RTPVMENSCH OEF URPUPVB LPTTELFOP BCHETYFSH TBVPFKh LMYEOFB. eDYOUFCHEOOOSCHN CHSHCHIPDPN BYBUFHA SCHMSEFUS IPMPDOBS RETEEBZTHЪLB LMYEOFB, RPFPNH UFP UIFHBHYS U NFS OE NPCEF VSHCHFSH TBTEYOB.

IPFS RTBCHYMSHOSHCHN >> TEYOYEN SCHMSEFUS HUFBOPCHLB VPMEE RTPYCHPDYFEMSHOPZP Y ULPTPUFOPZP UEFECHPZP BDBRFETB OB UYUFENH FreeBSD, YNEEFUS RTPUFPE TEYOYE, RTYCHPDSEEE L HDPCHMEFCHP TYFEMSHOSHCHN TEHMSHFBFBN. eUMY UYUFENB FreeBSD SCHMSEFUS WETCHETPN, HLBTSYFE RBTBNEFT -w=1024 ABOUT LMYEOFE RTY NPOFITPCHBOY. eUMY UYUFENB FreeBSD SCHMSEFUS LMIEOFPN, FP UNPOFYTHKFE ZHBKMPCHHA UYUFENKH NFS U RBTBNEFTPN -r=1024 . LFY RBTBNEFTSHCH NPZHF VSHFSH ЪBDBOSHCH CH YuEFCHETFPN RPME ЪBRYUY CH ZHBKME fstab LMYEOFB RTY BCHFPNBFYUEULPN NPOFITPCHBOYY, YMY RTY RPNPEY RBTNEFTTB -o CH LPNBODE RTY NPOFITPCHB OYY WHAT.

OHTSOP PFNEFYFSH, UFP YNEEFUS FBLCE DTHZBS RTPVMENB, PYVPYuOP RTYOYNBENBS RB RTYCHEDEOOHA CHSHCHIE, LPZDB UETCHETSCH Y LMYEOFSHCH NFS OBIPDSFUS CH TBOSHI UEFSI. eUMY LFP FPF UBNSCHK UMHYUBK, RTPCHETSHFE, YUFP CHBY NBTYTHFYBFPTSCH RTPRHULBAF OHTSOKHA YOZHPTNBGYA UDP, CH RTPFYCHOPN UMHYUBE CHSC OYUEZP OE RPMHYUFE, YUFP VSC CHSHCH OY RTEDRTYOYNBMY.

h UMEDHAEYI RTYNETBY fastws SCMSEFUS YNEOEN IPUFB (YOFETZHEKUB) CHSHCHUPLPRTPYJCHPDYFEMSHOPK TBVPYUK UFBOGIY, B freebox SCMSEFUS YNEOEN IPUFB (YOFETZEKUB) UYUFENSCH FreeBSD UP UMBVSHCHN UEFECHSCH N BDBRFETPN. lTPNE FPZP, /sharedfs VKhDEF SChMSFSHUS LURPTFYTHENPK YUETE NFS ZHBKMPCHPK UYUFENPK (PVTBFYFEUSH L UFTBOIGBN URTBCHPYuOPK UYUFENSCH RP LPNBODE), B /project VKhDEF FPYULPK NPOFITPCHBOYS LLURP TFYTHENPK ZHBKMPCHPK UYUFENSCH ABOUT LMYEOFE. h MAVPN UMHYUBE, PFNEFSHFE, YuFP DMS ChBYEZP RTYMPTSEOIS NPZHF RPOBDPVYFSHUS DPRPMOYFEMSHOSHCHE RBTBNEFTSHCH, FBLYE, LBL hard , soft YMY bg .

rTYNET WYUFENC FreeBSD (freebox) LBL LMYEOFB W JBKME /etc/fstab ABOUT freebox:

Fastws:/sharedfs/project nfs rw,-r=1024 0 0

lPNBODB, CHCHDBCHBENBS CHTHYOOHA ABOUT NBYOE freebox:

# mount -t nfs -o -r=1024 fastws:/sharedfs /project

rtynet uyufensch FreeBSD W LBYUEUFCHE UETCHETB W JBKME /etc/fstab fastws:

Freebox:/sharedfs/project nfs rw,-w=1024 0 0

LPNBODB, CHCHDBCHBENBS CHTHYOOHA ABOUT NBYOE fastws:

# mount -t nfs -o -w=1024 freebox:/sharedfs /project

rTBLFYUEULY CHUE 16-TBTSDOSCHE UEFECHSCHE BDBRFETSCH RPCHPMSF TBVPFBFSH VE HLBBOOSCHIE CHSCHIE PZTBOYUEOYK ABOUT TBNET VMPLCH RTY YUFEOY Y Y BRYUY.

DMS FEI, LFP YOFETEUKHEFUUS, OYCE PRYUSCHCHBEFUUS, UFP CE RTPYUIPDYF CH RTY RPSCHMEOYY YFPK PYYVLY, Y PVYASUOSEFUS, RPYUENKH EE OCHPЪNPTSOP HUFTBOIFSH. LBL RTBCHYMP, NFS TBVPFBEF U VMPLBNY >> TBNETPN 8љLYMPVBKF (IPFS PFDEMSHOSHCHE ZHTBZNEOFSHCH NPZKhF YNEFSH NEOSHHYE TBNETSHCH). fBL, RBLEF Ethernet YNEEF NBLUINBMSHOSHCHK TBNET PLPMP 1500љVBKF, FP VMPL >> NFS TBBYCHBEFUS OB OEULPMSHLP RBLEFPCH Ethernet, IPFS OB VPMEE CHSHCHUPLPN HTPCHOE FFP CHUE FPF CE EDYOSCH K VMPL, LPFPTSCHK DPMTSEO VSHCHFSH RTYOSF, UPVTBO Y RPDFCHETSDEO LBL PYO VMPL. CHSHUPLPRTPYCHPDYFEMSHOSHOE TBVPYUYE UFBOGIY NPZKhF RPUSCHMBFSH RBLEFSHCH, LPFPTSCHE UPPFCHEFUFCHHAF PDOPNKH VMPLH NFS, UTBYH DTHZ ЪB DTHZPN, OBULPMSHLP LFP RPCHPMSEF DEMBFSH UFBODBTF. ABOUT UMBVSCHI, OYLPRTPYCHPDYFEMSHOSHCHI BDBRFETBI RBLEFSHCH, RTYYEDYE RPCE, OBLMBDSCCHBAFUS RPCHETI TBOEE RTYYEDYI RBLEFPH FPZP CE UBNPZP VMPLB DP FPZP, LBL SOY NPZHF VSHCHFSh RETEDBOSH IPUFH Y VMPL LBL EDYOPE GEMPE OE NPTCEF VSHCHFSH UPVTBO YMY RPDFCHETSDEO. h TEEKHMSHFBFE TBVPYUBS UFBOGIS CHIPDYF CH UYFKHBGYA FBKN-BHFB Y RSHCHFBEFUS RPCHFPTYFSH RETEDBYUH, OP HCE U RPMOSCHN VMPLPN H 8љlv, Y RTPGEUU VHDEF RPCHFPTSFShUS UOPCHB, DP VE ULPOEYUOPUFY.

BDBDCH TBNET VMPLB NEOSHY TBNETB RBLEFB Ethernet, NSC DPUFYZBEN FPZP, UFP MAVPK RPMOPUFSHHA RPMKHUEOOOSCHK RBLEF Ethernet NPCEF VSHCHFSH RPDFCHETSDEO YODYCHYDKHBMSHOP, Y YYVETSYN FHRILPCHHA UIFHBGYA.

obmptseoye RBLEFPCH NPTSEF CHUE EEE RTPSCHMSFSHUS, LPZDB CHSHCHUPLPRTPYCHPDYFEMSHOSHCHE TBVPYE UVBOGYY UVTBUSCCHBAF DBOOSCHE ABOUT PC-UYUFENKH, PDOBLP RPCHFPTEOYE FFK UIFHBGYY OE PVSBFEMSHOP WMPMEE ULPTPUFO BDBRFETBNY WMPLBNY >> NFS. lPZDB RTPYUIPDYF OBMPTSEOYE, UBFTPOHFSHE VMPLY VHDHF RETEDBOSH UPCHB, Y ULTTEE CHUEZP, SING VHDHF RPMHYUEOSCH, UPVTSCH Y RPDFCHETSDEOSCH.

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE: