OVH / use external disk

Hi community,

I have hard times trying to (become a sysadmin :smirk:) configure my ownCloud instance on an OVH VPS.

My configuration: Ubuntu 16.04 LTS / ownCloud 10.0.2. I've installed the application on a Virtual Private Server at OVH, which brings also an additional disk, seen as /dev/vdb1. I've mounted this disk as /mnt/diskext and created a folder oc/data.

Now I'd like to use this folder as the main repository for my company and store all shared files into oc/data (first copy would be done with FTP). I've already set up "Enable external storage" = ON.

Unfortunately, I don't know:

  • how I should configure "external storage" in ownCloud to point to this folder ! I've found several "support protocols", such as Amazon S3, Dropbox and the likes but nothing enabling "plain old hard disk"...
  • if the additional disk is managed as a virtual disk, which "protocol" is used to access it
  • if I should use /dev/vdb1/oc/data as folder name or /mnt/diskext/

As you can see, very dummy questions but these are my first steps as a (temporary) sysadmin! :wink:

Thanks in advance for any help!

Server configuration

Operating system: Ubuntu 16.04 LTS
Web server: Apache 2
Database: mySQL
PHP version: 7.0
ownCloud version: (see ownCloud admin page) 10.0.2
Updated from an older ownCloud or fresh install: fresh
Where did you install ownCloud from: setup-onwcloud.php

As I understand it's a brand new install, so I believe the way to go is to define that directory as the data directory in your config.php file by adding:
'datadirectory' => '/mnt/diskext/oc/data/',

My understanding of 'external storage' is that it's to connect with a storage platform outside of your system' FS. In your case, either disks you use will remain internal - as in within the same machine if you will.

If you've already uploaded data to your OC install, there's a way to change the path to that but it involves an extra step, you have to change the path manually in the database too, while owncloud is not active (turning off apache2 and making sure there's no cron job scheduled either).
You'll find a binch of guides on that, just know that it's not officially supported, as I understand it.

Good luck.

Thanks pyheme! Actually, I've managed to get "Local Storage" option back by tweaking the config.php file, adding "files_external_allow_create_new_local' => true" which works pretty well although it's not documented...

Now I have to understand if I should use /dev/vdb1/oc/data as folder name or /mnt/diskext/ and check all access rights and permissions on the data folder...

Thanks again for your help!