Raspberry Pi NFS and Samba File Server
Introduction: Raspberry Pi NFS and Samba File Server
This project is the final stage of outcome which integrating two previously made and posted circuits.
***
1. Raspberry Pi CPU Temperature Indicator - Published Nov 20th, 2020
https://www.instructables.com/Raspberry-Pi-CPU-Tem...
2. Raspberry Pi Box of Cooling FAN With CPU Temperature Indicator - Published Nov 21st, 2020
https://www.instructables.com/Raspberry-Pi-Box-of-...
***
Originally I planned to make file server which can share files among RPI (Raspberry Pi), Windows PC and other Linux servers.
To avoid inconvenience of copy something to USB from source machine and re-copying everything to target machine again, RPI based Samba and NFS server can be utilized as file server.
Although scp or rsync command can be utilized between Linux machines (e.g. Ubuntu and Raspberry pi OS servers), using common file handling command such as cp and mv is much more convenient.
Therefore, RPI file server shown in the picture above is made.
This server can support the following functionalities.
- SSD (SanDisk, black one in the picture above) support NFS for file sharing between Linux servers
- HDD (Seagate, white one) support Samba for sharing files between my Windows PC and RPI
- Internal dedicated RPI power supply (5V 3A) is used
- RPI CPU temperature indicator (4 temperature levels) is integrated
- Cooling FAN automatically activating when temperature is higher than 50C
***
Let’s look more detail how file server is assembled and configured.
Step 1: File Server Design and Components
As file server is constructed by assembling circuit boards and other components such as HDD, SSD, switch power module and so on, I’m only showing overall structural diagram.
Regarding circuit details of cooling FAN and CPU temperature indicator, please refer previously posted contents of the projects.
I’ll explain only newly added components to make file server.
- Seagate HDD is 2.5” DATA disk which I bought quite long time ago (maybe 10 more years) and it including SATA to USB interface adaptor (Metallic chassis is removed)
- SanDisk SSD is interfaced with purchased SATA to USB3.0 adaptor which I bought from internet store (You can search this item by name of “SATA to USB cable”)
- Small 15W AC-DC switching power supply (Mean Well RS-15-5)
- Acrylic chassis (Transparent panel size is 15cm(W) x 10cm(H) x 5mm(D) x 1, 15cm(W) x 10cm(H) x 3mm(D) x 3
- Metal supporter 7cm (3.5mm) x 4, 4cm (3.5mm) x 4, 3.5cm(3.5mm) x 4
- Bolts and nuts
***
Except above new components, all other items are reused as outputs of previous projects including PCB boards, connectors and cables.
Step 2: Installing Switching Power Module
As you handling and connect to high voltage (220V) house power, careful wiring is absolutely necessary for this work!
Please check product documentation carefully to connect power module to RPI.
As RPI 3 Model B requires minimum 2.5A PSU (Power Supply Unit) as recommendation, I using 3A dedicated switching power supply.
Also to prevent under voltage warning of RPI, I’m slightly adjust output voltage as 5.3V by turning VR of switching power module.
When two external hard disks are attached, usually output voltage of switching power is slightly decreased and the under voltage warning of RPI (Yellow thunder bolt icon) is often observed.
In case of RPI 3 Model B, maximum total USB peripheral current draw can be supported up to 1.2A.
Therefore, driving two external hard disks will not be problem.
But when cooling and other circuits are operating, they will draw at least about more than 300mA current.
Therefore, I’m using additional hand-phone charger for powering other circuits and FAN.
According to the RPI specification, normally 500mA is drawn even in mild system load.
Because I had some troubles with RPI power before, supposedly complete power supply line separation seems the clearest solution.
Step 3: Completing Basic RPI Box
When you are not necessary no additional peripherals connection, this is the completely equipped RPI box including internal power supply and temperature regulation.
But as I’m making file server, external hard disk will be mounted to this basic RPI box chassis. 33