Mounting image file to shared folders

  • Hello,



    Problem:


    When I do any privilege changes in Access rights management -> Group -> privileges button, save and hit apply and yes button I get an error.


    “Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; systemctl restart 'sharedfolders-LIVE_ROOT.mount' 2>&1' with exit code '1': Job for sharedfolders-LIVE_ROOT.mount failed. See "systemctl status sharedfolders-LIVE_ROOT.mount" and "journalctl -xe" for details.”


    Below is part of output from journalctl -xe


    Code
    -- Unit sharedfolders-LIVE_ROOT.mount has begun shutting down.
    Jul 23 23:41:19 mynas systemd[1]: sharedfolders-LIVE_ROOT.mount: Mount process exited, code=exited status=32
    Jul 23 23:41:19 mynas systemd[1]: Failed unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT.
    -- Subject: Unit sharedfolders-LIVE_ROOT.mount has finished shutting down


    Below is syslog part of it:


    Code
    Jul 24 00:34:11 mynas systemd[1]: Unmounting /sharedfolders/LIVE_ROOT/cctv...
    Jul 24 00:34:11 mynas systemd[1]: sharedfolders-LIVE_ROOT-cctv.mount: Mount process exited, code=exited status=32
    Jul 24 00:34:11 mynas systemd[1]: Failed unmounting /sharedfolders/LIVE_ROOT/cctv.
    Jul 24 00:34:11 mynas systemd[1]: Unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT...
    Jul 24 00:34:11 mynas systemd[1]: sharedfolders-LIVE_ROOT.mount: Mount process exited, code=exited status=32
    Jul 24 00:34:11 mynas systemd[1]: Failed unmounting Mount shared folder LIVE_ROOT to /sharedfolders/LIVE_ROOT.


    What resolves it:


    To overcome the above error I have to stop nfs-server service and unmount /sharedfolders/cctv/ which is mounted from /srv/dev-disk-by-label-Live/hikvision.img. Apply privilege changes and mount image and restart nfs server services.


    Config and things I noticed:


    Shared folder pointing to root.


    I created shared folder LIVE_ROOT with path “/” to use it for rsnaphshot as backup source as otherwise there would be many rsnapshot jobs, as many as I have shared folders.


    Because I pointed the Path to the share as “/” when I execute “df” the main mounting point for the partition changes from /srv/dev-disk-by-label-Live to /sharedfolders/LIVE_ROOT but I still can access files from /srv/dev-disk-by-label-Live


    Code
    /dev/sdb13844640564 1043107984 280151619628% /sharedfolders/LIVE_ROOT
    /dev/sda13844640564939583816 290504036425% /srv/dev-disk-by-label-Backup


    Image mounted for Hikvision ip camera


    My Hikvision ip camera only works with nfs and doesn’t work with large hard drives. I tried user quotas and other suggestions but I only found one thing to work and it was to create a fixed size disk image with dd and mount it to shared folder that I also created nfs and samba shares for.


    I mount image after omv entries for Hikvision ip camera. Below is fstab file



    Code
    root@mynas:~# cat /etc/fstab
    
    
    LABEL=boot /boot/efi vfat defaults,sync 0 0
    # >>> [openmediavault]
    /dev/disk/by-label/Backup /srv/dev-disk-by-label-Backup ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    /dev/disk/by-label/Live /srv/dev-disk-by-label-Live ext4 defaults,nofail,user_xattr,jqfmt=vfsv0,acl 0 2
    /srv/dev-disk-by-label-Live/cctv /export/cctv none bind,nofail 0 0
    # <<< [openmediavault]
    /srv/dev-disk-by-label-Live/hikvision.img /sharedfolders/cctv ext4 loop 0 0


    Questions:


    How to manage mounting points of image file to prevent any conflicts with services or omv mount and unmount jobs?


    Thanks in advance

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!