Use local folder "/data" as local fileStorage

I have installed on Ubuntu 22.04 the actual OnlyOffice Workspace via Installation Skript.
On my server i have 2 Harddisks, both with ext4

harddisk1

  • Size 500 GH
  • mounted under /root as ext4
  • here is Onlyoffice installed.
  • i want that OnlyOffice is here installed

harddsik2

  • Size 8 TB
  • mounted under /data as ext4
  • this folder is in the moment empty

My question
I want that OnlyOffice-Workspace use the folder /data as Local Storage.

Hello @haglo

Did you install it with packages or with Docker?

With Packages, not with docker.

In general, I have to mention that such operation is not supposed to be performed as it may cause various issues, so any further advises are supposed to be taken at your own risk.

With packages easiest way is to create symlink of Data directory to new disk. Here is how this can be done, for instance, when moving Data to /mount/sdb:

  1. Prepare server backup so that in case of unexpected issues you will be able to rollback to previous server state;
  2. Execute following script to shutdown Document Server:
bash /usr/bin/documentserver-prepare4shutdown.sh
  1. Stop all Workspace services with:
systemctl stop monoserve* onlyoffice* elasticsearch
  1. Create new directory where Data will be located:
mkdir -p /mount/sdb/Data
  1. Transfer /var/www/onlyoffice/Data directory to /mount/sdb/ with mv /var/www/onlyoffice/Data/ /mount/sdb/ and grant proper rights to new destination with chown -R onlyoffice:onlyoffice /mount/sdb/Data;

  2. Create symlink:

ln -s /mount/sdb/Data /var/www/onlyoffice/

After this step check if symlink is created with ls -lai /var/www/onlyoffice/.

  1. Start Workspace services and Document Server:
systemctl start monoserve* onlyoffice* elasticsearch // Start Workspace services
systemctl restart ds-* // Start Document Server