User Tools

Site Tools


doc:appunti:hardware:raspberrypi_nas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:appunti:hardware:raspberrypi_nas [2021/03/20 16:57] – [Home Mediacenter and NAS with the Raspberry Pi] niccolodoc:appunti:hardware:raspberrypi_nas [2021/03/22 10:34] – [Home Mediacenter and NAS with the Raspberry Pi] niccolo
Line 1: Line 1:
 ====== Home Mediacenter and NAS with the Raspberry Pi ====== ====== Home Mediacenter and NAS with the Raspberry Pi ======
  
-This is my recipe to build a mediacenter and NAS box using the Raspberry Pi. This is the list of components:+This is my recipe to build a **[[wp>Home_theater_PC|mediacenter]]** and **[[wp>Network-attached_storage|NAS]]** box using the **[[wp>Raspberry_Pi|Raspberry Pi]]**. This is the list of hardware components:
  
-  * Raspberry Pi 4. +  * **Raspberry Pi** 4 Model B with Gb RAM
-  * Seagate IronWolf 3.5 inch Hard disk, 4 Tb+  * 4 Tb **hard disk** Seagate IronWolf 3.5 inches
-  * Suptronics.com X835 exapnsion board to connect SATA drives+  * **Suptronics.com X835** USB to SATA adapter, to connect the hard disk
-  * USB audio adapter Ugreen.+  * Ugreen **USB audio** adapter
 +  * **Gamepad** USB wireless (SNES-like) used as remote control.
  
 {{.:raspberrypi:rpi-nas-mediacenter.png?640|Raspberry Pi NAS and mediacenter}} {{.:raspberrypi:rpi-nas-mediacenter.png?640|Raspberry Pi NAS and mediacenter}}
 +
 +{{.:raspberrypi:wifi-forbidden.png?90 |WiFi Warning}}
 +**WARNING** :!: I cannot recommend this solution at all! It turned out that the Raspberry Pi, when it uses the **USB 3** interface, produces **radio interferences on the 2.4 GHz** band. It is **impossibile to connect to the 2.4 GHz WiFi** access point which is only 5 meters far. It was also **impossible to use a wireless keyboard and mouse**, using one USB dongle which also operates on the 2.4 GHz. To operate a **wireless gamepad** (which also uses an USB dongle on the 2.4 GHz frequencies) I had to distantiate the dongle from the Raspberry Pi using and USB **extension cable of about 0.5 meters**.
 +
 +Due this **severe problem**, I can suggest this solution only if you will use the **Ethernet** interface or an access point on the **5 Ghz** band. As an alternative to the wireless gamepad or keyboard, you can use the **[[https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree|Yatse application]]** on an Android smartphone.
 +
  
 ====== Subsystems ====== ====== Subsystems ======
Line 18: Line 25:
   * **[[raspberrypi_nas_audio]]**   * **[[raspberrypi_nas_audio]]**
   * **[[raspberrypi_nas_mail]]**   * **[[raspberrypi_nas_mail]]**
 +  * **[[raspberrypi_nas_remote_control]]**
   * **[[raspberrypi_nas_case]]**   * **[[raspberrypi_nas_case]]**
- 
-===== Mail system ===== 
- 
-I want a working **mail system** on the NAS, mainly because I want to eventually receive error messages from the various subsystems, think e.g. at the **smartd** daemon watching for S.M.A.R.T. hard drive errors... 
- 
-In the following examples **pimedianas** is the hostname of my Raspberry Pi Mediacenter NAS. I istalled the **postfix** package and configured it as **satellite system** using a **SMTP relay host**. The relevant settings in **/etc/postfix/main.cf** are: 
- 
-<file> 
-myhostname = pimedianas 
-mydestination = $myhostname, localhost.localdomain, localhost 
-relayhost = mail.example.org:587 
-default_transport = smtp 
-relay_transport = smtp 
-myorigin = $myhostname 
-# Rewrite some sender addresses. 
-sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps 
-# Relay host requires SASL authentication. 
-smtp_sasl_auth_enable = yes 
-smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 
-smtp_sasl_mechanism_filter = plain, login 
-smtp_sasl_security_options = 
-smtp_tls_security_level = may 
-</file> 
- 
-The content of **/etc/postfix/sender_canonical_maps** will force the **MAIL FROM** on locally generated mails: 
- 
-<file> 
-root                       pimedianas@example.org 
-root@pimedianas            pimedianas@example.org 
-root@localhost             pimedianas@example.org 
-root@localhost.localdomain pimedianas@example.org 
-</file> 
- 
-Write the proper info about **localhost** in **/etc/hosts**: 
- 
-<file> 
-127.0.1.1  localhost.localdomain   localhost 
-</file> 
- 
-Finally I had to put my **SMTP credentials** required by the relaying server into **/etc/postfix/sasl_passwd**: 
- 
-<file> 
-mail.example.org pimedianas:MyVerySecretPwd 
-</file> 
- 
-Last but not least, I redirected all the mail for root to my real email address in **/etc/aliases**: 
- 
-<file> 
-root:   niccolo@example.org 
-</file> 
- 
-Remember to compile all the files and restart the service: 
- 
-<code> 
-postmap /etc/postfix/sasl_passwd 
-postmap /etc/postfix/sender_canonical_maps 
-newaliases 
-systemctl restart postfix.service 
-</code> 
- 
-Now all the locally generated mails addressed to **root**, **%%root@pimedianas%%**, **%%root@localhost%%** or **%%root@localhost.localdomain%%** should have the **MAIL FROM** rewritten as above and forwarded to the external mailbox. 
- 
  
  
doc/appunti/hardware/raspberrypi_nas.txt · Last modified: 2021/04/02 15:47 by niccolo