File system mounted to /srv but trying to mount to /media when creating a share

    • File system mounted to /srv but trying to mount to /media when creating a share

      I have an OMV that started as an OMV 2.? that has been upgraded to OMV 3 and now OMV 4.1.12 in case that matters. As far as I could tell everything was working just fine for about a month. All my drives are present and shares are working. All my plugins work after I reinstalled them.

      Yesterday I got a new external hard drive and I formatted and created an EXT4 file system on it through OMV. I can verify that the drive is mounted to /srv and I can create files and such on it. So far so good.

      However, when I try to create a share (so far I've tried Apple and NFS) on this drive I get the following error:

      Source Code

      1. Error #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl restart 'sharedfolders-backups.mount' 2>&1' with exit code '1': A dependency job for sharedfolders-backups.mount failed. See 'journalctl -xe' for details. in /usr/share/php/openmediavault/system/
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/system/ OMV\System\Process->execute(Array, 1)
      5. #1 /usr/share/php/openmediavault/system/ OMV\System\SystemCtl->exec('restart', NULL, false)
      6. #2 /usr/share/openmediavault/engined/module/ OMV\System\SystemCtl->restart()
      7. #3 /usr/share/openmediavault/engined/rpc/ OMVModuleSharedfolders->startService()
      8. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      9. #5 /usr/share/php/openmediavault/rpc/ call_user_func_array(Array, Array)
      10. #6 /usr/share/php/openmediavault/rpc/ OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc/ OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatus9D...', '/tmp/bgoutputQv...')
      12. #8 /usr/share/php/openmediavault/rpc/ OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      13. #9 /usr/share/openmediavault/engined/rpc/ OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      14. #10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      15. #11 /usr/share/php/openmediavault/rpc/ call_user_func_array(Array, Array)
      16. #12 /usr/share/php/openmediavault/rpc/ OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      17. #13 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      18. #14 {main}
      Display All
      When I run journalctl -xe I see the following line over an over from monit: 'mountpoint_media_bb921ad9-1f85-4062-9469-a81004ed2c6a' status failed (1) -- /media/bb921ad9-1f85-4062-9469-a81004ed2c6a is not a mountpoint.

      So somehow and somewhere there appears to be a missmatch where the drive is mounted to /srv as it should be in OMV 4 but the rest of the system is looking for it in /media.

      When I look in fstab I see that it is indeed configured to mount the drive to media instead of srv.
      When I reboot the drive comes back mounted to /srv.
      When I unmount the drive in /srv and try to mount /media/bb921ad9-1f85-4062-9469-a81004ed2c6a the command happily runs without error but doesn't mount the drive.

      I am far from an expert in OMV.

      Is there something I can do to fix this or should I trash it and install OMV 4 from scratch?

      Many thanks

    • I see it in config -> system -> fstab -> mntent

      Source Code

      1. <mntent>
      2. <uuid>1b16f039-9162-4770-95a7-1fbd7093c047</uuid>
      3. <fsname>bb921ad9-1f85-4062-9469-a81004ed2c6a</fsname>
      4. <dir>/media/bb921ad9-1f85-4062-9469-a81004ed2c6a</dir>
      5. <type>ext4</type>
      6. <opts>defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl</opts>
      7. <freq>0</freq>
      8. <passno>2</passno>
      9. <hidden>0</hidden>
      10. </mntent>
      This the only place and it matches with the information in /etc/fstab.
    • I'm confused. In your original post I got the idea that this drive was mounted in /srv, but you say you have an entry in fstab that mounts it in /media.

      Any chance you have multiple statements in fstab that try to mount the same drive twice?

      Also, look again in config.xml and see where else /media shows up.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • Indeed. The drive is being mounted to /srv. fstab has a line for mounting the drive to /media.

      /media shows up all over the place as all of the drives that I have configured prior to upgrading to OMV 4 were originally mounted there. It is only the new drive I just added to the system since upgrading to OMV 4 that is having this weird problem. I can't figure out how the new drive is being mounted at all frankly.

      Source Code

      1. rich@fafnir:~ df -h
      2. Filesystem Size Used Avail Use% Mounted on
      3. udev 483M 0 483M 0% /dev
      4. tmpfs 100M 7.6M 93M 8% /run
      5. /dev/sda1 15G 2.7G 12G 19% /
      6. tmpfs 499M 0 499M 0% /dev/shm
      7. tmpfs 5.0M 4.0K 5.0M 1% /run/lock
      8. tmpfs 499M 0 499M 0% /sys/fs/cgroup
      9. tmpfs 499M 4.0K 499M 1% /tmp
      10. /dev/sdg1 197M 82K 197M 1% /srv/dev-disk-by-label-EFI
      11. /dev/sdd1 1.8T 79G 1.7T 5% /media/e94f8644-b800-4f57-8101-0a561803af0b
      12. /dev/sdc1 3.6T 851G 2.8T 24% /sharedfolders/media
      13. /dev/sdh1 932G 326M 932G 1% /media/1C066AEA066AC3FC
      14. /dev/sdb1 1.5T 15G 1.5T 1% /media/2e53bcde-c8c6-4f39-8dbe-e46bd6422501
      15. /dev/sdg2 932G 730G 203G 79% /media/6DE5C8E878DBE3BD
      16. /dev/sdf1 7.3T 93M 7.3T 1% /srv/dev-disk-by-label-Backups
      Display All

      The last file system on line 16 is the troublesome one. As you can see it is mounted to /srv.

      Source Code

      1. # /etc/fstab: static file system information.
      2. #
      3. # Use 'blkid' to print the universally unique identifier for a
      4. # device; this may be used with UUID= as a more robust way to name devices
      5. # that works even if disks are added and removed. See fstab(5).
      6. #
      7. # <file system> <mount point> <type> <options> <dump> <pass>
      8. # / was on /dev/sda1 during installation
      9. UUID=3794c3a9-4536-449e-9d32-cd508ffb9dd5 / ext4 errors=remount-ro 0 1
      10. # swap was on /dev/sda5 during installation
      11. UUID=22e7d102-a32c-4ae1-90b9-ca76ce0fae13 none swap sw 0 0
      12. /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
      13. # >>> [openmediavault]
      14. UUID=2e53bcde-c8c6-4f39-8dbe-e46bd6422501 /media/2e53bcde-c8c6-4f39-8dbe-e46bd6422501 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl 0 2
      15. UUID=9d19966b-a21b-48b4-a4f3-65a770abd12c /media/9d19966b-a21b-48b4-a4f3-65a770abd12c ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl 0 2
      16. UUID=e94f8644-b800-4f57-8101-0a561803af0b /media/e94f8644-b800-4f57-8101-0a561803af0b ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl 0 2
      17. UUID=bb921ad9-1f85-4062-9469-a81004ed2c6a /media/bb921ad9-1f85-4062-9469-a81004ed2c6a ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl 0 2
      18. /dev/disk/by-uuid/1C066AEA066AC3FC /media/1C066AEA066AC3FC ntfs defaults,nofail 0 2
      19. /dev/disk/by-uuid/6DE5C8E878DBE3BD /media/6DE5C8E878DBE3BD ntfs defaults,nofail 0 2
      20. /dev/disk/by-label/EFI /srv/dev-disk-by-label-EFI vfat defaults,nofail 0 2
      21. /dev/disk/by-label/Backups /srv/dev-disk-by-label-Backups ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,,jqfmt=vfsv0,acl 0 2
      22. /media/2e53bcde-c8c6-4f39-8dbe-e46bd6422501/home/rich /export/rich-home none bind 0 0
      23. /srv/dev-disk-by-label-Backups/files /export/backup-files none bind,nofail 0 0
      24. # <<< [openmediavault]
      25. tmpfs /tmp tmpfs defaults 0 0
      Display All
      The drive appears in fstab above on line 16 (the id of the drive is the one that starts with "bb").

      The path /media appears in config.xml once for each of the above entries. And for all but the drive with the id starting with "bb" that is correct and for all but that drive it is working.

      Anyway, I've tried some simple editing of config.xml and I'm convinced at this point that I should probably just go ahead and start with a fresh install of OMV and configure everything again from scratch.

      Thanks for the help.