Replace Hard Drive in NCP

Hi, i would replace my USB Drive with a new one of 2TB. I read many threads but i’m not sure which way to follow.

My new one HD is empty (no partition and no formatting applied).
My old one i believe is EXT2/EXT3 and with command

btrfs filesystem show

i receive nothing.

This is my ncp-report

NextCloudPi diagnostics

Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
NextCloudPi version  v1.40.4
NextCloudPi image    NextCloudPi_10-08-21
distribution         Debian GNU/Linux 10 \n \l
automount            yes
USB devices          sda sdb
datadir              /media/TOSHIBAHD/ncdata
data in SD           no
data filesystem      ext2/ext3
data disk usage      432G/465G
rootfs usage         2.6G/29G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    21.0.4.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            wlan0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               16min

Nextcloud configuration

Cannot load Zend OPcache - it was already loaded
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "22": "nextcloudpi",
            "11": "2001:b07:a2a:346d:9289:eb4:d42e:246b",
            "1": "192.168.0.15",
            "3": "nextcloudpi"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "21.0.4.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/media\/TOSHIBAHD\/ncdata\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "logfile": "\/media\/TOSHIBAHD\/ncdata\/nextcloud.log"
    }
}

Now at this point which is best way to replace hard drive ?

I read differents approaching ways: rsync, btrfs, ncp-web interface etc. but in each one there is a part not enough adapt for a “newbie” like me. Thanks in advance.

https://help.nextcloud.com/t/add-internal-second-hard-disk-to-add-more-storage/111175

https://help.nextcloud.com/t/how-do-you-use-multiple-hdds-in-nextcloud/7221

https://help.nextcloud.com/t/change-the-hard-drive-in-ncp/101626/2

https://help.nextcloud.com/t/replace-hard-drive-where-data-folder-is-on/25827

https://help.nextcloud.com/t/change-the-hard-drive-in-ncp/101626/10

https://help.nextcloud.com/t/nextcloudpi-hard-disk-change/107977

Read docs.nextcloudpi.com to see documentation

Thanks for the exhaustive answer.

What about this one?

Solved in this way:
First of all, my config is
Raspberry 4 with System in SDCard and DATA in USB Drive

To Attach a second USB Hard Drive, goto in web browser to reach NextCloudpi Installation
For me address is https://192.168.1.xxx/index.php/apps/nextcloudpi/

Now Activate Maintenance Mode.
In this way you can detach the first one USB Drive
Now attach the new one USB Hard Drive
And Choose nc-forma-usb.
Make sure that ONLY the new one USB drive that you want to format is plugged in.
Operation will destroy any data in the USB drive (in the new one).

Here you can assign a LABEL to the the new one USB Hard Drive.
Verify that automount option is ON.

After complete operation of formatting you can attach both USB Hard Drives and disable maintenance mode if formatting operation didn’t it yet.

Now you have 2 drives attached and verify with

sudo fdisk -l

Thanks for all.

2 Likes