How to add share folder via console / shell

  • I have a problem where because I have lots of filesystem (using ZFS datasets) the Add "Shared Folder" gui timeout before it is able to finish making the list to select from to create a new share. This effectively makes it so that I can't add or change any of the shared folder.


    Does anyone know how I can add "shared folders" bypassing using the web gui? Is it possible to do this via the console / shell?


    Thanks You.

  • You have to edit /etc/openmediavault/config.xml an add the entries manually. There are examples inside the file, you need to create internal uuid's for each one.


    How many datasets do you have that take so long to enumerate?


    So far I have over 300 "datasets" and will be adding more as I go. I find that it stops responding after around 180 datasets / filesystem.


    Thanks for the tip. Prior to seeing your reply I've manged to play around with the config.xml yesterday. It seems to do what I need it (add shares).


    Another workaround is: I tried commenting out most of the filesystem / <mntentref> this seems to allow the gui to cope with adding new share folder. Then after I've added my shared folder I then uncoment the <mntentref> to revert the file to how it should be.


    There must be a way to increase this timeout somehow. I'm having a similar issue due to SMART problems.


    I have tried to increase all the timeout I could fine in php & nigx without success. "rpc.php" seems to just give up after a while.

  • Did any of you try increasing the process idle timeout in the pool file for the web GUI? Orion did not mention pool file.


    /etc/php5/fpm/pool.d/openmediavault-webgui.conf


    I think that is the path.

  • I didn't increase that because I timed how long it takes for the "Communication Error" to show up and it turned out to be exactly 60 seconds. I didn't think that the process timeout, being 10 seconds, would have affected that. I did change:


    /etc/php5/fpm/pool.d/openmediavault-webgui.conf:
    php_value[default_socket_timeout] = 90
    php_value[max_execution_time] = 90


    /etc/openmediavault/php.ini:
    default_socket_timeout = 120
    default_socket_timeout = 90 (There are two)
    max_execution_time = 90


    /etc/nginx/sites-enabled/openmediavault-webgui:
    fastcgi_read_timeout 120s;


    I basically grepped for everything with "timeout" in /etc and changed them to 90 or 120.

  • Hokay, I think I figured it out. The things that need to change (all of these) are:


    /etc/openmediavault/php.ini:
    max_execution_time = #


    /etc/php5/fpm/pool.d/openmediavault-webgui.conf:
    php_value[max_execution_time] = #


    /etc/nginx/sites-enabled/openmediavault-webgui:
    fastcgi_read_timeout #s;


    /etc/default/openmediavault:
    OMV_HTTPREQUEST_TIMEOUT="#*1000"


    After these changes:service openmediavault-engined restart && service php5-fpm restart && service nginx restart


    The last one did not exist, but was referenced in rpcproxy.inc and was the one I was missing. Afterwards, I went through and tried to increase one at a time until the time it took before failure went up.


    It took just over 2 minutes to enumerate my SMART devices. Yay.

  • Did any of you try increasing the process idle timeout in the pool file for the web GUI? Orion did not mention pool file.


    /etc/php5/fpm/pool.d/openmediavault-webgui.conf


    I think that is the path.


    I didn't know anything about this.



    Thanks, I'll try the same and report back.


  • I just tried this by setting all those to 300 seconds. The "Add Shares" now works after taking a good few minutes to enumerate 300+ zfs datasets.


    Thank you.

  • Just out of curiosity how long does it take to list 300 zfs datasets in CLI?


    I just timed it and the time it took to list the 328 dataset via CLI "zfs list": 1 second!


    "Add Share" took to make the list: 2 minutes and 5 seconds.


    It took the ZFS plugin (GUI) 16 seconds to list all the datasets.

Jetzt mitmachen!

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