Best practices for external USB HDD

Hello all,

i hope y’all doing great today.

i just came across the following dilemma that hopefully with your experience we can sort it out easily.

what is the best practice for adding an external USB HDD to nextcloud home server?

  • mounting it permanently using FSTAB
  • just enabling the External Storage app and add a local folder for each user when configuring the account (the usb hdd will be always plugged in)?

Thanks for the replies!! :slight_smile:

I did both of those, works fine

did you set them up at the same time or independently?

I did them independently. So I have my standard Nextcloud storage internally, then later on added the external device (say /dev/sdc1 in this case) to my /etc/fstab file and then went to the admin page of Nextcloud and added it. Does that answer your question?

it kinda does.

but now that brings another set of questions.

the core skeleton for your users is on the nextcloud/data in your internal storage, can that be moved to the local external storage, or did you create a specific folder for each user on the local external storage?

Sorry for the late response, school finals got in the way! I think I understand what you’re asking. Basically just making it so all user data goes to the external HDD only, correct? Let’s say your data directory is /var/www/html/nextcloud/data, what you could do is put your server in maintenance mode, move your data to data.old and create a new data directory. Go into your /etc/fstab file and point that external drive to that directory. Then mount the drive and move the contents in data.old to your new data directory (make sure permissions are correct), then disable maintenance mode. All of your user data will go to your external HDD because that is the name of your Nextcloud data directory. And your current data will still remain intact

Another thing you can do if you want the external hard drive to be there ALONG with internal is to add your local storage via the external storage part of NC and create a folder on there to be shared with users or groups, and they will inherit that directory

hey, no worries…

this explains a bit better on the HDD.

now the question would be if the users data folders be moved to the external HDD and leave the server data in the server.
so far, how i understand is that the documentRoot would be on /var/www/html/nextcloud and can it be possible to move Data to the external drive(/Media/hdd) and map it that way for the new users?

Regards!

I hope I understand, because I have to use the Google translator. I have already set up the Nextcloud, but unfortunately something went wrong and I had to do something new. Unfortunately, it is currently not possible to integrate an external hard drive into the system. Auto mount is enabled. How do I proceed to integrate this disk into the system?

I have used the latest version.
The HDD is formated now in ext4
Mounted as sda1 (lsblk)
Name is USBdrive1 and config in nexcloudpi-Config Tool (ncdata dir)

The correct Size of the Volume isnt shown

Hello Matthias_Schmidt,

hope this finds you well.

for my experience, i had to setup the external HDD as FAT32 and then configure the automount to an specific folder (/media/nextcloud or something similar) and then gave permissions as www-data.

one time i plugged the external HDD to a different port and it wasnt even recognized by the system, so i had to plug it back again to the original USB port i configured originally and voila!.

i hope this helps a bit…

Regards!!