How to Use Second HDD in Nextcloud

I am a bit desperate, I have installed the Nextcloud AIO on a docker container in a PC on an SSD. There is also a 4TB HDD installed in the PC. I would now like to use the storage in my Nextcloud server.

I have already posted several times in this forum but somehow I never came to a result or did not understand the instructions, I am still a beginner in the Linux/Docker area.

I have also asked ChatGPT for help but all instructions have not changed the situation.

Can someone help me how to integrate the 2nd hard disk (HDD) into my Linux Docker on the SSD? Thanks for everything!

Hi, maybe this helps? GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Thanks for the link, unfortunately I didn’t really get anywhere with it. I can’t even add “local” to external storage. My knowledge of Linux/Docker does not seem to be sufficient.

I’ll have to try again these days to get to grips with it intensively
I will get back to you when I have read through more forum articles and have something to show to solve the problem

I think you can only use one path. You must solve it in linux not Nextcloud.

What ever the issue is we can help you out here just post the requested outputs and someone will solve it for you.

This 4 TB HDD is this empty and only for data storage ?

Where is this 4TB hdd mounted ?

are you familiar with > mounting / fstab / chown / chmod ?

Do you want to add 4TB to your current data or you want to move the current data to the 4TB hdd and set that as default data directory ?

check this page for changing your main data directory to a different one

Thanks for the reply and sorry for the late reply, I’ve been busy at work.
at the moment it looks like the screenshot.
This is the SSD where the Docker container is running

The HDD already contains data from the old NAS.
The HDD is to be added in addition to the SSD.

are you familiar with > mounting / fstab / chown / chmod ?
– I am remotely familiar with it, but I am willing to read up on it again

Where is this 4TB hdd mounted ?
– i am not sure


you disk seems to be in a raid 1 setup and inside a LVM container which is odd as raid usually require multiple disks.

never the less the 4 Tb seems to be added to raid under /dev/md/2 or /dev/md2

on this raid array there is a LVM /dev/vg1/volume_1

check the output of

cat /proc/mdstat

this will tell if the raid is complete and working
check the output of

sudo pvs
sudo lvs

the first one shows physical drives setup in the LVM ex. /dev/sdX or /dev/md2
the 2nd one shows the Logic Volumes
check the output of mount and see if /dev/md2 and/or /dev/vg1 or /dev/mapper/vg1 are there maybe /dev/vg1-volume_1

this will tell if the drive is mounted and accessible

here the output

root@flexserver:/home/flexhome# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda1[0]
3896291584 blocks super 1.2 [1/1] [U]

unused devices:
root@flexserver:/home/flexhome# sudo pvs
WARNING: PV /dev/md2 in VG vg1 is using an old PV header, modify the VG to update.
PV VG Fmt Attr PSize PFree
/dev/md2 vg1 lvm2 a-- <3,63t 796,00m
root@flexserver:/home/flexhome# sudo lvs
WARNING: PV /dev/md2 in VG vg1 is using an old PV header, modify the VG to update.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
syno_vg_reserved_area vg1 -wi-a----- 12,00m
volume_1 vg1 -wi-ao---- <3,63t

But I can’t do anything with it, I’m not that familiar with linux sorry

I see in your post your already logged in as root so adding sudo is obsolete
The first command completed ok so your raid is in order.

The second and 3rd command resulted in a error. most likely the disk came from a system with older LVM version. you can check the header

pvck --dump headers /dev/md2| grep extension.v

this should show “pv_header_extension.version 1”
if that is the case run

vgck --updatemetadata vg1

this should solve that warning which you can verify by running any lvm command
pvs, lvs, vgck vg1

Next we find out what partition type is used we need this to be able to mount the disk.

fsck -N /dev/mapper/vg1-volume_1

it will show "[/usr/sbin/fsck.[TYPE] (1) – /dev/mapper/vg1-volume_1] fsck.[TYPE] /dev/mapper/vg1-volume_1 we need the [TYPE] ex. ext2, ext3, ext4, xfs, bfs, ntfs, exfat

mount your disk somewhere ex. /mnt/4tb

mkdir -p /mnt/4tb
mount -t [TYPE] /dev/mapper/vg1-volume_1 /mnt/4tb

check for existing data or report any errors back.

root@flexserver:/home/flexhome# pvck --dump /dev/md2 | grep “extension.v”
bash: pvck: Command not found.
ohhhm i forgot something?

you forgot the headers but that would not solve command not foud.


 which pvck

if it’s not found you might need to check if lvm2 is installed. I don’t know your OS but you can try

dpkg -l |grep lvm
root@flexserver:/home/flexhome# which pvck
root@flexserver:/home/flexhome# dpkg -l |grep lvm
ii  libllvm15:amd64                         1:15.0.6-4+b1                        amd64        Modular compiler and toolchain technologies, runtime library
ii  liblvm2cmd2.03:amd64                    2.03.16-2                            amd64        LVM2 command library
ii  lvm2                                    2.03.16-2                            amd64        Linux Logical Volume Manager

is installed but still no command found 0_o i work with Debian

It is weird that it’s not found.

how do you gain root shell access?

all lvm commands lead to lvm so you can just run it directly since pvs and lvs works lvm must be installed.

lvm pvck --dump headers /dev/md2 | grep n.version
lvm vgck --updatemetadata vg1

or enter lvm directly by just entering


you can then run

lvm> pvck ....
lvm> vgck ....
lvm> exit

is it possible that you’re using some desktop-distro that manages all the disks for with a gui-tool? it might be worth a try using this tool (but be careful).
(I’ve seen the weirdest single-disk lvm-configs done by ubuntu-desktop-installs.)

root@flexserver:~# pvck --dump headers /dev/md2| grep extension.v
pv_header_extension.version 2
root@flexserver:~# vgck --updatemetadata vg1
root@flexserver:~# fsck -N /dev/mapper/vg1-volume_1
fsck from util-linux 2.38.1
[/usr/sbin/fsck.ext4 (1) – /mnt/nextcloud_external] fsck.ext4 /dev/mapper/vg1-volume_1
root@flexserver:~# mkdir -p /mnt/4tb
mount -t ext4 /dev/mapper/vg1-volume_1 /mnt/4tb
mount: /mnt/4tb: /dev/mapper/vg1-volume_1 is already mounted on /mnt/nextcloud_external.
dmesg(1) might provide more information after a failed mount system call
could provide further information.

it seems to be working but it is still not findable in Nextcloud. frustrating,

Hi, have you seen this?

i tried to solve the problem again today, but now nextcloud starts but i can’t reach it either externally or internally. i’m getting fed up. Either I am too stupid to get it right even with a really very good documentation. or something is just not right. Give it up… Thanks!

now try one last time to install directly on the HDD.