Random tech help concerning block storage, not strictly Cloudron-related
-
Hope someone can shed light on where I'm going wrong.
I bought a storage server from Smarthost. The base drive is 20GB with an initially unformatted 2TB partition. I followed their basic directions (start with a GParted image, format both drives) and, as far as I can tell, have a functioning setup. I've installed runtipi on the 20GB partition, and everything works. I can mount and access and r/w files on the 2TB block storage partition from the Terminal and Cyberduck. BUT, when I try to enter their location in either NextCloud or Immich, it doesn't get recognized.
Mount point is /mnt/nextcloud-data
/etc/fstab reads (but I've tried with both /dev/vdb1 and this UUID)/dev/vda2 / ext4 defaults 0 1 /dev/vda3 none swap sw 0 0 #/dev/vdb1 /mnt/smarthost2tb ext4 defaults,noatime,nofail 0 0 #/dev/vdb1 /mnt/nextcloud-data ext4 defaults,noatime,nofail 0 0 UUID=9103a1db-dfb9-485f-8323-78c659bf75a1 /mnt/nextcloud-data ext4 defaults 0 2
Terminal shows me:
shane@vps:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sr0 11:0 1 1024M 0 rom vda 253:0 0 21G 0 disk ├─vda1 253:1 0 1M 0 part ├─vda2 253:2 0 20G 0 part / └─vda3 253:3 0 1G 0 part [SWAP] vdb 253:16 0 2T 0 disk └─vdb1 253:17 0 2T 0 part /mnt/nextcloud-data shane@vps:~$ blkid /dev/vdb1: LABEL="2TB" UUID="9103a1db-dfb9-485f-8323-78c659bf75a1" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="smarthost" PARTUUID="9f5a9568-bf6f-40a5-be0a-8ab78813e56a" /dev/vda2: UUID="3829960b-43f1-4d64-9bd9-2286e8c0345f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="6ce3cb20-e956-461a-837c-0fa241220ea3" /dev/vda3: UUID="1d5c9a7a-8436-4683-bbbb-d832ada0f66f" TYPE="swap" PARTLABEL="primary" PARTUUID="8d6d37b7-7628-4e32-9569-bc353ca79e23"
But when I enter
/mnt/nextcloud-data
in the External Storage settings for NextCloud it tells me it is wrong. Same when I tried Immich. I assume it would do the same in any Cloudron app.
WHAT??? What am I doing wrong? I did redo the partitions and saw that there was a 1MB amount before and after the 2TB parition... is that messing things up (I couldn't remove those either).
I figure it's down to syntax. I'm writing it wrong somehow, but hours of googling hasn't shown me anything specific. It's always, "mount your block storage and enter the mount point in the field, /mnt/xxxxx... blah blah blah". I've done it, and it doesn't work. Help!
EDIT: I just now added this remotely as a Volume, and it appears to have worked. But it doesn't locally (on the other server)!
EDIT 2: Though it seems to be mounted as a Volume, a few apps that I have tried to make use this will not do so because "sshfs volumes cannot be used as data directory". So I still don't know if it is working because I can't use a Cloudron app to copy anything to that remote block storage partition!
-
-
I appreciate the responses @joseph. They don't really answer my question, which is how to write the location of a remote block storage within an app like Immich or Nextcloud. It seems I can mount the server remotely, but that is the 20GB main partition... I need to use the 2TB block storage partition.
-
OK, let me reword the help with this scenario:
Help with syntax for using a block storage volume with bitcoind on docker
I can install Bitcoin which uses Docker. Once running, it starts downloading of course, but the partition that the dockerized bitcoin is on is only 20GB. I have a block storage partition mounted at /media/bs, and made a directory inside it called /media/bs/btc. I want the bitcoin docker image to use this for the Data directory.
There is no bitcoin.conf automatically created, but once bitcoin is running it tells me the default data directory is /root/.bitcoin (inside the docker container). I made a bitcoin.conf and copied it into that directory, and it says, datadir=/media/bs/btc. However, it then won't start, giving an error message that there is no such directory.
I then tried ln -s a directory inside /root/.bitcoin (in the docker container) to the mounted block storage partition, /media/bs/btc, but the same message.
However when I log into the server using Terminal, I can navigate to /media/bs and do whatever. SOOO
There must be some syntax issue behind this error. HOW do I write a datadir=, which is a mounted block storage partition, in bitoin.conf ??? DO I have to include a user, like ssh? Is there something like
info:/media/bs/btc
that is needed? Thank you!