Storage folder on separate HDD

In the beginning, I am keeping UNA on the SSD drive, which should have enough space for several weeks/months of running.

However, soon we may need more storage space, and there is no cost-effective way to have a lot of SSD storage.
I am planning to add a 10tb HDD disk (or multiple HDD's combined into one volume), and to store the files there (or to use some cloud storage, one or the other).

I know there is a field only for AWS (which we won't use, we're looking forward to the other cloud storage platform you're releasing integration with soon, or keep everything on our dedicated server). How will I be able to separate the database/template files (hopefully) and keep those on the SSD for quick access, but store the storage folder with uploaded videos/photos/files on the other, high-capacity disk?

  • 405
  • More
Replies (8)
    • Hello titanium !

      Well, it will require many changes in the storage engine's code. Also, the storage content often should be available right now as processed images and videos will be used in many UNA places. So you profit from the keeping DB and templates on SSD and big content on will be not so high as you placed the whole UNA site on HDD. So you may use SSD for your MySQL server only - in this case you no need to touch the UNA's code.

      • Hello titanium !

        Well, it will require many changes in the storage engine's code. Also, the storage content often should be available right now as processed images and videos will be used in many UNA places. So you profit from the keeping DB and templates on SSD and big content on will be not so high as you placed the whole UNA site on HDD. So you may use SSD for your MySQL server only - in this case you no need to touch the UNA's code.

        So for a high load (popular) Una installation, you recommend to just keep the whole installation on an HDD and only the MySQL on the SSD, correct?

        The cache should make both the HDD/SSD very similar in loading speed, correct? I just want it to be at fast as possible, and I know that SSD helps a lot with loading/access speed

        • You may try to change the following constants in the inc/params.inc.php file:

          //--- Main Pathes ---//

          define('BX_DIRECTORY_PATH_INC', BX_DIRECTORY_PATH_ROOT . 'inc/');

          define('BX_DIRECTORY_PATH_BASE', BX_DIRECTORY_PATH_ROOT . 'template/');

          define('BX_DIRECTORY_PATH_CACHE', BX_DIRECTORY_PATH_ROOT . 'cache/');

          define('BX_DIRECTORY_PATH_CACHE_PUBLIC', BX_DIRECTORY_PATH_ROOT . 'cache_public/');

          define('BX_DIRECTORY_PATH_CLASSES', BX_DIRECTORY_PATH_ROOT . 'inc/classes/');

          define('BX_DIRECTORY_PATH_PLUGINS', BX_DIRECTORY_PATH_ROOT . 'plugins/');

          define('BX_DIRECTORY_PATH_PLUGINS_PUBLIC', BX_DIRECTORY_PATH_ROOT . 'plugins_public/');

          define('BX_DIRECTORY_PATH_MODULES', BX_DIRECTORY_PATH_ROOT . 'modules/');

          define('BX_DIRECTORY_PATH_TMP', BX_DIRECTORY_PATH_ROOT . 'tmp/');

          define('BX_DIRECTORY_PATH_LOGS', BX_DIRECTORY_PATH_ROOT . 'logs/');

          define('BX_DIRECTORY_STORAGE', BX_DIRECTORY_PATH_ROOT . 'storage/');

          But note that you will need to keep it before every update.

          • Thanks for the list. This is in case if I want to separate UNA in two between an SSD and an HDD, correct?

            • Yes, it is. You may test it but on your own :-)

              PS I removed your overquoting.

              • While the params hack is helpful, this really should be undertaken as part of a new release and made configurable via the GUI or by a config file that WON'T be overwritten.  Perhaps utilize a config include file that is initially blank and overrides whatever may be in the primary config file.

                • If you want to have files storage on a separate disk, it's possible with symbolic link on Unix systems, just make 'storage' folder in UNA a symbolic link to another location.

                  Also in UNA 12 we've already added support for other cloud storages, we've tested it on Google Storage and Wasabi, but other S3 compatible storages should work as well:
                  https://github.com/unaio/una/wiki/Remote-Storage

                  • Alex,

                    That's good progress!  Now, has UNA ever been tested in a shared storage or mysql replication grid environment?  If not, I'll let you know how it works.

                    Login or Join to comment.