PlexPi NAS Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
equusgrevyi

PlexPi NAS

Post by equusgrevyi »

Hello all!

My first post so I thought I'd introduce myself with who I am, how I came across DietPi etc etc.

I'm currently a student in London and I came across DietPi after spending endless hours upon hours of researching how best to implement a networked DLNA server for streaming archived CDs as FLAC files.

I decided a Pi 3 and some external storage was best, at least I have control over the updates vs some OEM NAS solution! I chose DietPi after seeing how well optimised it was for the Pi 3 vs Raspbian and other distros lack of completeness. Everything you need is on-hand through dietpi-config or dietpi-software = :D

I arrived at using Plex Media Server after some testing as although minidlna does the job, it didn't do it quite the way I was hoping! DietPi's shortened + simplified Samba config has made it a ton easier to get this project going.


NAS Specs:
- Pi 3 Model B
- ORICO 9528U3 2 Bay USB 3.0 SATA HDD Enclosure (NOT the RAID version)
- 2 x 2TB Seagate Ironwolf NAS HDDs (set up to BTRFS RAID-1)
- Ethernet connection
- Some kind of router

So far I have disabled root SSH access, enabled FirewallD, enabled Fail2Ban (with an appropriate ban time) and set DietPi to safe overclock levels in the config. If anyone has suggestions on further security/optimisations for this setup I'd love to hear them :)

Hope you enjoyed the read!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: PlexPi NAS

Post by Fourdee »

equusgrevyi wrote:Hello all!

My first post so I thought I'd introduce myself with who I am, how I came across DietPi etc etc.

I'm currently a student in London and I came across DietPi after spending endless hours upon hours of researching how best to implement a networked DLNA server for streaming archived CDs as FLAC files.



Hope you enjoyed the read!
Hi,

Thanks for the feedback :)

Welcome aboard, and apologies for the "I thought you was a spambot" during signup lol :)
So far I have disabled root SSH access, enabled FirewallD, enabled Fail2Ban (with an appropriate ban time) If anyone has suggestions on further security/optimisations for this setup I'd love to hear them :)
Ok, yep, so the main one (if not done already) is change the root password from the default dietpi.
Optimization wise, that is was DietPi is and does automatically during installs specific to your device. Its also extremely lightweight by default, only what you need is installed #lightweightjustice ;)
and set DietPi to safe overclock levels in the config.
For the RPi 3, I wouldnt recommend overclocking due to heat (set to none). Safe should only be visible for RPi 1/Zero devices, can you confirm the following is displayed on your RPi 3?
dietpi-config > performance options > overclocking
Untitled.png
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
equusgrevyi

Re: PlexPi NAS

Post by equusgrevyi »

Hi Fourdee,

No problem re: the spambot situation :lol:

I would check the overclock for you, but Plex decided to update yesterday and since I rebooted it the Pi has been going into Emergency Mode and apparently cannot find any of the DietPi scripts to execute (e.g. I tried to load dietpi-config to change the overclock settings and got a message about it not being found). I suspect this is related to the overclock as something like this happened before but I did not check the HDMI out, just made a new SD and set that up.

I tried to look into the systemctl logs as it suggested but nothing obvious jumped out...I suspect perhaps the Kingston SD card I'm using is duff...
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: PlexPi NAS

Post by Fourdee »

equusgrevyi wrote:Hi Fourdee,

No problem re: the spambot situation :lol:

I would check the overclock for you, but Plex decided to update yesterday and since I rebooted it the Pi has been going into Emergency Mode and apparently cannot find any of the DietPi scripts to execute (e.g. I tried to load dietpi-config to change the overclock settings and got a message about it not being found). I suspect this is related to the overclock as something like this happened before but I did not check the HDMI out, just made a new SD and set that up.

I tried to look into the systemctl logs as it suggested but nothing obvious jumped out...I suspect perhaps the Kingston SD card I'm using is duff...
Yep, overclocking and SD card could be a factor.

Just to be on the safe side, might be worth running a full format on the SD card, prior to image write:
https://github.com/Fourdee/DietPi/issue ... -283030267

Are you using 5v/2.5A official RPi PSU?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
equusgrevyi

Re: PlexPi NAS

Post by equusgrevyi »

Yep it's an official PSU as I got it from part of a kit, the box was labelled element14 :P

I've done a full format on the SD card we'll see what it does then. I'll also refrain from overclocking it this time.

I looked through systemctl. fsck seemed to think something was up but this wasn't the point at which boot failed as it proceeded to try to mount my external drives (which it couldn't because the weren't plugged in for safety).
[system-fsck[252]: 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
" ": Automatically removing dirty bit.
" ": Performing changes.
" ": /dev/mmcblk0p1: 231 files, 11278/32138 clusters.
The part where it failed and began to enter emergency mode reads like this.
system[292]: Failed at step EXEC spawning /bin/Plymouth: No such file or directory
subject: Process /bin/Plymouth could not be executed
Defined-By: systemd

The process /bin/Plymouth could not be executed and failed.
The error number returned while executing this process is 2.
Can't give you any further diagnostics I'm afraid since I've now wiped the card!

EDIT: After checking, my DietPi Overclock settings do not look as suggested. I suspect this is down to running rpi-update to get the 4.9 kernel branch. My config OC options look like the attached screenshot.
Attachments
overclock.JPG
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: PlexPi NAS

Post by k-plan »

equusgrevyi wrote:EDIT: After checking, my DietPi Overclock settings do not look as suggested.
Hmmm.. can you please run

Code: Select all

/DietPi/dietpi/misc/rpi_boardinfo
and
cat /proc/cpuinfo | grep 'Revision'
If you could paste the following results, i'd be grateful.

Thanks
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
equusgrevyi

Re: PlexPi NAS

Post by equusgrevyi »

k-plan wrote:
equusgrevyi wrote:EDIT: After checking, my DietPi Overclock settings do not look as suggested.
Hmmm.. can you please run

Code: Select all

/DietPi/dietpi/misc/rpi_boardinfo
and
cat /proc/cpuinfo | grep 'Revision'
If you could paste the following results, i'd be grateful.

Thanks
Here you go! (Also if you can tell me how to embed the images within my posts that would be useful to know :) )
Attachments
Overclock2.JPG
Post Reply