Pi File – The RPI as a NAS

Forumite Members General Topics Tech Makers & Builders Raspberry Pi Pi File – The RPI as a NAS

Tagged: 

Viewing 20 posts - 1 through 20 (of 26 total)
  • Author
    Posts
  • #19679
    Dave RiceDave Rice
    Participant
      @ricedg
      Forumite Points: 7

      Having a bit of time on my hands and a spare RPi I have been going a bit mad ? PiHole has been a great success and I have also created a web enabled controller for my Ubiquiti kit. That should save me some money on the AWS server (although it isn’t much).

      Anyway, I visited a retired mate of mine and he really could do with some NAS to replace the multiple USB drives he backs up to but even a basic Synology takes some thinking about money wise. So I started thinking, what about attaching one of his USB drives to an RPi instead? So the whole thing snowballed and I started doing some serious testing using an RPI B wired and wireless, a 1 bay DS112j on Gigabit and a 2 bay DS216j on Gigabit. Clients were a desktop on N300, a laptop on AC433 and a desktop on Gigabit. The same 2.5″ 5,400 rpm USB drive was used throughout and the NAS both have the same Toshiba P300 3TB drives. The 2 bay is RAID 1.

      This is what I came up with:

      The first thing that struck me was how much quicker the 2 bay is than the 1 bay. The next thing was how crap the Pi wireless is and N300 whilst better is no great shakes. If you only have N300 a Synology NAS is basically going to waste as just a file server, but of course you can do so many things with it.

      With the PI on it’s 100 mbps Ethernet both the Gigabit and AC433 maxed out the connection. On the Synologys they appear to have maxed out the USB drive. The new Pi 3B+ has 300m Ethernet and AC wireless. Extrapolating these figures out (dangerous I know) I reckon it will achieve mid 30’s MB/s the same as the Synology as the USB and connection will bottleneck at about the same time.

      To me that make a Pi 3B+ very viable indeed as not only a file server but also a PiHole and UniFi server and probably a million and one other things that don’t require loads of CPU time.

      All these benchmarks don’t of course tell the full tale. Yes in real life the Pi on wireless does seem sluggish, but if you’re only transferring a few files the 100 mbps connection is very usable indeed. Where all this really matters is when you are doing things like transferring big files (like videos) or backing up whole machines, it’s then that the Synology kit earns it’s keep. However I have small businesses that are doing a weekly archive of their Synologys to my server through the internet, which is 10 mbps at best even on fibre. The first backup takes hours and hours, the weekly incremental ones are a matter of minutes. So if you use proper backup software, like ToDo, EaseUs etc.  once you’re over the pain of making the first one it’s all downhill.

      The guide I used to set up Samba is here It’s not quite correct and you have to umount your USB drive first (Raspian will mount them automatically when you plug them in). The default samba.conf file didn’t look quite like their’s but was easy to spot the difference and the bits you add to the end are the same.

      EDIT – yes some of the results seem inconsistent, but the author of the testing software makes no bones about it being super accurate. It is accurate enough however to see what’s going on to the extent we need to.

      #19681
      RSBRSB
      Keymaster
        @bdthree
        Forumite Points: 5,183

        Would of made a nice blog post!

        Americans: Over Sexed, Over Payed and Over here, Wat Wat!

        #19682
        Dave RiceDave Rice
        Participant
          @ricedg
          Forumite Points: 7

          I might even do that. Could be one for the business Facebook page, or even LinkedIn.

          #19683
          RSBRSB
          Keymaster
            @bdthree
            Forumite Points: 5,183

            Americans: Over Sexed, Over Payed and Over here, Wat Wat!

            #19684
            Dave RiceDave Rice
            Participant
              @ricedg
              Forumite Points: 7

              Doh!

              #19685
              JayCeeDeeJayCeeDee
              Participant
                @jayceedee
                Forumite Points: 230

                Or even an article in a Pi mag??

                #19687
                Dave RiceDave Rice
                Participant
                  @ricedg
                  Forumite Points: 7

                  It’s a blog on here and LinkedIn now.

                  #19691
                  RSBRSB
                  Keymaster
                    @bdthree
                    Forumite Points: 5,183

                    Good one @ricedg . The forum software should of told me that you had made a blog post and to review it but it did not so I’ll look into.

                    I keep saying blog post but in fact what members have here is there own blogging platform under there name.

                    Americans: Over Sexed, Over Payed and Over here, Wat Wat!

                    #19693
                    Ed PEd P
                    Participant
                      @edps
                      Forumite Points: 39

                      I agree with your comment about Pi3+ and possible NAS usage but I hope that your blog will also include a direct boot from SSD. You really do not want any swap files trying to access the SD card as such cards have both a relatively short cycle life as well as being quite vulnerable to power outages, or crash shutdowns.

                      I also suspect that swappiness may be something worth investigating for NAS usage.  Bruce did quite a thorough investigation of its impacts when he was looking at running Linux from a usb. The swappiness can make a substantial performance difference, but depends on how much concurrency is taking place. (I think you may even need to INCREASE it for a lot of concurrent NAS usage, whereas for single person use it can be close to zero.)

                      #19695
                      The DukeThe Duke
                      Participant
                        @sgb101
                        Forumite Points: 5

                        Dave youre making my pi nes look dumb! Good work.

                        I’m going to swap my pi 2 in to pi hole action, and put Thr pi 3 into nes action. I just received a nes pi case of eBay for £14 and it’s brilliant.

                        https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F183096189173

                        #19698
                        Ed PEd P
                        Participant
                          @edps
                          Forumite Points: 39

                          Thanks for the link – it raises a lot of other possibilities and I may well use one for my school’s demo. (not as a NAS!)

                          #19700
                          The DukeThe Duke
                          Participant
                            @sgb101
                            Forumite Points: 5

                            Lol, I reckon a nes will go down better in the classroom than a Nas. No offence Dave.

                            Would be a good tool to get them in to 8bit programing with somthing like Scratch (think that’s its name), as all Mario is is sprites. You could build an approximation of Mario very easily with scratch.

                            If it lights a fire in one kid, it’s worth the effort.

                            #19701
                            Dave RiceDave Rice
                            Participant
                              @ricedg
                              Forumite Points: 7

                              Ed, it looks like booting with no SD card is a nightmare, but having just the basic bootstrap on the SD that immediately hands off to an external drive seems doable.

                              I don’t really want two external drives and an SSD will be too small for storage so I’m going to investigate partitioning a larger spinner. The alternative is a £20 mSATA SSD USB Adapter Board and a cheap old style mSATA drive from EBay as the boot device. It looks like a 2A power supply is enough for the mSATA and Pi combo. Instructions to do all the setups here

                              This will have to wait for funds though. Loads of quotes out there but everyone seems to be holding their breath waiting for something. I wish I knew what it was. The jobs aren’t going to competitors, they’re just not getting commissioned.

                              #19704
                              Ed PEd P
                              Participant
                                @edps
                                Forumite Points: 39

                                Steve, I don’t even need to do any programming as Minecraft is already part of the Pi package. I understand that Minecraft is actually used as a teaching aid in many schools so I may throw in a script with an ‘instant’ log cabin or one of the examples here.

                                The P in EdP stands for Plagiarism as I do a lot of it in my programming!

                                #19707
                                The DukeThe Duke
                                Participant
                                  @sgb101
                                  Forumite Points: 5

                                  Yes the Minecraft education ed programing is basically scratch. You just drag and drop small commands and link them together. It’s almost identical.

                                  You can make chickens poop eggs that are on fire. What 10 year old isn’t going to love that. Lol.

                                  #19709
                                  The DukeThe Duke
                                  Participant
                                    @sgb101
                                    Forumite Points: 5

                                    I love that book ed, I love it’s done by a kid. Even though his grammar is way better them mine,bit I won’t hold it against him.

                                    I love seeing kids with passion for something. Especially something that I’m interested in.

                                     

                                    Apologies to Dave for highjacking the thread, I have issues, lol. I’ll now now out and let you get back to NAS stuff.

                                    #19713
                                    Ed PEd P
                                    Participant
                                      @edps
                                      Forumite Points: 39

                                      Dave it is not as hard as it looks, but using a SD->HDD handoff is trivial. I guess the really important part for a NAS is the location of the swap file, and the other files of course.

                                      #19727
                                      Ed PEd P
                                      Participant
                                        @edps
                                        Forumite Points: 39

                                        Further my previous note, I was trying to figure out why you were finding USB boot hard. The only thought I had was that maybe you had an early crib sheet. This link gives what I think is a simple set-up.

                                        If you read through the 21 pages of this thread you will hit this nugget of info:

                                        “… The only change I know about is that the Pi3B+ is set up to boot from USB (or PxE) by default. I got a Pi3B+ yesterday and within 5 minutes of opening the package, I had it booted from a PiDrive by swapping it in to replace a Pi3B. No muss, no fuss.

                                        (And is response to some non-current, but still moderately recent posts…the Pi2Bv1.2 should be able to have the OTP bit set and boot from USB. The ability is a feature of the ‘2837 SoC and is therefore, board independent. …)

                                        My only thought of difficulties applies to Pi2s or PiZero that have different chipsets and also ‘pickey’ usb drives. There the boot from SD with kernel on usb drive is the best route, and very simple to do, but I’ll post something on this later as I have to go out.

                                        #19728
                                        Dave RiceDave Rice
                                        Participant
                                          @ricedg
                                          Forumite Points: 7

                                          I don’t have a 3B+

                                          #19730
                                          Ed PEd P
                                          Participant
                                            @edps
                                            Forumite Points: 39

                                            No but if you are setting something up for a third party then I’d recommend the 3B+ for that reason as well as a marginally faster wifi/ethernet.

                                          Viewing 20 posts - 1 through 20 (of 26 total)
                                          • You must be logged in to reply to this topic.