What is NFS? Network File System. File system network access protocol. NFC technology in smartphones and its practical use Mounting a remote NFS

lTPNE RPDDETTSLY NOPZIYI RTPYUYI FYRPCH ZHBKMPCCHCHI UYUFEN, PE FreeBSD CHUFPEOB RPDDETTSLB UEFECHPK ZHBKMPCHPK UYUFENSH (Network File System), YACHEUFOPK LBL NFS. NFS RPCHPMSEF UYUFENE YURPMSH'PCHBFSH LBFBMPZY Y ZHBKMSCH UPCHNEUFOP U DTHZYNY NBYYOBNY, RPUTEDUFCHPN UEFY. rPUTEDUFCHPN NFS RPMSH'PCHBFEMY Y RTPZTBNSCH NPZHF RPMHYUBFSH DPUFHR L JBKMBN ABOUT HDBM

chPF OELPFPTSHE Y OBYVPMEE BNEFOSCHI RTEINHEUFCH, LPFPTSCHE DBЈF YURPMSh'PCHBOYE NFS:

    pFDEMShOP CHSFSCHE TBVPYUYE UFBOGYY YURPMSHHAF Neosho UPVUFCHEOOPZP DYULPCHPZP RTPUFTBOUFCHB, FBL LBL UPCHNEUFOP YURPMSHHENSCHE DBOOSCHE NPZHF ITBOYFSHUS ON PDOPK PFDEMSHOPK NBYYOE J VSCHFSH DPUFHROSCHNY LCA DTHZYI NBYYO B UEFY.

    rPMSh'PCHBFEMSN OE OKHTSOP YNEFSH DPNBYOYE LBFBMPZY, PFDEMSHOSHE DMS LBTSDPK NBYYOSCH CH CHBYEK UEFY. DPNBYOYE LBFBMPZY NPZKHF TBURPMBZBFSHUS ABOUT THE FOLLOWING NFS YI SPTSOP UDEMBFSH DPUFHROSCHNY PFPCHUADKH CH UEFY.

    hUFTPKUFCHB ITBOEOYS YOZHPTNBGY, FBLYE, LBL DYULEFSCH, RTYCHPDSCH CD-ROM Y HUFTKUFCHB Zip (R), NPZHF YURPMSHUPCHBFSHUS DTHZYBNY NBYYOEOE. ьFP NPTSEF RTYCHEUFY L HNEOSHYEOYA RETEOPUYNSHI KHUFTKUFCH ITBOEOYS YOZHPTNBGY CH UEFY.

chPF OEULPMSHLP RTEINETOSHI UTPL YJ ZhBKMB / etc / exports:

h UMEDKHAEYI RTYNETBI DBЈFUS PVEBS YDES FPZP, LBL LLURPTFYTPCHBFSH ZHBKMPCHCHE UYUFENSCH, IPFS LPOLTEFOSCHE RBTBNEFTSCH NPZHF PFMYYUBUBFSHUJU CHUZHU l RTYNETH, YUFPVSCH LURPTFYTPCHBFSH LBFBMPZ / cdrom LCA FTЈI NBYYO, OBIPDSEYIUS H FPN CE UBNPN DPNEOE, YUFP UETCHET Q (YNS RPFPNH PFUHFUFCHHEF DPNEOOPE LCA LBTSDPK NBYYOSCH) YMY LCA LPFPTSCHI YNEAFUS BRYUY H ZHBKME / etc / hosts. ЖМБЗ -ro HLBSHCHCHBEF ABOUT YURPMSHUPCHBOYE LURPTFYTKHENPK ZHBKMPCHPK UYUFENSCH CH TETSYNE FPMSHLP YUFEOIS. u ЬFЙN ZhMBZPN HDBMЈOOBS UYUFENB OE UNPTSEF OILPINE PVTBPN YONEOIFSH LURPTFYTKHENHA ZHBKMPCHHA UYUFENH.

/ cdrom -ro host1 host2 host3

h UMEDHAEEK UVTPLE LLURPTFYTKHEFUS ZHBKMPCHBS UYUFENB / home, LPFPTBS UVBOPCHYFUS DPUFHROPK FTEN IPUFBN, KHLBBOOSCHN RP YI IP-BDTEUBN. ьFP RPMEEGOP, EUMY X CHBU EUFSH UPVUFCHEOOBS UEFSH WEB OBUFTFEOOOPZP UETCHETB DNS. lBL CHBTYBOF, ZhBKM / etc / hosts NPTSEF UPDETTSBFSH CHOHFTEOOOYE YNEOB IPUFPCH; RPCBMHKUFB, PVTBFYFEUSH L URTBCHPYUOHA UYUFENKH RP DMS RPMHYUEOYS DPRPMOYFESHOPK YOZHPTNBGY. ЖМБЗ -alldirs RPCHPMSEF TBUUNBFTYCHBFSH RPDLBFBMPZY CH LBYUEUFCHE FPYUEL NPOFYTPCHBOYS. dTHZYNY UMPCHBNY, LFP OE NPOFYTPCHBOYE RPDLBFBMPZPCH, OP TBTEYEOYE LMYEOFBN NPOFYTPCHBFSH FPMSHLP LBFBMPZY, LPFPTSCHAF YN FTEV.

/ home -alldirs 10.0.0.2 10.0.0.3 10.0.0.4

h UVTPLE, RTYCHEDЈOOPK OYCE, JBKMPCHBS UYUFENB / a LURPTFYTKHEFUS FBLYN PVTBPN, UFP POB DPUFHROB DCHN LMYEOFBN YY DTHPCHY DPNEOFBN RBTBNEFT -maproot = root RPJCHPMSEF RPMSh'PCHBFEMA root HDBMЈOOPK UYUFENSCH PUHEEUFCHMSFSH ABRYUSH ABOUT LURPTFYTKHENKHA ZHBKMPCHHA UYUFENKHJ LBCH LBP RP. eUMY RBTBNEFT -maproot = root OE ЪBDBO, FP DBCE EUMY RPMSHUPCHBFEMSH YNEEF RTBCHB DPUFHRB root ABOUT KDBMЈOPK UYUFENE, ON OE UNPTSEF NPDUCHBSCHBFENCHYTPK ZHEPK

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

dMS FPZP, UFPVSH LMYEOF UNPZ PVTBFYFSHUS L LLURPTFYTPCHBOOPK ZhBKMPCHPK UYUFENE, PO DPMTSEO YNEFSH RTBCHB UDEMBFSH ЬFP. rTPCHETSHFE, UFP LMYEOF KhLBBBO Ch CHBYEN ZhBKME / etc / exports.

h ZHBKME / etc / exports LBTSDBS UFTPLB UPDETTSYF YOZHPTNBGYA PV LURPTFYTPCHBOYY DMS PFDEMSHOPK ZHBKMPCHPK UYUFENSH DMS PFDEMSHOP CHSFPPZP IPUFF. xDBMЈOSCHK IPUF NPTSEF VSCHFSH ÄBDBO FPMSHLP PDYO TBJ DMS LBTSDPK ZhBKMPCHPK UYUFENSCH, J NPTSEF YNEFSH FPMSHLP PDOKH ЪBRYUSH, YURPMSHCHANCHENKHENKHENMBYUK l RTEINETH, RTEDRPMPTSYN, UFP / usr SCHMSEFUS PFDEMSHOPK ZhBKMPCHPK UYUFENPK. uMEDHAEIK / etc / exports VHDEF OELPTTELFEO:

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

pDOB ZHBKMPCHBS UYUFENB, / usr, YNEEF DCHE UVTPLY, ЪBDBAEYE LURPTFYTPCHBOYE DMS PDOPZP Y FPZP TSE IPUFB, client. rTBCHYMSHOSCHK ZhPTNBF CH FPN UMHYUBE FBLPCH:

/ usr / src / usr / ports client

uCHPKUFCHB PFDEMSHOPK ZHBKMPCHPK UYUFENSCH, LLURPTFYTKHENPK OELPFPTPNKH IPUFKH, DPMTSOSCH YBDBCHBFSHUS CH PDOK UVTPLE. uFTPLY VEH KHLBBOYS LMYEOFB CHPUTYOINBAFUS LBL PFDEMSHOSCHK IPUF. ьFP ПЗТБОЙЮЙЧБЕФ ФП, ЛБЛ ЧЩ NPTSEFE ьLURPTFYTPCHBFSH ZHBKMPCHCHE UYUFENSCH, OP DMS VPMSHYOUFCHB LFP OE RTPVMENB.

OYCE RTICHEDЈO RTYNET RTBCHYMSHOPZP URYULB BLURPTFYTPCHBOYS, ZDE / usr TH / exports SCHMSAFUS MPLBMSHOSCHNY ZHBKMPCHSCHNY UYUFENBNY:

# ьLURPTFYTKHEN src ports DMS client01 client02, OP # FPMSHLP client01 JNEEF RTBCHB RPMShЪPCHBFEMS root ABOUT OYI / usr / src / usr / ports -maproot = root client01 / usr / src / usr / NAPHYNP ports NPOFYTPCHBFSH CHUЈ CH # LBFBMPZE / exports. LFP HZPDOP NPTSEF NPOFYTPCHBFSH / exports / obj CHTESINE UFEOIS / exports -alldirs -maproot = root client01 client02 / exports / obj -ro

DBENPO mountd DPMTSEO VSCHFSH RTPYOZHPTNYTPCHBO PV YUNEOOOY ZHBKMB / etc / exports, YUFPVSCH YUNNEOOYS CHUFKHRIMY CH UIMH. ьFP NPTSEF VSHFSH DPUFYZOHFP RPUCHMLPK UYZOBMB HUP RTPGEUUH mountd:

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

YMY CHCHCHUPCHPN ULTYRFB mountd RPDUYUFENSCH U UPPFCHEFUFCHHAEIN RBTBNEFTPN:

# /etc/rc.d/mountd onereload

ъB RPDTPVOPK YOZHPTNBGYEK P TBVPFE ULTYRFPH rc.d PVTBEBKFEUSH L tB'DEMљ12.7,>.

lBL CHBTYBOF, RTY RETEBZTHLE FreeBSD CHUЈ OBUFFTPYFUS RTBCHYMSHOP. iPFS CHCHRPMOSFSH RETEBZTKHLKH CHCHUE OE PVSBFEMSHOP. hSCHRPMOEOYE UMEDKHAEYI LPNBOD RPMSh'PCHBFEMEN root ABKHUFF CHUЈ, UFP OKHTSOP.

ABOUT NFS FUNCTIONING:

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

ABOUT LMYEOFE NFS:

# nfsiod -n 4

FERETSH CHUЈ DPMTSOP VSCHFSH ZPFPCHP L TEBMSHOPNKH NPOFYTPCHBOYA HDBMЈOOPK ZhBKMPCHPK UYUFENSCH. h RTICHPDYNSHI RTYNETBI UETCHET VHDEF OPUIFSH YNS server, B LMYEOF VHDEF OPUIFSH YNS client. eUMY BL FPMSHLP IPFYFE CHTENEOOP UNPOFYTPCHBFSH HDBMЈOOHA ZHBKMPCHHA UYUFENH, YMY CHUEZP MYYSH RTPFEUFYTPCHBFSH CHBY OBUFTPKLY, OP RTPUFP BRHUFYFE LPNBODSCH, RPDPVOSCHE RTYCHPDYNSCHN DEUSH, TBVPFBS LBL RPMSHPCHBFEMSH root ON LMYEOFULPK NBYYOE:

# mount server: / home / mnt

rp LFPK LPNBODE ZhBKMPChBS UYUFENB / home ABOUT THE VHDEF UNPOFYTPCHBOB CHARGE LBFBMPZ / mnt ABOUT LMYEOF. eUMY CHUЈ OBUFPTPEOP RTBCHYMSHOP, CHSCH UNPTSEPHE CHPKFY CH LBFBMPZ / mnt ABOUT LMYEOFY HCHYDEFSH ZHBKMSCH, OBIPDSEYEUS ABOUT THE UCHETTE.

eUMY CHSCH IPFYFE BCHFPNBFYUEULY NPOFYTPCHBFSH HDBMЈOOHA ZhBKMPCHHA UYUFENH RTY LBTSDPK ЪBZTHHLE LPNRSHAFETB, DPVBCHSHFE CHBKMUPCHHA etc chPF RTYNET:

Server: / home / mnt nfs rw 0 0

ABOUT UFTBOYGBI URTBCHPYUOPK UYUFENSH RP PETEYUMEOSCH CHUE DPUFKHROSCHE RBTBNEFTSCH.

25.3.4. rTBLFYUEULPE YURPMSHUPCHBOYE

x NFS EUFSH NOPZP CHBTYBOFPCH RTBLFYUEEULPZP RTEOEOOYS. OYCE RTYCHPDYFUS OEULPMSHLP OBYVPME YYTPLP TBURTPUFTBOЈOSHI URPUPVPCH EЈ YURPMSHUPCHBOYS:

    oBUFTKLB OEULPMSHLP NBYYO DMS UPCHNEUFOPZP YURPMSHUPCHBOYS CDROM YMY DTHZYI OPUIFEMEK. ьFP VPMEE DEYЈCHSCHK Y YBYUBUFHA VPME KHDPVOSCHK URPUPV HUFBOPCHLY RTPZTBNOPZP PVEUREUEOIS ABOUT OEULPMSHLP NBYO.

    h VPMSHYY UEFSI NPTSEF PLBBFSHUS VPMEE HDPVOSCHN OBUFTPIFSH GEOFTBMSHOSCHK UETCHET NFS, ABOUT LPFPTPN TBNEEBAFUS CHUE DPNBYOYE RBFBMSHMPZY. FY DPNBYOYE LBFBMPZY NPZHF BFEN LURPTFYTPCHBFSHUS UEFSH B FBL, YUFP RPMSHPCHBFEMY CHUEZDB VHDHF YNEFSH PDYO J FPF CE DPNBYOYK LBFBMPZ Choi BCHYUYNPUFY PF FPZP, ON LBLPK TBVPYUEK UFBOGYY Sing TBVPFBAF.

    oEULPMSHLP NBYYO NPZHF YNEFSH PVEIK LBFBMPZ / usr / ports / distfiles. fBLYN PVTBYPN, LPZDB CHBN OKHTSOP VKHDEF HUFBOPCHYFSH RPTF ABOUT OEULPMSHLP NBYO, CHSCH UNPTSEFE VSCHUFTP RPMKHYUYFSH DPUFHR L YUIFKHYUPBYBYBYBYBYBYBYO

25.3.5. bCHFPNBFYUEEULPE NPOFYTPCHBOYE U amd

FELUF RTEDPUFFBCHIM Wylie stilwell.

FELUF RETERYUBM Chern lee.

(DBENPO BCHFPNBFYUEULPZP NPOFYTPCHBOYS) BCHFPNBFYUEULY NPOFYTKHEF HDBMЈOOHA ZHBKMPCHHA UYUFENH, LBL FPMSHLP RTPYUIPEDIFYF PVTB ZHPYUP lTPNE FPZP, ZHBKMPCHCHE UYUFENSCH, LPFPTSCHE VSCHMY OEBLFYCHOSH OELPFPTPE CHTENS, VHDHF BCHFPNBFYUEULY TBNPOFYTPCHBOSCH DBENPOPN amd. yURPMSHUPCHBOYE amd SCHMSEFUS RTPUFPK BMSHFETOBFYCHPK UFBFYUEULPNKH NPOFYTPCHBOYA, FBL LBL CH RPUMEDOEN UMKHYUBE PVSCHUOP CHUЈ DPMTSOP VPUFPK / fBUst

amd TBVPFBEF, UBN CHSCHUFHRBS LBL UETCHET NFS DMS LBFBMPZPCH / host J / net. lPZDB RTPYUIPDIF PVTBEEOOYE L ZHBKMH CH PDOPN Y'FYI LBFBMPZPCH, amd YEF UPPFCHEFUFCHHAEIK HDBMEOOSCHK TEUHTU DMS NPOFYTPCHBOISCHBOYF E BCHTU / net YURPMSh'KHEFUS DMS NPOFYTPCHBOYS LURPTFYTKHENPK ZhBKMPCHPK UYUFENSCH RP BDTEUKH IP, LPZDB LBL LBFBMPZ / host YURPMSH KHEFUS YURPMSHHEFUS IMS NPOFYTPCHBOYS RLURPTFAYTKHENPK ZHBKMPCHPK UYUFENSCH RP BDTEUKH IP, LPZDB LBL LBFBMPZ / host YURPMSHKHEFUS YURPMSh KHEFUS DMS NPOFYTUPBCHBOYS.

pVTBEEOYE L ZHBKMH CH LBFBMPZE / host / foobar / usr ХЛБЦЕФ amd ABOUT CHCHRPMOEYE RPRSCHFLY NPOFYTPCHBOYS TEUKHTUB / usr, LPFPTSCHK OBIPDYFUS ABOUT IPUFE.

rTINET 25.2. nPOFYTPCHBOYE TEUKHTUB RTY RPNPEY amd

chSCh NPTSEFE RPUNPFTEFSH DPUFKHROSCHE DMS NPOFYTPCHBOYS TEUKHTUSCH PFDBMЈOOOPZP IPUFB LPNBODPK showmount. l RTEINETKH, YUFPVSH RPUNPFTEFSH TEUKHTUCH IPUFB U YNEOEN foobar, CHSC 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 YY RTYNETB, showmount RPLBSCHCHBEF / usr LBL BLURPTFYTKHENSCHK TEUKHTU. rTY RETEIPDE CH LBFBMPZ / host / foobar / usr DBENPO amd RSCHFBEFUS TBBTEYIFSH YNS IPUFB foobar J BCFPNBFYUEULY UNPOFYTPCBFSH FTEVKHENSCHK TEUKHTU.

amd NPTSEF VSCHFSH ЪBRHEEO Y ULTIRFPCH OBYUBMSHOPK ЪBZTKHLJ, EUMY RPNEUFIFSH FBLKHA UVTPLKH CH ZHBKM /etc/rc.conf:

Amd_enable = "YES"

lTPNE FPZP, DBENPOH amd NPZHF VSHFSH RETEDBOSCH OBUFTPEUOSCHE ZhMBZY YUETE RBTBNEFT amd_flags. rP HNPMYUBOYA amd_flags OBUFTFEO UMEDHAEYN PVTBDPN:

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

zhBKM /etc/amd.map ABDBEF PRGYY, YURPMSHHENSCHE RP KhNPMYUBOYA RTY NPOFYTPCHBOY ILURPTFYTKHENSCHI TEUKHTUPCH. h ZHBKME /etc/amd.conf BDBOSCH OBUFTPKLY OELPFPTSCHI VPME UMPTSOSHI PP'NPTSOPUFEK amd.

pVTBFYFEUSH L URTBCHPYUOSCHN UVTBOYGBN RP Y DMS RPMHYUEOYS VPMEE RPMOPK YOZHPTNBGY.

25.3.6. rTPVMENSCH CHBYNPDEKUFCHYS U DTHZYNY UYUFENBNY

FELUF RTEDPUFFBCHIM John lind.

oELPFPTSCHE UEFECHCHE BDBRFETSCH DMS UYUFEN PC U YYOPK ISA JNEAF PZTBOYUEOYS, LPFPTSCHE NPZHF RTYCHEUFY L UETSHEOSCHN RTPVMENBN CH UEFY, CH NUBUFOPUFY. FY RTPVMENSCH OE UREGYUZHYUOSCH DMS FreeBSD, PDOBLP LFH UYUFENH POI JBFTBZYCHBAF.

rTPVMENB, LPFPTBS CHUOILBEF RTBLFYUEULY RTBLFYUEULY CHUEZDB RTJ TBVPFE RP UEFY UYUFEN PC (FreeBSD) U CHUPLPRTPYYCHPDIFESHOSHCHNY TBBWGUYUNYN Graphics Th Sun Microsystems, Inc. nPOFYTPChBOYE RP RTPFPLPMH NFS VHDEF TBVPFBFSH OPTNBMSHOP, J OELPFPTSCHE PRETBGYY FBLTSE VHDHF CHSCHRPMOSFSHUS HUREYOP, OP OEPTSYDBOOP UETCHET PLBTSEFUS OEDPUFHROSCHN LCA LMYEOF, IPMF BRTPUSCH L J PF DTHZYI UYUFEN VHDHF RTPDPMTSBFSHUS PVTBVBFSCHCHBFSHUS. fBLPE CHUFTEYUBEFUS U LMYEOFULYNY UYUFENBNY, OE JBCHYUYNP PF FPZP, SCHMSEFUS MY LMYEOF NBYYOPK U FreeBSD YMJ TBVPYUEK UYUFENBNY. private enterprise NOPZYI UYUFENBI RTY CHOOYLOPCHEOYY FPC RTPVMENSH OEF URPUPVB LPTTELFOP ABCHETYYFSH TBVPFKH LMYEOFB. EDYOUFCHOOOSCHN CHCHIPDPN YBYUBUFHA SCHMSEFUS IPMPDOBS RETEBZTHALB LMYEOFB, RPFPNKH UIFP UIFKHBGYS U NFS OE SPCEF VSCFSH TBBTEYEOB.

IPFS RTBCHYMSHOSCHN >> TEYEOYEN SCHMSEFUS HUFBOPCHLB RPMEE RTPYCHPDYFESHOPZP Y ULPTPUFOPZP UEFECHPZP BDBRFETB ABOUT UYUFENH FreeBSD, RNEEFEPUCHT eUMY WYUFENB FreeBSD SCHMSEFUS UETCHETPN, HLBTSIFE RBTBNEFT -w = 1024 ABOUT LMYEOF RTY NPOFYTPCHBOY. eUMY WYUFENB FreeBSD SCHMSEFUS LMYEOFFPN, FP UNPOFYTHKFE ZHBKMPCHHA UYUFENKH NFS U RBTBNEFTPN -r = 1024. ьФЙ RBTBNEFTSCH NPZKHF VSHFSH ÄBDBOSCH CH YUEFCHETFPN RPME ЬBRYUY CH ZHBKME fstab LMYEOFB RTY BCHFPNBFYUEULPN NPOFYTPCHBOYUY, YMY RTY RPBPNPEHBOYT

oHTSOP PFNEFIFSH, UFP JNEEFUS FBLCE DTHZBS RTPVMENB, PYIVPYUOP RTYOINBENBS ЪB RTYCHDEOOKHA CHSHCHYE, LPZDB UETSCHY LMYEPSHBSCHO NFS OBSCHI. eUMY LFP FPF UBNSCHK UMHYUBK, RTPCHETSHFE, UFP CHBY NBTYTHFY'BFPTSCH RTPRKHULBAF OKHTSOKHA YOZHPTNBGYA UDP, CH RTPFYCHOPN UMKHYUBE CHSCH OYUEZP OE RPMKHYUIFE, UFP VSCH CHSCHOY RTEDRTEY.

h UMEDKHAEYI RTYNETBI fastws SCHMSEFUS YNEOEN IPUFB (YOFETZHEKUB) CHSCHUPLPRTPYCHPDIFEMSHOPK TBVPYUEK UVBOGYY, B freebox SCHMSEFUS YNEOSCH IPUZHEVDB (YOFETZHEKUB) lTPNE FPZP, / sharedfs VHDEF SCHMSFSHUS LURPTFYTHENPK YUETE NFS ZHBKMPCHPK UYUFENPK (L PVTBFYFEUSH UFTBOYGBN URTBCHPYUOPK UYUFENSCH LPNBODE RP), B / project VHDEF FPYULPK NPOFYTPCHBOYS LURPTFYTHENPK ZHBKMPCHPK UYUFENSCH ON LMYEOFE. h MAVPN UMKHYUBE, PFNEFSHFE, UFP DMS CHBYEZP RTEIMPTSEOIS NPZHF RPOBDPVIFSHUS DPRPMOYFESHOSCHE RBTBNEFTSCH, FBLJE, LBL hard, soft YMY bg.

rTYNET UYUFENSCH FreeBSD (freebox) LBL LMYEOFB W ZHBKME / etc / fstab ABOUT NBYOE freebox:

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

lPNBODB, CHCHDBCHBENBS CHTHYUOHA ABOUT NBYOE freebox:

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

rTYNET UYUFENSCH FreeBSD H LBYUEFCH UETCHETB H ZHBKME / etc / fstab ABOUT fastws:

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

LPNBODB, CHSCHDBCHBENBS CHTHYUOHA ABOUT NBYOE fastws:

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

rTBLFYUEULY CHUE 16-TBTSHE UEFECHCHE BDBRFETSCH RPJCHPMSF TBVPFBFSH VEH KHLBBOOSHCHYE PZTBOYUEOOIK ABOUT TBNET VMPLPCH RTY YUFEYUYUY J Ъ.

DMS FEI, LFP JOFETEUKHEFUS, OYCE PRYUSCHBEFUS, UFP TCE RTPYUIPDIF CH RTI RPSCHMEOY UFPK PYIVLJ, J PVYASUOSEFUS, RPYUENKH EEPTZOOCHP HUNG. lBL RTBCHYMP, NFS TBVPFBEF U VMPLBNY >> TBNETPN 8љLYMPVBKF (IPFS PFDEMSHOSHE ZhTBZNEOFSCH NPZHF YNEFSH NEOSHY TBNETSCH). FBL, RBLEF Ethernet YNEEF NBLUYNBMSHOSCHK TBNET PLPMP 1500љVBKF, OP VMPL >> NFS TBVYCHBEFUS ON OEULPMSHLP RBLEFPCH Ethernet, IPMF ON VPMEE CHSCHUPLPN HTPCHOE FP Chueh FPF CE EDYOSCHK VMPL, LPFPTSCHK DPMTSEO VSCHFSH RTYOSF, UPVTBO TH RPDFCHETTSDEO LBL PDYO VMPL. chSCHUPLPRTPYCHPDIFESHOSHE TBVPYUE UVBOGY NPZHF RPUSCHMBFSH RBLEFSCH, LPFPTSCHE UPPFCHEFUFCHKHAF PDOPNKH VMPLKH NFS, UTBJH DTHZ BUF BUFCSPN On UMBVSCHI, OYLPRTPYCHPDYFEMSHOSCHI BDBRFETBI RBLEFSCH, RTYYEDYYE RPTSE, OBLMBDSCHCHBAFUS RPCHETI TBOEE RTYYEDYYI RBLEFPCH FPZP CE UBNPZP VMPLB DP FPZP, LBL Sing NPZHF VSCHFSH RETEDBOSCH IPUFH J VMPL LBL EDYOPE gempen OE NPTSEF VSCHFSH UPVTBO YMY RPDFCHETTSDEO. h TEKHMSHFBFE TBVPYUBS UFBOGYS CHIPDIF CH UIFKHBGYA FBKN-BHFB Y RSCHFBEFUS RPChFPTYFSH RETEDBYUH, OP HTSE U RPMOSHN VMPLPN CH 8љLVUCH VMPLVUCH

ъБДБЧ TBNET VMPLB NEOSHY TBNETB RBLEFB Ethernet, NSCh DPUFYZBEN FPZP, UFP MAVPK RPMOPUFSHA RPMHYUESCHK RBLEF Ethernet NPTSEF VSCHFSH RPDFCHETTSDEO YOBODYCH.

oBMPTsEOYE RBLEFPCH NPTSEF Chueh of the ECE RTPSCHMSFSHUS, LPZDB CHSCHUPLPRTPYCHPDYFEMSHOSCHE TBVPYUYE UFBOGYY UVTBUSCHCHBAF DBOOSCHE ON PC-UYUFENH, PDOBLP RPCHFPTEOYE FPK UYFHBGYY OE PVSBFEMSHOP have VPMEE ULPTPUFOSCHNY BDBRFETBNY have VMPLBNY >> NFS. lPZDB RTPYUIPDIF OBMPTSEOYE, ЪBFTPOHFSCHE VMPLY VHDHF RETEDBOSCH UPCHB, Y ULPTEE CHUEZP, POI VKHDHF RPMHYUEOSCH, UPVTBOSCH YPDSCHETTSDEO.

"and you already have an idea of ​​the" network file system ", its capabilities and the degree of security. However, in this article, everything was understood mainly from the client's point of view ... but what if you wanted to have your own NFS server? "to have" does not mean "to break", it means "to install and configure").

Well, if you have such a desire, then the first question that you should ask yourself is: "What for is the button accordion to the goat?" For putting an NFS server at home
rather pointless - no one will appreciate it, but if you are lucky enough to administer "people in black" in the office, or in the newfangled "home network" - then it's a completely different matter ...

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

  • nfsd - direct protocol servicing
    NFS;
  • mountd - servicing mount operations;
  • rpc.portmap - RPC ports daemon; needed because requests to the NFS server are sent as packets
    RPC;

How to do it? Very simple - go to the file "/etc/rc.d/rc.inet2" 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 up all this ...
The first thing to decide is who has what rights with respect to this or that information. This is configured through the "/ etc / exports" file. Permissions are "read" and "read and write". How this is configured is described in the "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 is when the client works with attributes, and the second is when the client requests data directly. Requests of the first type are searching for a file, reading the list of permissions, etc., of course, you understand that they are lightly loading the network. Requests of the second type are the transmission and reception from the client directly of the contents of the files; and this is where the question arises: "what will be transmitted and how often?" This is especially relevant if you have a 10 Mbps network (well, in other words, a standard Russian network). If you know, 10 Mbps is just 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 set up data caching on the client machine (biod daemon). Then, once having requested a file and referring to 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 regularly check whether the file has changed on the server, if the fact of change is detected, then the file in the cache will be replaced by a "fresh version"
(as you can imagine, checking "whether a file has changed" is a request "by attributes", which is often hundreds of times smaller than the file itself).

Well: we started the NFS server, determined the access permissions, sorted out the load ... Now it remains to drive the screw with the necessary info and use
NFS capabilities to its fullest ...

Instead of a conclusion:

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

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

I had a situation when on the NFS client there was a regular user without sudo access and he had to be able to read and write in 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 reguser write to files and directories on the NFS server.
  2. Make it so that reguser can mount and unmount the NFS partition itself.

How to allow writing on an NFS server to users from an NFS client that has a different UID from the UID of the user who owns files on the NFS server

Actions are performed on the NFS server as the root user.
Editing / etc / exports:
nano / etc / exports
We insert or change a line that says which directory will be accessible (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 from which it is allowed to connect to NFS;
  • rw- permission to read and write;
  • async- 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 higher;
  • no_subtree_check- when allowing access to a subdirectory of the file system, and not the entire file system, the server checks whether the requested file is in the exported subdirectory or not. no_subtree_check disables this check, which decreases security, however, increases the data transfer rate;
  • 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 the user and the NFS server, whose identifiers are specified in anonuid and anongid;
  • anonuid- 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»The value for anonuid will be the first number 1000;
  • anongid- OS group identifier on the NFS server. Taken from / etc / group... For example, if you need a group www-data and in the file / etc / group there is a line " www-data: x: 33:"The value for anongid will be 33;

If you need to specify more precisely which users on the NFS client correspond to users on the NFS server, 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

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

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

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

Add to / etc / fstab mount rule. Opening the file:
sudo nano / etc / fstab
Add 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- the directory on the NFS server that we mount. It should be on the list / etc / exports on an NFS server;
  • / media / nfs- directory on the NFS client, into which we mount the NFS partition;
  • nfs- type of file system;
  • rw- with the right to write;
  • noauto- an option indicating that the partition does not need to be mounted automatically at boot;
  • user Is an option to allow any user to mount and unmount this partition.

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

We allow scripts to be executed:
chmod ug + x ~ / nfs.mount ~ / nfs.umount

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

Disconnecting an NFS share:
~ / nfs.umount

Everything, all tasks are completed.

We tell you how to quickly and easily raise your NFS server on Ubuntu Linux Server 14-04.1, and also we will understand the principles of the NFS protocol and consider the theory.

Theory

Abbreviation NFS stands for Need for Speed ​​- Network File System. It is a protocol for accessing distributed network file systems, with which you can mount remote directories to your server. This allows you to use the disk space of another server for storing files and regularly write data to it from multiple servers.

The protocol has a client-server model, that is, one server (also called a "ball" from the word share), with the NFS package installed, will provide access to its directories and files, and client computers will connect to it over the network. Let's fix what we read with a diagram:

The NFS server is accessed as protocol packets RPC(Remote Call Procedure), which allows you to perform various functions or procedures in another network space, that is, on a remote server.

Authorization of users who connect to the server is carried out by IP address, as well as by special user identifiers UID and groups GID... This is not the best way regarding the security of stored files, compared to the classic "login / password" model. On the other hand, thanks to this architecture and the fact that NFS used the UDP protocol without establishing a session, it is practically immune to network failures and the client computers themselves. So, in case of any failure, the file transfer will simply pause, and when the connection is established, the transfer will resume without the need for any reconfiguration.

Customization

I think the theory is clear, so let's get down to practice. As it was said, all settings will be carried out on Ubuntu 14.04.

First of all, you need to install the necessary components on the computer that will act as the NFS server.

So, download the nfs-kernel-server package, with which we can distribute access (“share”) directories. To do this, on the future NFS server, enter the commands:

Sudo apt-get update sudo apt-get install nfs-kernel-server

Now we create the actual directory to which we want to share access. It is worth noting that you can also "share" the directories already on the server, but we will create a new one:

Sudo chown nobody: nogroup / var / nfs

Enter this command only for those directories that you created yourself, you do not need to enter it for existing directories, for example / home.

The next step is to change the configuration of NFS itself, it lies in the / etc / exports file, open it for editing with your favorite editor:

Sudo nano / etc / exports

This will open a configuration file with lines commented out, which contains examples of configuration for different versions of NFS.

Commented out ones are those with a symbol at the beginning. # , and this means that the parameters specified in them have no effect.

We need to add the following uncommented lines to this file:

/ var / nfs 10.10.0.10/24(rw,sync,no_subtree_check)

  • / var / nfs- The directory we want to share
  • 10.10.0.10 - IP address and mask of the client computer to which you want to give access to the directory
  • rw- Allows the client to read (r) and write (w) files in the directory
  • sync- This option forces NFS to write the changes to disk before responding to the client.
  • no_subtree_check- This option disables checking that the user is accessing a file in a specific subdirectory. If this check is enabled, then problems may arise when, for example, the name of a file or subdirectory has been changed and the user will try to access them.

After that, you need to create a table of correspondence between shared directories and clients, and then start the NFS service. To do this, enter the following commands.

The crux of the problem: at one time, Samsung began to produce TVs that support the DLNA technology developed by leading manufacturers of household appliances, based on the principle of "digital home". This technology made it possible to integrate TVs into a local home network, which made it possible to exchange media content between a TV and a computer, and in particular, watch movies on TV stored on a computer via a local network or via WiFi. However, the multimedia solution proposed by Samsung to implement this technology leaves much to be desired, to put it mildly. So, movies watched over the network in the built-in TV media player, in most cases, are not rewound. In addition, while watching movies over the network, unlike watching movies from a USB flash drive or a portable hard drive connected to a TV via a USB port, the continuous playback function (blue button on the remote control) is not supported. Finally, the very need to run Samsung PC Share Manger every time on your computer and make corrections after each deletion or addition of video files to the disk is a little annoying.

Enabling the NFS (Network File System) network protocol will help us not only to eliminate the existing problems with watching movies on TV on a local network, but also to increase the data transfer speed (which can be an important factor when watching large HD movies). After we make the necessary installation and configuration of the NFS server, our computer will be perceived by the TV as if we connected a portable hard drive to the TV via a USB port (the only difference will be only in the data exchange rate, which is determined by the maximum bandwidth your local network or WiFi connection).

NFS is a server-client networking protocol. We will have a computer as a server, a TV set as a client. We have already discussed the inclusion of NFS support on the TV in the previous section during the setup and installation of the SamyGO Auto application on the TV. If you remember, in the settings of the SamyGO Auto configurator, we checked the box opposite the NFS section and also registered the IP address of the NFS server (192.168.xxx.xxx), that is, the address of our computer:
In this section, we will look at installing and configuring an NFS server on our computer. There are many different programs on the Internet for installing and configuring an NFS server. We will use the application haneWIN NFS Server(it is shareware, and after a certain period of time requires registration of a serial number, but, as you understand, there are always craftsmen on the Internet who can solve this problem). So let's get started:

Note: Sometimes the Windows firewall or antivirus built-in firewall can block the NFS server. Whatever this happens, in the Windows firewall (or if you have another firewall, then in it) you need to allow access to the network for two applications: nfsd.exe and pmapd.exe (they are located in the server installation folder C: \ Program Files \ nfsd).


Finally, turn on the TV and make sure our NFS server is up and running. In the previous section, when we installed the SamyGO Auto program on the TV, we specified the parameter for autorun in it. Therefore, when you turn on the TV, it should automatically detect our NFS (this does not happen immediately, but about 20 seconds after turning on the TV). So, turn on the TV, then go to the media player and see a new device there - the NFS Server.

If you notice, there is a USB connection icon next to NFS. This is what we talked about earlier, now your TV will perceive your computer as a hard drive or USB flash drive. You can go to the Movie section and enjoy watching movies over the network. You no longer need to run Samsung PC Share Manger on your computer. Just add a movie to your computer's movie folder and it will automatically "load" into your TV's media player.

In the next section, we will talk about how to record TV programs to a USB flash drive or, since we now have NFS, to a folder with movies on a computer.