Hybrid NAS/DAS - any suggestions?

  • Hello. I'd like to ask if anyone can suggest a practical hybrid NAS/DAS device.


    I am looking for something that can be attached, at the same time ( and this is critical :(

    • to a Windows PC over USB and be "visible" as a Media Transfer Protocol device and
    • to a LAN over Ethernet


    I guess Media Transfer Protocol is required as it does not require exclusive access to the storage device the way UMS ( USB Mass Storage ) does and, since the connected host will be a Windows PC, support for MTP should not be much of an issue.


    I have found a couple of commercial offerings but apparently there are various caveats like not been able to use both USB/Ethernet at the same time ( i.e. you have to pre-select the "mode" of operation ), the need to use some proprietary software to connect over USB, the need to "re-attach" the device to the PC after each reboot etc.


    Ideally, I'd prefer a commercial product but running open-source software that can be hardened, to protect the attached PC, and tweaked if necessary. Speed/capacity is not really important. The objective is to transfer configuration files ( Ethernet -> NAS/DAS -> USB ) to said Windows PC that, for security reasons, cannot be connected to a LAN directly.


    TIA

  • The objective is to transfer configuration files ( Ethernet -> NAS/DAS -> USB ) to said Windows PC that, for security reasons, cannot be connected to a LAN directly.

    Not going into details... we're using for similar stuff NanoPi NEO connected to one of the host's USB3 ports with a Micro USB cable (both powering the NanoPi and establishing the Mass Storage mode via USB gadget kernel driver on the OTG port after transmission of stuff has finished through the network). A web search for 'otg mass storage site:armbian.com' might be sufficient to get the idea.

    • Offizieller Beitrag

    I'd prefer a commercial product

    Why? Most commercial storage devices use Linux too. They are magically more safe than an open source project. Actually, they are probably worse because there is a much longer delay when patches are applied (if ever).


    The objective is to transfer configuration files ( Ethernet -> NAS/DAS -> USB ) to said Windows PC that, for security reasons, cannot be connected to a LAN directly.

    Does it have to be USB? I didn't understand the MTP stuff. While I know it can probably be done, I wouldn't even know where to begin to get a linux box to act like a mass storage device. But, you could add a second network adapter to the Windows PC and connect (even without a switch) directory to the OMV box.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I wouldn't even know where to begin to get a linux box to act like a mass storage device.

    Any device with an OTG USB port able to run Linux can do. But since here exists a 'security policy' not allowing the Windows PC in question to be attached to a network it should be noted that using the very same mechanism every Linux box can also appear to an USB connected Windows box as 'USB Ethernet/RNDIS gadget' just by switching driver options on the Linux box. So with bridging enabled on the Linux box the 'no network connection' policy is anulled.


    That's why a commercial product is required since security by obscurity works best with closed sources :)

  • Not going into details... we're using for similar stuff NanoPi NEO connected to one of the host's USB3 ports with a Micro USB cable (both powering the NanoPi and establishing the Mass Storage mode via USB gadget kernel driver on the OTG port after transmission of stuff has finished through the network). A web search for 'otg mass storage site:armbian.com' might be sufficient to get the idea.

    Thanks tkaiser. Before asking here I had contacted FriendlyElec to ask if that setup was possible with their '1-bay NAS Kit v1.2' hosting a NanoPi NEO/NEO2 and their technical support answered that it was "Unable to connect to PC" though I might have not phrased the question right or they meant "not out of the box".



    Obviously, I wouldn't mind more details or a howto but I guess you can't go into more detail. What you posted above is much help already.

  • Why? Most commercial storage devices use Linux too. They are magically more safe than an open source project. Actually, they are probably worse because there is a much longer delay when patches are applied (if ever).

    Does it have to be USB? I didn't understand the MTP stuff. While I know it can probably be done, I wouldn't even know where to begin to get a linux box to act like a mass storage device. But, you could add a second network adapter to the Windows PC and connect (even without a switch) directory to the OMV box.

    Commercial product = might be around for some time, have support and not look crude. I understand that nothing of that is guaranteed but having these advantages would be a plus. To better describe what I'd like, it is some presentable hardware running Linux/BSD/something that can be made to fit my needs. The NanoPi NEO with Armbian that tkaiser suggested, hosted in the NAS enclosure of the manufacturer, probably fits that description.

  • NanoPi NEO with Armbian that tkaiser suggested, hosted in the NAS enclosure of the manufacturer, probably fits that description.

    You just need a minor enclosure modification (small drilled hole) for the Micro USB cable since otherwise the OTG port is not accessible since inside the NAS thingie (but I wonder for what you need the NAS enclosure anyway since Micro SD cards these days are affordable even with 128GB)


    IMO this won't solve the real problem: there's someone thinking about security, wants to implement the 'air gap' principle for this specific Windows host and you're thinking about undermining this. As already written: it's pretty easy to let such a SBC not appear as USB mass storage device but as an USB network dongle instead bridging its own Ethernet connection. So by definition this is not an 'air gap' anymore later unless you totally own the SBC device (though I've heard installation of the needed RNDIS drivers seems to be PITA on Windows -- no idea, I lack the time to use Windows on Desktop)

  • You just need a minor enclosure modification (small drilled hole) for the Micro USB cable since otherwise the OTG port is not accessible since inside the NAS thingie (but I wonder for what you need the NAS enclosure anyway since Micro SD cards these days are affordable even with 128GB)
    IMO this won't solve the real problem: there's someone thinking about security, wants to implement the 'air gap' principle for this specific Windows host and you're thinking about undermining this. As already written: it's pretty easy to let such a SBC not appear as USB mass storage device but as an USB network dongle instead bridging its own Ethernet connection. So by definition this is not an 'air gap' anymore later unless you totally own the SBC device (though I've heard installation of the needed RNDIS drivers seems to be PITA on Windows -- no idea, I lack the time to use Windows on Desktop)

    Right now the operators are using USB drives to transfer the configuration files from a server to that PC and one cannot be sure that these USB drives will not be used for other purposes and thus become infected by some virus.


    The configuartion files are not sensitive material and the PC does not contain or have access to sensitive material either. However, it is critical that this PC is kept operational. I can give you more details if you don't mind sending you a private message, though it is not a particularly exciting application.


    Nice point about the Micro SD. The storage I need ( counting a partition to be used, on occasion, as a mass storage device as you suggested ) is not nearly large enough to justify a HDD but I am concerned about the possibility of SD corruption in case power fails.

  • Right now the operators are using USB drives to transfer the configuration files from a server to that PC and one cannot be sure that these USB drives will not be used for other purposes and thus become infected by some virus.

    Ok, then this new approach might already be a real improvement.



    I am concerned about the possibility of SD corruption in case power fails

    I've seen SD card corruption only with Raspberry Pis so far (there exist some electrical explanations for this on 1st generation Raspberries -- see 'Edit 2' link at the top of this here -- and then maybe mount options in Raspbian are not optimal, don't know since I try to avoid Raspbian whenever possible).


    Last year when testing with our Armbian releases I tried really hard to get a bricked device due to SD card issues and stopped doing clean shutdowns but even with ~200 such tries I never managed to get a corrupted filesystem later (possible reason: Armbian using a very high 600 second commit interval and shipping with an initramfs that might repair broken ext4 structures at next boot)


    Anyway: filesystem corruption might be an issue with power losses so choosing not an el cheapo Allwinner H3 device but a more expensive board that has full UPS capabilities might a solution. We use Olimex Lime2 with connected 2.5" HDD and their large 6600mAh LiPo battery as mini servers in various locations. They usually run +20 hours on battery with 2.5" HDD connected so without HDD you're fine with much smaller batteries as well.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!