Problems with setting up EXT4 partition to work with postgres on WSL
So, I've started setting up immich and only now read that postgres needs to be on a ext4 partition (I'm on Windows 10).
So, what I tried:
opened powershell as Administrator
ps:wmic diskdrive list brief wsl --mount \.\PHYSICALDRIVE5 --bare wsl -d Ubuntu
wsl:sudo fdisk -l sudo fdisk /dev/sdf
Welcome to fdisk (util-linux 2.39.3). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): First sector (2048-1000215215, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1000215215, default 1000215215): +5120M Created a new partition 1 of type 'Linux' and of size 5 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.exit
In Windows' partitionmanager the drive shows up as offline ps:wsl --unmount \.\PHYSICALDRIVE5
it's online again, was locked before... But now I can't access the ext4 partition from wslwsl --mount \.\PHYSICALDRIVE5 --partition 1 --bare wsl -d Ubuntu
wsl:sudo fdisk -l
both partitions (so, the whole disk) show up. the disk is offline again. I tried only mounting the specific partition, but I guess that didn't work.The question I have now is how do I set it up on windows? I've seen people succeed here, so I'm obviously missing something.
17 Replies
:wave: Hey @Kai,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.I mean, I have a problem in the setup phase, and I know what the problem is, so I don't think yall need any logs
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
I did, which is why I tried all that.
I need an ext4 partition for it to work in the first place
which is why I made one, but it isn't usable for me atm
so idk
No, it just boils down to "when in WSL, use a docker volume"
sorry for asking, but how exactly do I do that?
Is there something missing there at the bottom?
volumes:
model-cache:
+ pgdata:
what comes under that?
nothing
oh
This is how you define a docker volume (well two in this case):
oh
and it'll work it out?
If yuo also change the DB_DATA_LOCATION, yes
Be aware that if you run
docker compose down -v
you will lose your database
the -v
means "remove all volumes"yeah, I did that, but I read that it wouldn't work on ntfs and figured I should make an ext4
cheers, I'll try it now
^^
my machine doesn't boot after a restart. great.
tried cold booting, nothing
I'll nap for a bit and try something later
maybe it's just the RAM, I got some spare sticks to test it
yup, cpu dead, fuuck
it's a modded gaming laptop, too, so I can't even replace it
welp, twas fun while it lasted
👀 was it an old beast?
It was more than 5 years old, so like 80 in laptop years
I'll just have to transfer the data from it's SSDs to my external HDDs for the time being
I'll keep the SSDs for when I build a PC ig
Just make sure to check their health
They may be degraded
will do, cheers.
got a pc for cheap, will try again next week or so :D