Help with mounting the new filesystem

Hello!

I am having an issue mounting a new space for uploads. I am getting this when I look at the dashboard and a lot of the profile pictures arent showing up when you access someones profile.

I also indeed did go into the app container and checked if the uploads folder was there, it was.

Ive tried everything I could think of, I believe what happened is I did something stupid and tried MOUNTING ONTO the the /var/discourse/shared and it may of caused problems… I keep getting

and I have absoutley no idea how to fix this. Ive tried restoring from previous backups and that still did not fix it. Please someone help me!

Hi @Headless

Sorry you are having this issue.

Do you mind to:

# ls -l /var/discourse/shared 

and post the results so we can see the mount point you mentioned that is in this directory?

It will be easier to advise if we can see the actual “mount” you are talking about.

1 Like

Hi! Thanks for replying, I actually unmounted it when I first encountered this issue, but nevertheless ill show you that.
image

I ended up mounting it at image

Hi @Headless

So, as I understand now, you have a mounted disk partition and you want to use that partition as your uploads directory?

Is that the right understanding?

Yes correct, I did that and it works fine. However, I even tried not using the new volume and tried going back to the way things originally were. But I still get that error, while also having issues with loading profile pictures. I believe I may have really screwed up something and not entirely sure what I ended up doing.

As you can see below is what happens to profile pictures.
image

That’s OK… Where are your all your uploads now?

Let’s check and see what is going on:

First can you run this:

# find  /var/discourse/shared/standalone/uploads | wc -l

and post the results;

and then run this:

# find  /mnt/volume-fsn1-1/uploads | wc -l

and post that output?

Thanks.

1 Like

Sure thing, currently I have moved all the uploads back onto the volume since putting the uploads back onto the main disk did not fix anything.

The first command asked was given the output of image

And the second commands output was
image

I appreciate the help!

No problemo…

Bear with me…

I think there are two issues, to address.

First, I think you need to move your old uploads directory (for now, temporarily) and then create a symbolic link to your new directory, like so:

cd /var/discourse/shared/standalone
mv uploads uploads.orig
ln -sf /mnt/volume-fsn1-1/uploads ./uploads

Then after that is done, we will change the yml file (as it was originally) and let the symbolic link do the magic.

But before we do that, we also need to check permissions of the files in the /mnt partition, but first things first.

1 Like

So that uploads folder in /var/discourse/shared/standalone is always empty because it gets created upon build the app. Nevertheless ill do exactly that.

So now I have the symbolic link,

here is a ls -l command on the /mnt directory image

Bear with me…

Let’s check this first:

ls -l /var/discourse/shared/standalone

just to make sure since I cannot see the symlink…

image

sure thing

Great, sorry to be so detailed oriented…

So, lets’ enter the app and check things out.

Do you mind to show me this:

(edited)

# cd /var/discourse/
./launcher enter app
# ls -l /shared/*

Thanks

Sure thing, this is what i am getting

even though if I enter the app with the launcher it shows up

here i try to fit everything in

Thanks, sorry, yes, I fat fingered the docker exec…

How about this (in the container)

ls -l /shared/uploads/*

image

Here you go!

So, i think it looks great… but to be 100% (bear with me), lets run this again:

find /shared/uploads | wc -l

and make sure we are good to go.

image

Here you go!

Hmmm.

Sorry, let’s do this…

find /shared/uploads/* | wc -l

since it is a symlink…

image

That seems to show it