Help mounting external HD

I’ve tried installing NCP so many times now I’ve lost count. My issues are always related to trying to get my external HD to work.

Method 1: Try to install using the configuration wizard when first installing

  1. Do you want to save Nextcloud data in a USB drive? --> Select Yes, no issues
  2. Plug in the USB drive and hit continue --> Plug it in and hit continue, no issues. In the bottom right corner nc-automount pops up in green
  3. If you want to prepare the USB drive to be used with NextCloudPi hit Format USB. Skip if already formated as ext4 or BTRFS. Attention! This will format your USB drive as BTRFS and will destroy any current data. --> Click Format USB, no issues. In the bottom right corner nc-format-USB pops up in green
  4. Move data to USB --> Issue. In the bottom right corner it says nc-datadir in orange and I get the error message /media/USBdirve does not exist.

At this point I go to look to see why that folder doesn’t exist and I see that my HD (sda1) is not mounted anywhere.
At this point I try to create the directory and mount it manually, but am met with a message saying I cannot do that because I already formatted it to btrfs filesystem which it doesn’t like.
At this point I start over.

Method 2: Mount it myself

  1. After Activating NCP, skip the configuration menu and plug in the external HD
  2. sudo mkfs.ext4 /dev/sda1 to format it to ext4
  3. sudo mkdir /media/USBdrive
    sudo mount /dev/sda1 /media/USBdrive to mount it to the directory /media/USBdrive
  4. In the NCP config panel, I can change my nc-database to /media/USBdrive/ncdatabase and nc-datadir to /media/USBdrive/ncdata without issue

If I reboot the device though, it always moves where the external HD is mounted
It will move to something crazy like /media/4fb3f0fa-67d6-4400-b055-313aa03795e3

Before reboot

After reboot


The exact same happens whether or not I have enabled nc-automount.

It looks like on subsequent reboots the name stays the same. Do I just create the directory and mount the drive and force a reboot before changing the default locations and then move the nc-datadir and nc-database to this directory with the crazy name?

It doesn’t seem like I can just rename the folder back to where it was as it always says “Device or resource busy”

Any help is greatly appreciated.

The default mount points are managed in /etc/fstab. There is probably already an entry for your disk (either /dev/sda… or a UUID). Just change the mount point to /media/USBdrive, then start again or umount and mount again.