OMV sees my partition on file system tab, but not when creating a shared directory

    • OMV 3.x
    • Resolved
    • OMV sees my partition on file system tab, but not when creating a shared directory

      OMV sees my partition on file system tab, but not when creating a shared directory



      Hello,

      I have a software problem. I have version 3.0 of openmediavault on Debian 8.

      On the system, after formatting and mounting the drive, thanks to my script. My ext4 partition is not taken into account in the creation of a shared directory on the OMV interface.


      How to modify the database of OMV so that my partitions EXT4 is price in account by OMV ?


      Shell-Script: Part of my sh install code

      1. #${choix} = name disk
      2. mkfs.ext4 "/dev/mapper/${choix}-crypt"
      3. mkdir "/srv/dev-disk-by-id-dm-name-${choix}-crypt"
      4. if grep "openmediavault" /etc/fstab ; then echo "ok" ;
      5. else
      6. echo "# >>> [openmediavault]" >> /etc/fstab
      7. echo "# <<< [openmediavault]" >> /etc/fstab
      8. sed -i "s/# <<</\n# <<</g" /etc/fstab
      9. fi
      10. sed -i "s/# <<</\/dev\/disk\/by-id\/dm-name-${choix}-crypt \/srv\/dev-disk-by-id-dm-name-${choix}-crypt ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2 \n# <<</g" /etc/fstab
      11. mount -a
      Display All
      thank you in advance for your help
    • You need to mount the filesystem via the WebUI, otherwise OMV does not show it in the shared folder dropdown box.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • I found the solution. The script must also modify the config.xml file found in /etc/openmediavault.

      Shell-Script

      1. #modif file conf.xml
      2. blkid /dev/mapper/${choix}-crypt > /tmp/disk-uuid
      3. sed -i "s/^.*UUID=\"//g" /tmp/disk-uuid
      4. sed -i "s/\" TYPE=.*$//g" /tmp/disk-uuid
      5. diskuuid=`cat /tmp/disk-uuid`
      6. sed -i "s/<\/fstab>/<mntent>\n<\/fstab>/g" /etc/openmediavault/config.xml
      7. sed -i "s/<\/fstab>/<uuid>${diskuuid}<\/uuid>\n<\/fstab>/g" /etc/openmediavault/config.xml
      8. sed -i "s/<\/fstab>/<fsname>\/dev\/disk\/by-id\/dm-name-${choix}-crypt<\/fsname>\n<\/fstab>/g" /etc/openmediavault/config.xml
      9. sed -i "s/<\/fstab>/<dir>\/srv\/dev-disk-by-id-dm-name-${choix}-crypt<\/dir>\n<\/fstab>/g" /etc/openmediavault/config.xml
      10. sed -i "s/<\/fstab>/<type>ext4<\/type>\n<\/fstab>/g" /etc/openmediavault/config.xml
      11. sed -i "s/<\/fstab>/<opts>defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl<\/opts>\n<\/fstab>/g" /etc/openmediavault/config.xml
      12. sed -i "s/<\/fstab>/<freq>0<\/freq>\n<\/fstab>/g" /etc/openmediavault/config.xml
      13. sed -i "s/<\/fstab>/<passno>2<\/passno>\n<\/fstab>/g" /etc/openmediavault/config.xml
      14. sed -i "s/<\/fstab>/<hidden>0<\/hidden>\n<\/fstab>/g" /etc/openmediavault/config.xml
      15. sed -i "s/<\/fstab>/<\/mntent>\n<\/fstab>/g" /etc/openmediavault/config.xml
      Display All
    • You should better use omv-confdbadm and jq to modify the configuration. See openmediavault.readthedocs.io/…ml#omv-confdbadm-database for more information.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit