Is it possible to do a "simple" SMB share for an USB harddrive (without OMV "managing" those drives)?

  • Hello,

    I'm new to OMV and I would like to try it to get several harddrives into my local network, using a Raspberry PI 3b+ as the hardware.

    I have two scenarios: One "classic" NAS scenario, where I want OMV to manage harddrives, perhaps with RAID.

    In the second scenario, I would like to occasionally attach USB harddrives and share those via SMB protocol. Those USB drives must not be deleted or "managed" by OMV, I just want to attach one to my Raspberry PI and configure a SMB share (maybe with different users) for those drives.

    The simple question is: Is the second scenario also possible?

    Thanks a lot for your help!

  • Since OMV runs on top of a Debian server install it might be possible to do using Debian server. But then this has nothing at all to do with OMV. And it might even disturb OMV from using some parts of Debian Linux.

    Here is an article about udev and how it can be used to run a script when a USB stick is plugged in and one when it is removed.…tion-management-in-linux/

    So what you might do is to use this technique and modify the scripts to create or delete SMB share(s), exactly in they way that you want to do it, for the USB stick as a response to plugging it in or removing it.

    And then you will have exactly what you want. Automatic SMB share after plugging in the USB stick with the security, user and/or password just as you like it. Possibly even automatically start playing media on the drive or cloning it. Or adding files to the drive. Anything you want!

    Add watchdog timers to detect errors and clean up hanged software or other errors. The USB unplugged script could even reboot for the ultimate in cleaning up.

    However, please note that OMV is not involved. It is even possible that the scripts will break or disturb OMV. You might need to restart SMB, for instance.

    I would suggest that you do this as a project on a separate RPi that is ONLY used for this and not running OMV at all. You can connect over the network to a OMV NAS as needed.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • If/when you get something working, please report back here. It is an interesting functionality and it might be useful for many situations.

    Security dongle with access logging. Media playback. Backup of USB devices, like smartphone or camera. Update contents of a ebook reader. Could even be combined with loading the device.

    All just by plugging a USB device in and waiting a while.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I will do, but it could take a while, I'm not a pro when it comes to linux administration ;-)

    But I really like the idea to use OMV, so I'm sure I will stick to it and to this forum.

    Thanks again!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!