Hi
I have just updated to Nextcloudpi Configuration 14.3 and wanted to change my external hard drive but when i tried to log in, it keeps prompting internal server error.
I am not familar with NCP but Pi’s in general. When I need to add or replace disk I do the following on my server (debian):
adding the new HDD to Pi and creating new primary partition by using: fdisk /dev/sda
once the partition has been created I format it as ext4: mkfs.ext4 /dev/sda1
now the disk needs to be mounted. I use the script beneath for it:
#!/bin/sh
# run it as root
UUID=`blkid | awk '/sda1/ {print $2}' | cut -d '"' -f2`
mkdir /media/usbhdd-a
echo "UUID="$UUID" /media/usbhdd-a ext4 defaults 0 0" >> /etc/fstab
mount -a
# creation of data directory for Nextcloud
mkdir /media/usbhdd-a/nextcloud
mkdir /media/usbhdd-a/nextcloud/data
chown -R www-data:www-data /media/usbhdd-a/nextcloud
exit 0
The script is searching the unique ID of the partition you have previously created. Then it creates the location where the new storagy device is planned to be. Then it updates /etc/fstab and mount it afterwards.
In a second step I let it create my data location that I want to use for my cloud. Leave it away if you don’t need it or adapt it according to your needs.
My data directory for my Nextcloud is located here: /media/usbhdd-a. How you work with this is of course up to you. Don’t forget to assign the data directory in /path/to/nextcloud/config/config.php.