Hello,
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!
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
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
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
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
root@flexserver:/home/flexhome#
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.
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.)
GOOD LUCK!
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,
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.