Storage Devices
In Asset Bank, storage devices are configurable areas of storage for digital files. A storage device can contain the asset files themselves and/or files created by the system for various operational purposes (thumbnails, converted versions, preview video clips, exported metadata, etc.).
A storage device relates to a directory on a local or mapped/mounted network hard drive accessible via the server's local filesystem, an Amazon S3 bucket or the Asset Bank database.
By default, a single unlimited storage device is configured to store both asset files and system files within a directory called 'files' within the application filespace. This will be suitable for many installations, but in situations where more control is required, it is possible to reconfigure the default storage device and/or add further devices.
Admin users can add new devices from the Admin > System > Storage Devices menu. Select the type of device to add (filesystem, Amazon S3 or database) and click Add.
Below is a description of the configuration options for each device.
Name
A textual identifier for the device (i.e. 'Asset storage on server X' or 'Storage on Amazon S3').
Type
What type of resources will be stored in the device: system files, asset files, thumbnails, a combination of the above or repurposed files. 'System files' refers to any versions of asset files that are created by the system for displaying within the application, plus temporary files created for a variety of purposes such as uploading, caching, importing, exporting, etc.
Local Path
The filesystem path of the device. This could be the path to a mapped/mounted network location or a path inside an Amazon S3 bucket. Be aware that Asset Bank's performance will be impacted by accessing files across a network.
Http Base Url
Alternative URL to serve the images from (allows images to be served by a server other than Tomcat - i.e. Apache). Requires the webserver to be setup prior to this field being populated.
Authentication ID (Amazon S3 only)
The key associated with the Amazon S3 account or IAM user that you want Asset Bank to use to access S3. The user / account will need full access to the Amazon S3 bucket that the Asset Bank is going to use.
Authentication Key (Amazon S3 only)
The secret key associated with the Amazon S3 account or IAM user that you want Asset Bank to use to access the Amazon S3 bucket.
Is Relative (File System only)
Whether the provided Path is relative to the Asset Bank web application root ([tomcat]/webapps/asset-bank), or an absolute path (which should start with a '/').
Max Space
If necessary, a maximum storage limit can be provided for each device. Rather than being necessarily related to the physical size of the disk, this is a configurable maximum that allows you to limit the amount of space used by Asset Bank on a particular device (although clearly it doesn't make sense to make this more than the physical disk can accommodate). Once this limit is reached (given the safety margin - see below) Asset Bank will consider the device full and will look for another device in which to store files.
To try and ensure that the storage limit set for a storage device is not exceeded, there is a configurable 'safety margin' for each file device type. Asset Bank will consider a device full if its used space (according to the last assessment), plus the configured safety margin, is within the configured storage limit. Since (with default settings) the usage data may be up to 4 hours out of date, the safety margin should reflect an amount of space that is unlikely to be filled in this time.
The default settings for the safety margins for asset and system files are 100Mb and 1Gb respectively. If it is critical that each device's limit is not breached, it may be necessary to i) increase the frequency of the space usage scans by reducing the value of setting storage-device-usage-update-period-minutes and/or ii) increasing the safety margins.
The storage limit for a particular device can be changed at any time, so more space can be allocated to a device that is regarded full, for example. If the space allocation for a device is reduced, this will not reduce the amount of files already stored on the device, but may prevent further files from being stored if the remaining space becomes less than the configured safety margin.
Locked
It is possible to 'lock' a storage device to prevent it from being used for future file storage without affecting the files current stored. Note that when a storage device that stores System files is locked, it may still be used (until the next system restart) for cached converted images. It is unlikely that the overall space requirement will grow significantly, but new cached versions of files may be stored on the device.
Locking Storage Device Editing
In order to prevent the configuration of storage devices from being edited, it is possible to lock the current configuration by changing application setting storage-device-edit-lock from false to true. Obviously this process would need to be reversed in order to subsequently make further changes.
Deleting Storage Devices
It is generally not a good idea to delete storage devices if this can be avoided. If you do need to do this, clicking the delete link next to the storage device will take you to a page that will try and inform you about how the storage device is currently used. Pay close attention to any warnings on this page before continuing. Deleting a storage device that is currently being used for asset or system storage is likely to result in errors.