Manual or Automated script to implement OMV config.xml - Using existing fstab and smb.conf -

  • I was curious if anybody knows of a script or a method I can create the OMV config.xml file ??

    My situation currently; I have a debian buster server with (many) disks using samba to serve my SMB shares for a shield plex server.


    I was considering to add OMV as a service and starting using OMV. (or should I just stay with my current setup with samba without omv?)


    All my partitions are ext4 and drives are being mounted via Labels currently.


    *** Does a script exist where I can automatically run read my current tiles: fstab and smb.conf to create a config.xml ?

    if not.

    Can I manually create the config.xml "<mntent>" entries using my disk labels,,,, and smb.conf entries... "shares" (same as disk label)


    I briefly looked into the manual process... I can't seem to figure out why the UUID's do not match the actual HD's UUID.... (using test OMV install on VM for now)

    - Seems it's some randomly generated UUID and added to some DB. any suggestions?


    I understand the need to unmount my current HD/shares.... and let OMV take care of the backend.

    but to use the GUI to mount everything... manually and create all (26) mounts and the shares etc.. seems painful.

    If I can create the config.xml would be beneficial if need to rebuild down the road.


    A script to read smb.conf can determine which fstab entries would need to be removed so to let omv handle the mounts "a la omv"

    generate the UUID and entry into DB and resulting config.xml and smb.conf file would be great.. I doubt that exists but...


    But to keep things realistic. can anybody help with how these UUID's are generated and how to append them to the so called omv db.

    I should be good with the rest of the manual generation of the config.xml.

  • Does a script exist where I can automatically run read my current tiles: fstab and smb.conf to create a config.xml ?

    No.

    Can I manually create the config.xml "<mntent>" entries using my disk labels,,,, and smb.conf entries... "shares" (same as disk label)

    You can but if you do something wrong, it is going to be a pain to figure out what happened. Is there a reason you don't want to enter with the web interface?


    but to use the GUI to mount everything... manually and create all (26) mounts and the shares etc.. seems painful.

    If I can create the config.xml would be beneficial if need to rebuild down the road.

    It would be a one time pain if you back up your system.

    an anybody help with how these UUID's are generated and how to append them to the so called omv db.

    I should be good with the rest of the manual generation of the config.xml.

    It would take longer to write the automation than just enter from the web interface.

    omv 5.6.13 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yes, agreed..... hindsight everything is currently working for me currently without any additional overhead.


    Intent was to move to OMV because of the GUI interface. - I Agree a one time pain to reconfigure everything.

    .

    ** Still I would like to understand what these UUID's exactly? ,,,, Why call them UUID's if they are not the actual disk UUID's? (provided through blkid) why not use the same UUID if they are already Unique????


    you will agree if a script existed import existing smb.conf would be a nice touch.



    So then the steps suggested are:

    1) Comment out my fstab entries,,,,

    2) Using OMV; remount each filesystem. With no loss of data?!. (I was worried data could be lost not understanding omv UUID process)

    3) re-create all my shares.

    4) test... samba shares.

    5) backup my config.xml file.


    missing anything?


    Thanks in advance.

  • Still I would like to understand what these UUID's exactly? ,,,, Why call them UUID's if they are not the actual disk UUID's? (provided through blkid) why not use the same UUID if they are already Unique????

    OMV's database uses uuids to reference mntref entries in things like sharedfolders. Not every filesystem supported by OMV has a UUID (or at least a UUID in the correct format). So, a random uuid is generated.


    you will agree if a script existed import existing smb.conf would be a nice touch.

    I guess. I've never had an smb.conf so big that I would need a script. I've entered samba setup so many times, it wouldn't take me long anyway.


    You will need to unmount the filesystems after commenting out the fstab entries.

    If you just mount each filesystem from the Filesystems tab, all OMV does is generate an mntent entries, add to fstab, and mount the filesystem. That shouldn't cause data loss.

    You will most likely need to create a shared folder for each share.

    Backing up the config.xml is helpful but can't be used on a new install. You should really back up the entire OS disk (or at least the partition). That is the what the openmediavault-backup plugin does.

    omv 5.6.13 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

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