Can't get Samba to work in OMV

  • Hi,


    I updated my system from an existing complete Debian Wheezy setup to OMV (not a fresh install of Debian).I've already had volumes setup from a RAID6, and a samba sharing that volume on the network.


    Here are the issues that seem to remain after having installed OMV:


    1) Samba does not initialize properly on reboot. Running a service samba restart fixes this, but I'd like for Samba to run automatically like it used to. I realize that this is not setup under OMV, but config file is clearly setup correctly.


    2) Another option is to setup Samba again from scratch in OMV, but currently I can't. Setting up a shared folder in OMV does not allow me to select my /dev/md0 volume under 'volume' selection. The 'volume' selection is empty, even if I see it listed under 'File Systems'. I suspect this has something to do with the fact that I did not set up these volumes in OMV.


    Any suggestions on how to get these to work in OMV? Would be wonderful to seamlessly migrate these. Thanks ahead of time,



    T

  • Dumb question but just to make sure, is your volume actually mounted? I had Ubuntu Server running with mdadm RAID 1 already established on a pair of WD Red drives. I pulled the OS drive I had Ubuntu Server on, slapped on OMV onto a spare SSD I had, and /dev/md0 was detected right away. I mounted it, added it as a volume, then set up shared folders, and finally Samba shares.


    Is what I described what you already accomplished?

  • My Raid6 (/dev/md0) volume's main purpose is for Samba to share files on the network. As mentioned, restarting Samba from command line makes everything work like it used to, since this was setup in Debian. This would imply that the volume is mounted. This does not make use of OMV, however.


    My installation process was fairly simple. I had an existing system that I've been using for years with Debian. I just recently installed OMV on top of the existing OS (I wanted the simplicity OMV has to offer) - so no drive swap. To clarify, I have one OS drive, and the rest of the physical drives are RAID6 into /dev/md0.


    There seems to be a similar thread here, where the mod mentions: Just symlink your needed folders to a shared folder. (Only CIFS/SMB can follow them, NFS can't!).
    I'm still confused as to how a symbolic link would help me here, as I'd have to create a volume in OMV in the first place.


    I must be missing something regarding how volumes show up in OMV

  • I'm drawing a bit of a blank offhand. When I fired up my system for the first time it could see the md0 device but didn't mount it. I didn't verify via command line if that was the case though. I'm only judging that based on the fact that OMV recognized the md0 device but had no stats or usage reports about it. Highlighting it brought up the mount button as a usable option. Once mounted within OMV I did the volume bit, etc.


    I'll stop there and sit on this for the moment. It's very late and I hate to recommend something with the "so tired can hardly see straight" state I'm in right now. ;-)



  • From what I can tell, The person in that thread, his "problem" is significantly different than yours.. he is attempting to use his OS drive for both the OS drive, and to host shared folders (for the OMV webUI). This is something OMV was not designed to do, so it's not really a problem.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • For samba to start auto at boot you need to execute in cli as root: update-rc.d samba defaultsupdate-rc.d samba enable


    This is unnecessary if you enable samba from the webui. However this will delete all your previous samba config.
    For the volume to appear in omv you need to register that volume in config. So you need to unmount the raid and mount it again with the Webui.

  • Thanks for all the responses


    Quote

    For samba to start auto at boot you need to execute in cli as root: update-rc.d samba defaultsupdate-rc.d samba enable


    I forgot to mention that I realized I can do this, shortly after. I was hoping to find a way to move this into the Webui instead.


    Quote

    For the volume to appear in omv you need to register that volume in config. So you need to unmount the raid and mount it again with the Webui.


    Here come the newb questions: How do I do this exactly? Is it sufficient to just unmount, and it would show up in webui, where I'd be able to rebuild the raid?


    Here is what I think should work (would just like to confirm, as I don't want to lose any data on RAID or risk messing something up):
    mdadm --stop /dev/md0 to stop the RAID
    mdadm --remove /dev/md0 remove the RAID
    This should just leave the drives ready to be rebuilt in the webui (as I have not zero'd the superblocks)
    Then in 'RAID Management' in webui I'd be able to 'Recover' the existing RAID6, because the drives are not mounted? Setting this up here would show the volumes in webui from now on?


    As I understand it, all the problems have arisen due to the system having dealt with the RAID volume instead of OMV?

  • I was hoping to find a way to move this into the Webui instead.


    Enable samba then in the webUI, thats it.


    Is it sufficient to just unmount, and it would show up in webui, where I'd be able to rebuild the raid?


    Yes just to unmount and mount again, you don't need to rebuild array. Also make sure you delete the mount entry in fstab if you have one, and you probably have one. That way OMV will add his own entry in the fstab once you press mount.

  • Quote

    Yes just to unmount and mount again, you don't need to rebuild array. Also make sure you delete the mount entry in fstab if you have one, and you probably have one. That way OMV will add his own entry in the fstab once you press mount.


    I removed the /dev/md0 entry in fstab config, and rebooted. Afterwards I was able to mount /dev/md0 in webui, and the volumes were now visible for use and make the shares / samba setups accordingly.
    It did take about a day to run quotas on my 14tb upon reboot, but all seems to be working well now.


    Much thanks!

Participate now!

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