Cov txheej txheem:

Raspberry Pi NFS thiab Samba File Server: 11 Cov Kauj Ruam (nrog Duab)
Raspberry Pi NFS thiab Samba File Server: 11 Cov Kauj Ruam (nrog Duab)

Video: Raspberry Pi NFS thiab Samba File Server: 11 Cov Kauj Ruam (nrog Duab)

Video: Raspberry Pi NFS thiab Samba File Server: 11 Cov Kauj Ruam (nrog Duab)
Video: Raspberry Pi: How to Mount an NFS Share 2024, Hlis ntuj nqeg
Anonim
Raspberry Pi NFS thiab Samba File Server
Raspberry Pi NFS thiab Samba File Server

Qhov haujlwm no yog theem kawg ntawm kev ua tiav uas suav nrog ob qho ua yav dhau los thiab tshaj tawm cov xov hluav taws xob.

***

1. Raspberry Pi CPU Qhov Ntsuas Kub - Tshaj Tawm Kaum Ib Hlis 20, 2020

www.instructables.com/Raspberry-Pi-CPU-Tem…

2. Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub - Tshaj Tawm Kaum Ib Hlis 21st, 2020

www.instructables.com/Raspberry-Pi-Box-of-…

***

Thaum xub thawj kuv tau npaj ua cov ntaub ntawv server uas tuaj yeem faib cov ntaub ntawv ntawm RPI (Raspberry Pi), Windows PC thiab lwm yam Linux servers.

Txhawm rau zam qhov tsis yooj yim ntawm kev luam ib yam dab tsi rau USB los ntawm lub tshuab thiab rov luam txhua yam rau lub hom phiaj tshuab dua, RPI raws Samba thiab NFS server tuaj yeem siv ua cov ntaub ntawv server.

Txawm hais tias scp lossis rsync hais kom tuaj yeem siv nruab nrab ntawm Linux tshuab (piv txwv li Ubuntu thiab Raspberry pi OS servers), siv cov ntaub ntawv tuav tswj xws li cp thiab mv yog qhov yooj yim dua.

Yog li ntawd, RPI cov ntaub ntawv server qhia hauv daim duab saum toj no tau ua.

Tus neeg rau zaub mov no tuaj yeem txhawb nqa cov haujlwm hauv qab no.

- SSD (SanDisk, dub ib ntawm daim duab saum toj no) txhawb NFS rau kev sib qhia cov ntaub ntawv ntawm Linux servers

- HDD (Seagate, ib qho dawb) txhawb Samba rau sib qhia cov ntaub ntawv ntawm kuv lub Windows PC thiab RPI

- Sab hauv mob siab rau RPI fais fab mov (5V 3A) tau siv

- RPI CPU ntsuas qhov ntsuas kub (4 qib kub) tau ua ke

- Txias FAN cia li qhib thaum kub siab dua 50C

***

Cia saib ntau ntxiv yuav ua li cas cov ntaub ntawv server tau sib sau ua ke thiab teeb tsa.

Kauj Ruam 1: Cov Ntaub Ntawv Tsim Tus Qauv thiab Cheebtsam

File Server Design thiab Components
File Server Design thiab Components

Raws li cov ntaub ntawv server tau tsim los ntawm kev sib sau ua ke cov laug cam thiab lwm yam khoom xws li HDD, SSD, hloov lub zog hluav taws xob thiab ntxiv rau, Kuv tsuas yog qhia tag nrho cov qauv duab.

Hais txog kev qhia ntxaws ntxaws ntawm qhov txias ntawm FAN thiab CPU ntsuas qhov ntsuas kub, thov saib yav dhau los tshaj tawm cov ntsiab lus ntawm cov haujlwm.

Kuv yuav piav qhia tsuas yog cov khoom tshiab ntxiv los ua cov server server.

- Seagate HDD yog 2.5 DATA disk uas kuv yuav los ntev dhau los (tej zaum 10 xyoo ntxiv) thiab nws suav nrog SATA rau USB interface adapter (Lub cev hlau tau tshem tawm)

- SanDisk SSD cuam tshuam nrog kev yuav SATA rau USB3.0 adapter uas kuv yuav los ntawm khw hauv internet (Koj tuaj yeem tshawb nrhiav cov khoom no los ntawm lub npe "SATA rau USB cable")

-Me me 15W AC-DC hloov pauv fais fab mov (Txhais Tau Zoo RS-15-5)

- Acrylic chassis (Lub vaj huam sib luag pob tshab yog 15cm (W) x 10cm (H) x 5mm (D) x 1, 15cm (W) x 10cm (H) x 3mm (D) x 3

- Tus neeg txhawb nqa hlau 7cm (3.5mm) x 4, 4cm (3.5mm) x 4, 3.5cm (3.5mm) x 4

- Bolts thiab ceev

***

Tsuas yog saum toj no cov khoom tshiab, txhua lwm yam khoom tau rov siv dua li cov txiaj ntsig ntawm cov phiaj xwm yav dhau los suav nrog PCB cov laug cam, cov txuas thiab cov xov hluav taws xob.

Kauj Ruam 2: Txhim Kho Kev Hloov Cov Qauv Hluav Taws Xob

Txhim Kho Hloov Cov Qauv Hluav Taws Xob
Txhim Kho Hloov Cov Qauv Hluav Taws Xob

Raws li koj tuav thiab txuas mus rau qhov hluav taws xob siab (220V) lub zog hauv tsev, ua tib zoo thaiv kab thaiv yog qhov tsim nyog rau txoj haujlwm no!

Thov txheeb xyuas cov ntaub ntawv khoom kom zoo txhawm rau txuas lub zog rau RPI.

Raws li RPI 3 Qauv B xav tau yam tsawg kawg 2.5A PSU (Cov Khoom Siv Hluav Taws Xob) raws li kev pom zoo, Kuv siv 3A mob siab rau hloov pauv lub zog siv.

Tsis tas li los txhawm rau tiv thaiv kev ceeb toom hluav taws xob ntawm RPI, Kuv hloov kho me ntsis qhov hluav taws xob li 5.3V los ntawm kev xa VR ntawm kev hloov pauv lub zog.

Thaum ob lub hard drive sab nraud txuas nrog, feem ntau tso tawm qhov hluav taws xob ntawm kev hloov pauv lub zog tau qis me ntsis thiab qis dua qhov ceeb toom ntawm RPI (Lub suab daj thunder bolt icon) feem ntau pom.

Nyob rau hauv rooj plaub ntawm RPI 3 Qauv B, tag nrho qhov siab tshaj plaws USB txuas ntxiv tam sim no tuaj yeem txhawb nqa txog 1.2A.

Yog li ntawd, tsav ob lub hard disk sab nraud yuav tsis muaj teeb meem.

Tab sis thaum txias thiab lwm yam kev ua haujlwm hauv Circuit Court, lawv yuav kos tsawg kawg li ntau dua 300mA tam sim no.

Yog li ntawd, kuv tab tom siv lub xov tooj tes txuas ntxiv rau lub zog rau lwm lub voj voog thiab FAN.

Raws li RPI qhov tshwj xeeb, ib txwm 500mA tau kos txawm tias nyob hauv qhov system me me.

Vim tias kuv muaj qee qhov teeb meem nrog RPI lub zog ua ntej, xav tias ua kom tiav lub zog sib txuas kab sib cais zoo li qhov kev daws teeb meem meej tshaj plaws.

Kauj Ruam 3: Ua kom tiav RPI Box

Ua kom tiav Basic RPI Box
Ua kom tiav Basic RPI Box

Thaum koj tsis tsim nyog tsis muaj qhov txuas txuas ntxiv, qhov no yog lub thawv RPI uas muaj txhij txhua nrog rau kev siv hluav taws xob sab hauv thiab kev ntsuas kub.

Tab sis raws li kuv tab tom ua cov ntaub ntawv server, sab nraud hard disk yuav raug teeb tsa rau qhov yooj yim RPI lub thawv chassis.

Rau vaj huam sib luag hauv vaj huam sib luag hauv tsev thiab cov khoom siv, feem ntau kuv tab tom siv cov khoom siv acrylic thiab cov hlau txhawb nqa.

Kuv xav tias nws yog txoj hauv kev yooj yim tshaj plaws los sib sau txhua yam rau hauv ib qho kev sib xyaw ua ke zoo li cov qauv.

Kauj Ruam 4: Sib dhos thiab Txhim Kho HDD

Sib dhos thiab Txhim Kho HDD
Sib dhos thiab Txhim Kho HDD

Qhov tseeb thaum txhua yam tau muab tso ua ke thiab muaj tsev nyob rau hauv acrylic chassis, feem ntau kuv tsis xav kom de-dhos nws li cov xov tooj ib txwm ua rau mob taub hau.

Tab sis HDD yuav tsum tau teeb tsa thiab tsau, Kuv tau de-assembled thiab koj tuaj yeem pom yuav ua li cas cov phiajcim hauv Circuit Court tau ntim ua ke hauv cov chassis acrylic.

Acrylic vaj huam sib luag tau txais txiaj ntsig ntawm txheej txheej yooj yim ntxiv los ntawm kev yooj yim sib dhos lwm lub vaj huam sib luag nyob rau sab saum toj ntawm ib qho uas twb muaj lawm.

Vim yog qhov tshwj xeeb no, Kuv siv cov vaj huam sib luag acrylic hauv feem ntau ntawm DIY cov haujlwm.

Kauj ruam 5: HDD Mounting thiab Kho

HDD Mounting thiab Kho
HDD Mounting thiab Kho

Teeb ob txheej uas nyob Seagate HDD ua tiav thiab txuas nrog RPI ntawm USB cable.

Rau kev teeb tsa acrylic vaj huam sib luag ntxiv rau sab saum toj ntawm ib qho uas twb muaj lawm, yuav tsum ua kom khawb 4 qhov uas cov neeg txhawb nqa hlau tau muab tso rau.

Kev teeb tsa qhov chaw yog qhov tsim nyog rau kev sib sau ua ke cov vaj huam sib luag acrylic zoo li tau teeb tsa zoo.

Kauj Ruam 6: Mounting thiab Txuas SSD

Mounting thiab Txuas SSD
Mounting thiab Txuas SSD

Raws li theem kawg ntawm kev sib sau ua haujlwm, SSD tau teeb tsa ntawm lub vaj huam sib luag acrylic ntxiv thiab tsau rau saum txheej thib ob nrog tus txhawb nqa hlau.

Thaum 4 qhov chaw tsis ua haujlwm raug ib leeg rau txhua qhov hauv ib txheej vaj huam sib luag, kev sib dhos ua haujlwm yog qhov nyuaj me ntsis thiab ua tiav cov chassis cov duab ua ib qho tsis zoo.

Kauj ruam 7:

Kauj ruam 8: Txhim kho thiab teeb tsa Samba

Txhim kho thiab teeb tsa Samba
Txhim kho thiab teeb tsa Samba

Raws li kev piav qhia ntau npaum li cas-rau thiab cov lus piav qhia kev muaj ntau nyob hauv ntau lub vev xaib, Kuv yuav tsis piav qhia ntxaws txog Samba nws tus kheej thiab nitty-gritty ntawm kev teeb tsa txheej txheem.

Sau txhua yam thiab tsuas yog hais txog qhov tseem ceeb ntawm Samba kev teeb tsa thiab teeb tsa raws li hauv qab no.

***

-sudo apt nruab samba samba-common-bin (Nruab samba)

- sudo smbpasswd -a pi (Ntxiv pi raws li tus neeg siv Samba)

- sudo vi /etc/samba/smb.con (Ntxig cov ntaub ntawv teeb tsa hauv qab no rau smb.cnf)

***

[pib]

tawm tswv yim = pi sib koom ua ke

txoj kev = /mnt /nashdd

cov neeg siv tau = pi

browseable = yog

guest ok = tsis yog

nyeem nkaus xwb = tsis tau

tsim daim npog qhov ncauj = 0777

***

- sudo /etc/init.d/samba restart (Restart Samba service)

***

Thaum kev teeb tsa thiab teeb tsa ua tiav, koj tuaj yeem teeb tsa RPI phau ntawv "/mnt/nashdd" (qhov tseeb nws yog 500GB ntawm tag nrho cov ntim ntim ntawm Seagate HDD) ua Network tsav raws li qhia hauv daim duab saum toj no.

Samba yog cov cuab yeej muaj txiaj ntsig zoo rau kev rub/rub tawm cov ntaub ntawv los ntawm Windows PC thiab RPI.

Cov duab ntsuas qhov ntsuas kub hauv cov qib hauv qab no yog tsim los ntawm kev luam cov ntawv teev npe hauv RPI rau Windows PC ntawm Samba.

Kauj Ruam 9: Txhim Kho thiab Kho NFS

Txhim Kho thiab Kho NFS
Txhim Kho thiab Kho NFS

Thaum NFS tus thov kev pabcuam sib qhia cov npe, df

-h cov lus txib tso tawm ntawm cov neeg siv khoom qhia tau ntim NFS ntim raws li qhia hauv daim duab saum toj no.

NFS kev teeb tsa thiab teeb tsa yog nyuaj heev dua li ntawm Samba.

Yog li ntawd, kuv yuav tsis piav qhia ntxaws txog yuav ua li cas rau nruab NFS rau server thiab cov neeg siv khoom.

Tsis tas li teeb tsa yuav tsum tau kho ntau cov ntaub ntawv xws li “/etc/fstab”, “/etc/export”, “/etc/hosts.allow” thiab ntxiv rau.

Koj tuaj yeem pom cov ntsiab lus yuav ua li cas-thiab kev piav qhia ntawm cov vev xaib hauv qab no.

***

www.raspberrypi.org/documentation/configur…

***

Kuv siv NFS nquag rau sau cov ntaub ntawv rub tawm los ntawm torrent server yam tsis siv cov lus nyuaj SCP lossis rsync.

Yooj yim koj tuaj yeem cp lossis mv cov ntaub ntawv zoo li lawv tau khaws cia rau hauv qhov chaw disk.

Ib yam li koj tuaj yeem pom hauv qhov kawg "Kev txhim kho ntxiv" theem ntawm zaj dab neeg no, qee qhov kev thov muaj txiaj ntsig ntau dua tuaj yeem ua tau.

Kauj Ruam 10: Kev Tswj Kub

Kev Tswj Kub
Kev Tswj Kub

Kuv tsuas yog xav paub yuav ua li cas txias FAN Circuit tswj CPU kub dhau yuav luag ib hnub.

Yog li kuv tau theej cov ntaub ntawv teev tseg ntawm Samba cov ntaub ntawv sib qhia kev pabcuam thiab ua daim duab nrog MS excel.

Cov txiaj ntsig yog raws li hauv qab no.

- Tom qab ua haujlwm txias FAN Circuit, qhov kub tsis tshaj 50C

- Ntau zaus ntau dua 50C tau pom, tseem kub tau poob tam sim ntawd vim qhov txias ua haujlwm FAN

- NFS sau (txav rub cov vis dis aus rub tawm los ntawm torrent server mus rau NFS server) ua rau lub kaw lus tseem ceeb thauj mus rau NFS server

- Kub nce sai thiab txias tom qab vim yog kev ua haujlwm txias FAN

- NFS nyeem (Ua yeeb yaj kiab video los ntawm NFS server los ntawm cov neeg siv nrog VLC) cov kab ke thauj khoom tsis tseem ceeb npaum li koj tuaj yeem pom tom qab theem ntawm kab

Kauj Ruam 11: Kev Txhim Kho Ntxiv

Kev Txhim Kho Ntxiv
Kev Txhim Kho Ntxiv

Raws li txhua yam khoom siv cuam tshuam txog kev ua haujlwm tau ua tiav, tsis muaj kev hloov kho lossis txhim kho ntxiv rau NFS/Samba file server.

Tab sis NFS neeg rau zaub mov tuaj yeem siv tau raws li ntau tus cwj pwm raws li qhia hauv daim duab saum toj no.

Ntawm ob qhov kev sib tham, sab laug yog NFS server lub vijtsam thiab sab xis yog VLC tus thov kev pabcuam khiav cov neeg siv khoom tshuaj ntsuam.

Cov yeeb yaj kiab ua si tau qhia hauv 5 nti LCD saum lub PC screen.

Raws li kuv tau hais, yam NFS server nkag mus thiab siv tau tsis ua rau neeg rau zaub mov ntau dhau.

Ua tsaug rau koj nyeem zaj dab neeg no kom xaus….

Pom zoo: