NEO2 NAS Part One

NAS BOXThis started off as a simple bit of fun to see if the FriendlyArm NAS box was any good – I had no idea it would turn out to be so much fun..  read on…

My first NAS was the NetGear ReadyNAS duo – some of you may recall this – possibly with mixed feelings – it wasn’t the fastest tool in the box and mine was one of the earlier ones which had the peculiarly stupid “feature” of not turning on until you pressed a button –  how dumb is that?

Well, it didn’t take me long to stick a micro on that so that it would always be on, but ultimately it was slow and disappointing.  I then moved onto a Synology DiskStation and I can’t speak highly enough of that. It has been sitting there for years in a cupboard, through thick and thin without even a battery backup, with a pair of 1TB disks in it running Raid – and the whole thing “just works” – holding all my video media, backups etc and I can access the info from wherever I happen to be – not to mention running MQTT and OwnCloud on it (the latter isn’t very fast but that’s another conversation). Would I trust it with my life? Probably.

So I’ve had a fair experience of these systems. Well, this blog entry isn’t about expensive NAS systems. It’s about a cheap one… really cheap that is – and DIY.

How cheap? Well, about £12 depending on what you have handy. For this price you need a handy 2.5” hard drive, a FriendlyArm NEO or NEO2 and of course the 1-Bay NAS Kit for NanoPi.  Beware that the front panels for NEO and NEO2 are SLIGHTLY different – i.e. the Ethernet connection position varies slightly so these are not cross-compatible without a spot of filing which is why I’m showing you the stock photo!

Anyway… so I plugged my trusty 100GB 2.5” hard drive into the board (well, it was free and was sitting doing nothing), plugged the NEO2 into the board, downloaded the ROM and.. well, that was it really – turned on the power (you need a 12v power supply) and waited. Sure enough the unit appears on my network. I’m cutting a long story short because in the link above, their link to the software is an image – I have suggested that making it a clickable link might be more sensible. Meanwhile they’ve sent this link for all the NEO (not NEO2) Roms.

The comments about the NAS side of things are based on the above ROM but as a result of feedback, they’ve just sent me a newer link – you might want to use this later link I received on 25/05/2017 and if you do THAT you might want to skip to this blog entry  – part 2.

Once you find the address of the unit on your network, you simply plug that into your browser and you’re asked for country name, username (admin) and the default password which is “openmediavault” – you can of course change all of that. No honestly it really is that simple to get started – sadly as you’ll see, not so easy to get finished.

OpenMediaVault

I have to say it looks very pretty and comes ready with users pi and fa. Oh, on the underside of the board is a battery holder – I popped in a battery and so the unit keeps time thought it is also able to get the time from timer servers so I’m not sure what advantage you get from putting a battery in.

Clearly we are not looking at a redundant-supply RAID NAS here but a simple box to store stuff in by a variety of mechanisms which you can see under “services” in the image above.

If you check the link above, you have speed comparisons, the NEO is not so fast, the NEO2 is faster but still not as fast as a Raspberry Pi 3 would be – but not far off and then – it IS cheaper and smaller. So the NEO2 looks like a good idea (see same link above for more info).

So all very simple to put together – indeed it only takes minutes – but how easy is the software to use? I clicked on the Diagnostics dashboard and that showed a list of services running – with what looked like slide switches.

slides

I’m not sure how clever that was as you can’t do anything with them and repeated pressing does nothing but looks like it should. So, off I went to the services section to enable SMB/CIFS- mainly as it had a little “Windows” symbol and I figured this might be the quickest way to make the disk available to my PC. I named that and hit save, only to be told I could not share user home directories as “they are not enabled”. I went off to “users” and enabled home directories.

I tried to enable home directories but that required a “device” and no device showed.

It turned out that the hard disk had not been “mounted” by default – I found THAT physical disks (all very logical really) and told it to mount… and so enough my 100GB disk magically appeared. Back to users.. and shared folders. NOW I could make a shared folder. It turns out that all the stuff I’d originally had on that disk was still there!

I went back to Physical disks and one of the options was “wipe”. I was given the choice of secure or quick – I chose quick.

Not so quick

I figured this must be because I’d mounted the disk.I quickly unmounted the disk under file systems. Back to the physical disk – wipe – quick wipe – this time it worked – so all pretty logical if you have a logical mind – shame about the pathetic error message above.

When wiping the disk – this message came up.

Message

Now of course all of this tech nonsense is nothing to do with FriendlyArm, it is a property of OpenMediaVault – and I do appreciate that this is free software – but come on guys – messages like that – if I wanted to use FDISK I would not be sitting here with a high level storage solution (as it says in the heading).

I assumed that was not really necessary and went back to mounting the disk. This time the option was wiped out but under storage I noted I could CREATE a disk – ok, I’ll bite. I selected SDA – i.e. the big drive and accepted the default EXT4 and gave it a name –“fred”. I was warned this could take some time and proceeded. Another dialog box popped up to say it was creating partitions and formatting the disk. So far, so good. GREAT.

Then followed a protracted period of gobbledegook.

gobblegook

At the end of this…

Bad Gateway

I tried mounting the disk and that worked but it said that out of my 100GB, 60GB was used. I went back and tried again.

THIS TIME the process completed perfectly but when I mounted the disk (which the process had noted was a 111GB disk) it still said that 60GB was used.

I decided to share the root folder in the hope I could see where that 60GB was going.

Now I could add a SBM/CIFS share. In users, I told the system to allow user pi to use the same password as admin.

In windows I noted NAS appear in my network – HURRAY – and it asked for a username and password. I put those in and was presented with NAS – an empty space.

I was kind of expecting to see a shared folder FRED. I checked back at the NAS and sure enough FRED did exist. BACK to the SMB settings I noted a SHARES tab. Nothing in it so I hit + and sure enough I could add FRED. I saved that and went back to my PC.

Sure enough – FRED appeared. Success?

I right clicked FRED and selected “MAP DRIVE” on my PC. Sure enough, now “FRED” appeared as a drive on my PC.

Right click properties revealed it as a 117 GB drive with 79GB used. Inside that I found home directories for FA and PI and a lost and found – but no sign of that missing  disk space. I tried to make a new folder in the root – it would not let me – fair enough. I went to the PI directory. I tried to make a new folder – it would not let me – NOT fair enough.

Back to the OpenMediaVault interface – I could not see anything that was STOPPING me making use of this drive as user PI but I went to shared folders and noted that user pa had permission to do absolutely SQUAT. I added read and write permissions. Back to my drive on the PC.  No difference – user Pi could not do anything.

It then occurred to me that I might have done the map drive bit with my default credentials – I changed that to user PI.

Nope – STILL no ability to create a new folder. The system said this user had read/write ability – the computer said NO. User PI can read/write, group PI can read/write, shared folder can read/write – but computer says no.

I even tried going back to the file system tab in OpenMediaVault and applying a quota to user PI. That produced this subtle message.

Eror message

So in summary…  if you’ve never used as NAS storage system before, this could provide you with hours and hours of fun where you can pretend to be a sysop.  If you have done this before – well, I’d start saving for a DiskStation which a trained monkey could use – life is too short.

As I was finishing the blog, and as if to  show me, ultimately, who was boss – this message appeared. I guess I’ve been told.

I'll show you - it said

At this point you might think the NAS software is not very good – but please bear in mind two things – this was a first release – and I’ve updated this entry to point you to a NEW release – also people have written in to say that actually it can be quite good – so maybe I just got in a little bit too early.

But trust me – not all was lost – not by ANY MEANS – head on offer to part two of this entry where I get a LOT out of the box and the NEO2.

48 thoughts on “NEO2 NAS Part One

  1. Do you know what’s the difference in speed of this NAS between NEO v1.3 and NEO2? I would like to test one, but not sure if I should go with 1.3 or 2 (mainly for NAS, not sure if it will serve anything else).

  2. I have this NAS Kit v1.2, but somehow the internal HDD is not detected. Did you do anything ?

    Did you solder the pin header ? Is it necessary to solder it ?

    1. No, I just put the hard drive in and it appeared as /dev/sda and so then I formatted and mounted it.

  3. WELL – if you were reading this blog entry at the very start you’ll notice it has changed a lot. Firstly – FriendlyArm have updated the ROM – I’m hoping someone gets a chance to test it before me.. and secondly – as you’ll have noticed I’ve mutated this into a general purpose unit which just happens to share a folder – but which is basically Ubuntu in a box with a disk. But of course I’ve started to get to grips with IO and now have an LCD display – but I’ve gutted my original version because FriendlyArm today pointed out that they have already done drivers for a number of devices.

    I took their software (Python) and ran my cheap 128*64 display no problems – as I look into the code, the I2c code is obvious and would be simple to change to other devices – and being interpreted Python – no compiling to do!

    So hit refresh and take a look at the Bakebit links – very interesting. I should have made this a separate blog entry on it’s own – oh, well.

  4. these are the 2 lines for Peter:
    sudo smartctl -a /dev/sda -d sat | grep Load_Cycle_Count | tr -d ” ” | cut -d- -f2
    sudo smartctl -a /dev/sda -d sat | grep UDMA_CRC_Error_Count | tr -d ” ” | cut -d- -f2

    and yes, for monitoring is better smartd.conf, but these where “spot” commands for him to display on his little oled, we can refine if needed

    1. KKaiser – MrShark – thanks for this information – it seems to produce results though I have not idea what the results mean at this point..

      TKaiser – the line you provided (with SUDO added) returns 0

      MrShark – your first line returns 979852 twice – one per line – and your second line returns 0.

      Can someone enlighten me as to what that means so I can make use of it?

      1. 199 is CRC counter: CRC is a primitive checksumming mechanism used by (S)ATA protocol to detect data corruption on the wire. Before sending data a checksum will be calculated and sent along with the data. The other endpoint then again calculates the checksum of data received and if there’s mismatch then data got obviously corrupted, the transaction will be marked as invalid and a retransmit occurs. In an ideal world now the 199 counter will be increased. Unfortunately there are exist drives that expose SMART attribute 199 but never show anything else than 0 here.

        193 is ‘Load Cycle Counter’ and the meaning is somewhat vendor specific. Just google for ‘wd lcc issue’ and you get the idea. Usually WD drives are affected, without tweaks they’re parking/unramping their heads to death. In general I don’t trust drives that exceed 1000000 here regardless what’s written in drive’s datasheet (we find these drives at customers in SOHO NAS boxes all the time and none of them has the necessary fix applied since average users doesn’t know what’s going on and the usual NAS vendors don’t give a sh*t about customers with drives dying too early)

        1. Thank you – all very useful. Well, you’re suggesting 1 million as worst case, one of mine has 139,000 – the other nearer the million (979860) – so that is useful – both drives were dragged out of old laptops….

          I have a third drive lying around that is fairly new – perhaps replacing the one near a million might not be a bad idea?

          1. This should be ‘fixed’ everywhere since it’s rather stupid to allow a disk to park the heads after 8 seconds of inactivity just to unramp heads a few seconds later.

            So you always have to compare at least two SMART attributes: 193 (LCC) and ‘power on hours’ (vendor specific) to get the idea how often that happens and if it’s worth a fix: using wdidle3, idle3ctl or eg. ‘hdparm -B 254 ‘ for Samsung/Seagate disks.

            In an ideal world disk vendors would not ship with stupid defaults (that cause almost no harm when used in a Windows PC but everywhere else and especially in NAS boxes) and NAS solutions would have an eye on such stuff on their own (calculating ramp/unramp per hour and provide a warning to the user if exceeding a certain treshold). But unfortunately the ‘fix’ is also vendor specific (see above, different HDD vendors need different tools to adjust behaviour of their disks)

  5. of course that last part about smartctl can be scheduled to check HD periodically, can be sent via mqtt (with node-red or via command line mqtt tools), can be emailed (with more details, eventually), and can be visualized on your little OLED 🙂

    1. I would check for SMART attributes 199 (CRC errors indicateing bad cabling/connectors) and for 193 (load cycle count, also known as ‘death counter’ for most WD HDD) individually.

      And instead of running smartctl every now and then looking into smartd (who is supposed to check stuff regularly) might be worth a try.

          1. I recall.. this didn’t go too well.

            /dev/sda: Unknown USB bridge [0x152d:0x0578 (0x227)]
            Please specify device type with the -d option.

            1. That’s interesting. Mindee told me they would use JMS567 on the new NAS bay but you’re reporting it’s now JMS578 instead. So you need to add ‘-d sat’ to every smartctl invocation as long as this bridge chip doesn’t get added to drivedb.h (and lazy package maintainers update the respective smartmontools package in Debian and Ubuntu since they removed the update-smart-drivedb script to update the contents).

              So to get attrivute 199 it would be then this for example

              smartctl -d sat -a /dev/sda | awk -F” ” ‘/^199/ {print $10}’

              1. yes, i added that -d sat to the commands for Peter just for that, he reported me errors, gave me the model and i found the correct option, as you see is in every command i gave him

    1. I’m not on commission – and at the start of writing the blog – I was thinking “and I need this for what?” – but at this stage I’m looking around to see if I have any more hard drives:-) So out of stock is bad for me, too! I have sent off for the little 32-pixel high OLED – 2 line job – and I plan to make a slot in the back panel to fit it. Best fun I’ve had at the weekend for a while.

  6. With appropriate settings it will be 5 MB/s more, please see also: http://www.cnx-software.com/2017/05/12/nas-dock-kit-v1-2-gets-support-for-nanopi-neo-2-an-uas-capable-usb-to-sata-bridge-and-an-rtc-battery/#comment-542196

    (it’s always amazing how hardware guys struggle when doing software — at least I pointed out to FE already where to tweak settings in which way so in case they do their OS images in a way that further upgrades also improve settings this might be fixable. But I somehow doubt that).

    Using any of the Raspberries for such use cases is just insane since due to their SoC only having a single USB2 connection performance always sucks and you can not even add a cheap Gigabit Ethernet dongle since performance still sucks. I hope FriendlyELEC comes up with more reasonable shipping costs (or major retailers here in Europe get in touch with german ALLNET to become resellers) since such a NEO2 based NAS is currently the best you get for a few bucks (Orange Pi PC 2 or Prime being the other interesting alternatives, also H5 based on featuring also Gigabit Ethernet and up to 4 real USB2 ports)

    Some performance numbers regarding RPi vs. better suited ARM boards for NAS use case: https://forum.armbian.com/index.php?/topic/3953-preview-generate-omv-images-for-sbc-with-armbian/

    1. Hi TKAISER – I found that conversation heavy going and could not see what needed to be changed – however I DO have that UAS

      |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 480M

      Just can’t quite see what change to make, to take advantage.

      1. This should add the improvements: https://pastebin.com/8AE5sZFz

        Please check later in OMV UI the Samba settings (these are very important!) and please also output from ‘cpufreq-info’ (whether 912 MHz is listed as max cpufreq)

        1. AH.. thanks for that but I notice those settings OMV – I scrapped the OMV installation and went back to Ubuntu core as you’ll see in latest updates. Got the whole thing running on the hard drive – and NOW, at last I have I2c working and hence an OLED display – photo coming up any minute in the blog.

  7. Currently FriendlyELEC’s OMV images are unfortunately missing a few performance tweaks we (Armbian and OMV teams) developed/integrated into official builds for ARM boards (OMV is now ‘yet another build variant’ available through Armbian’s build system).

    Just as a reference (since H3 and H5 boards are yet not supported since I want to wait for mainline Ethernet driver to become stable): http://forum.openmediavault.org/index.php/Thread/17855-Building-OMV-automatically-for-a-bunch-of-different-ARM-dev-boards/?pageNo=1

    1. Well TKaiser – as you’ll see I’ve moved on – now turning that little box into a fully fledged HD based computer..and so of course- sharing files with a PC is trivial anyway…. and I’m getting 34MB/s transfer rate (on a 3GB file) which I don’t think is too bad. Just a shame I can’t find a schematic to know which GPIO bits are left to play with after all of this – I’ll update the blog soon with details. There’s a box to do this with a Raspberry Pi but even including the post, this box from FriendlyArm is cheaper. I’m quiet pleased with this now as it made use of an HD lying around and makes a nice neat little computer with all my usual stuff on it. I do want to add 3.5mm stereo audio connectors but there’s bags of room on the pretty plain back panel for that.

  8. Pete,

    The RTC battery is a fairly big deal when you’re using the unit to provide additional services like “unbound” and “NTP” for your network. There’s a race condition with certain combinations where, at reboot time, if you don’t have a real-time-clock battery, the time on your CPU will initialize to something either semi-random, or the Unix “epoch” time. The result of this is that “unbound”, the DNS service, will do a couple of sanity checks and then fail to start correctly because the time is so far off. This, in turn, means that NTP can’t resolve the “pool” addresses (which we all use for redundancy, nowadays) and so the time can’t be reset to anything sensible. Classic chicken-and-egg stuff.

    I -know- there are workarounds to these issues, but the point is that the RTC battery is the no-brainer, reliable fix, which is missing from pretty much all of the low-end SBCs out there, so it makes this case doubly attractive.

    -John-

    1. Well, now I’ve gone down the route of using this box with Ununtu (I now have the operating system running off the hard drive successfully – will document that later today) it will be necessary to figure out how to access that RTC. Not a lot of docs.

  9. Pity that its $15 postage to the UK on a $12.99 item. I don’t know how products bought through Aliexpress can be posted for free or cheaply but Itead/FriendlyElec are relatively expensive.

    1. Tackle them on it – they seem pretty open to discussion, they’ve made changes at my request – you’re right – $15 is expensive – though bear in mind that MOST of the stuff that AliExpress does free postage on is SMALL. I think the China post is like ours – over a certain size or weight you get stung… Best get a bunch of stuff at once.

      1. last time I tried to buy a load of items the postage racked up alarmingly on a per item basis. If that has changed I could be tempted by some of the stuff you have reviewed NEO2 and NAS drive.

      2. Good suggestion – I contacted them and very quickly they came back with a suggested postage of $13 down from $22 for the NAS and Neo2 combined.

        1. And that proves my point Steve… would RS components “compromise” – no – you’d be lucky to get a response at all. Anyone who reads the blog will know I’ve dealt with many companies over time and in terms of feedback and “making the attempt”, FA take a little beating. When my 0.91″ OLED display turns up I’ll let you know how the panel-filing attempt goes. I like the idea of a low-current status display.

  10. i use OMV on a iomega nas in rack version in 1 of our clients, as standard iomega/lenovo os is not updated anymore… well, those errors just happen, from time to time… data is there, you can always access them via prompt if you know what to do… but some clunkyness of the gui is there in OMV, sometimes is better webmin to do these things, in the end in little boxes like this all you need is create a filesystem, mounting it and sharing some folders…

    1. And that is just what I’ve done – I have the front panel for the NEO not NEO2 so I need to do a little filing but that’s not big deal. So not only does the DISK interface work on the NAS box with standard software, but so does the second USB port that they provide…which is quite nice. There is a serial connector – and an I2c connector and of course the RTC – I’m sure it would not take a rocket scientist to figure out how to make use of those too – so all in all I’m happy.

      I would like to share some files but I think the first thing is to get the databases and logs off the SD and onto that hard drive. Mind you, I’m showing a lot of faith in hard drives here – that one came off an old laptop so this has been a very cheap project.

      1. I have been running OMV for about a year now with a 1TB drive. Like yours, my setup experience was long and frustrating but ultimately I succeeded. I use it to store videos from my security cameras as well as backup files for important docs. If I need to do another I will first look for an alternate solution. If none is found, back to OMV.

        1. Ultimately I’m glad I went through this – because what I have now – is the best of two worlds – I have a shareable drive (well I will when I remember how to do this at powerup) and as nice machine in a cool box with 12v power I can run off my solar setup.

          1. let’s say your device is /dev/sda1 and is formatted ext4, this is the line to add to you /etc/fstab to have it automatically mounted on boot, let’s say as /opt/share
            /dev/sda1 /opt/share ext4 defaults 0 0

            be sure to create /opt/share before, of course…

            if you want to move /var completely in that disk, then mount that on a temporary dir, copy all /var content in there, then modify the above line changing /opt/share to /var, and reboot

            to copy stuff in there, use rsync:
            sudo rsync -a –progress /source-folder /dest-folder

            (same command can be used to update dest-folder with files changed in source-folder, with new files added, updated files overwritten, deleted files in source folder leaved untouched in dest-folder, as a backup… if you want a full synch, with actual removal of dest files in case they’re deleted in source (danger!!!), there are other options… i prefer this way, a “backup” behaviour…

            some will say to empty the original /var before rebooting, i prefer to leave it there… so if i detach the external drive, i still have a valid /var underneath which let me boot my device…

            starting talking about backups, you can use a script like this to have 7 days of backups of a folder, for example…

            create a script /etc/cron.daily/backup ( and chmod 755 it):
            #!/bin/bash
            rsync -a –progress /folder-to-backup /opt/backup/$(date +”%u”)

            that last part will return day of week as a one single number, 1 for monday, 7 for sunday… you have to create those folders, of course…

          2. these instructions are for rpi but should work on every sbc, if you leave the /boot on sdcard… on rpi3 you can even boot completely from usb, i detailed the steps in a previous comment, about a month ago

            https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177

            more details in adafruit site, they did an automatic script, too, but don’t use it on other sbc, read only what they did, at the end of the article… same stuff you’ve found in previous link, though…
            https://learn.adafruit.com/external-drive-as-raspberry-pi-root?view=all

            1. this is the guide i followed to boot my rpi3 completely from usb…
              this should be done only the first time, to enable usb boot:
              https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

              then this are the steps to copy all of a working system to usb and boot from there, no sd card needed anymore:
              http://www.makeuseof.com/tag/make-raspberry-pi-3-boot-usb/

              for other sbc, which cannot boot directly from usb but need an sdcard with the /boot partition in there (it’s the fat32 partition you can access from windows, too, if you connect the sdcard to a windows pc), you should skip the part about the boot/fat32 part and create a full ext4 filesystem on the usb device…

              then use those commands to create temporary folders and use rsync to copy all to the new partition and generate new ssh keys (don’t understand why, but…), and finally change the line to the root filesystem in the cmdline.txt or whatever is called in your distro (it’s a text file in your /boot fat32 folder, you have to change your mmcblk0p2 or whatever you find there with sda1 or which is the partition on you usb device)…

              before doing any mod, make a backup copy of this file, if something goes wrong you can restore the file and boot safely from the sdcard and restart or check what’s wrong… as said, it’s a text file and this partition is accessible if you put the sdcard in a win pc, so easy mod… the copy process is pretty straightforward and should not be needed to be repeated, what can be wrong is the device name, so a bit of trial and your done

        2. OMV is just an interface to prompt commands… what Peter received in those weird messages is the output of these commands… so nothing that can’t be done manually, if you know how to, and nothing that can’t work once omv decide to work properly itself… after it configured everything, it does nothing else…

          1. That build of OMV seems rather rough. Having worked for a company that used a heavily customised version of OMV on a commercial 12-bay NAS (and who contributed code back to the OMV project), I’ve not seen such a rough setup experience.

            I used to provide ‘Enterprise Support’ for the unit and it was widely used for post production, non-linear editing and CGI rendering due to its ease of setup, reliability and high performance; the last customer I worked with did post-production work for the BBC amongst others and they loved the systems.

            I think someone ‘knife-and-forked’ the code to get it running on that platform and the results need a little polishing.

            1. Hi Linker3000 – you’ll see there is an update to the blog – they just put out a new ROM in response… I’ve not had a chance to look at it yet.

Comments are closed.