How to set disk usage priority?

Hi guys,
is there any tool/app or even internal config where I can set usage priorities for each storage (mount-points)? e.g. first fill my SSD disk before HDD

I think not. There is only one datadir :wink:

‘datadirectory’ => ‘/var/www/nextcloud/data’,

documentation config.php

If you want to use different storages use external storage.


already mounted but nc fills HDD first and fast SSD waits empty :pensive:
anyway, thanks for the reply!

I’ve found this way of fusing storages. Maybe the list of devices in mhddfs will prioritize filling in the storage queue?

The solution in the link does not really make sense.
Please post the line of:
‘datadirectory’ => ‘/var/www/nextcloud/data’,

If you want you can move all data in a new (faster) directory.
Sorry i do not use ncp. It could perhaps differ.

a.) make a backup of all data
b.) check your backup
c.) mkdir /path/on/ssd for your data-dir
d.) chown www-data:www-data /path/on/ssd
e.) stop nextcloud or do not use it
f.) move (first only copy) all data from old to new data dir (note the correct structure)
g.) change setting of datadirectory in config/config.php
h.) if all works delete old datadir.
i.) make a new backup, do not delete the old backup :wink:

just follow this How-To

1 Like

Yes. But you must nothing change in your database.

Yes you should! Please read the comments on the HowTo: It is recommended to adjust the related database entry as shown in the HowTo, otherwise one has two entries, an inconsistency which may not be supported by Nextcloud in the future. This remains true until any Nextcloud engineer states otherwise.

But AFAIK NextCloudPi, if that is used by OP according to the tag, has an internal CLI or web UI based feature to transfer the data directory, isn’t it?


Thank you @MichaIng for this important information.

1 Like