I process large datasets (1.500-2.500 images, 48MP) and have run into this problem: The default 250GB of disk space in WSL2 is not enough to run even one project! Unlike WSL however there is no obvious way to increase that.
Caution! This will probably cause you to lose any work in progress.
WSL commands run in Powershell tab, the rest in a linux tab in windows terminal.
Let me get to it:
- First thing you need to do is install a linux distribution from the windows app store i.e. Ubuntu 20.04 LTS.
- Next install “windows terminal” because it can do it all.
Now make it a WSL2 distro:
- Find out the name of your distro:
wsl --list --verbose
NAME STATE VERSION
- docker-desktop-data Running 2
docker-desktop Running 2
Ubuntu-20.04 Stopped 2
- If your distro Version is 1, then run
wsl --set-version <distro_name> 2
Quit Docker and run
Open Hyper-V Manager > Edit disk
ext4.vhdx and follow the wizard to increase it to whatever size you like. It will not take all that space up from your drive, it will increase as it need to. Note down the new size in MB.
- Start Docker (may need to run
On windows terminal open a tab of your linux distro. This is where we run the rest of the commands.
sudo mount -t devtmpfs none /dev
mount | grep /docker-desktop-data/isocache
The first result should start with /dev/sdX (X usually b or c, i.e. /dev/sdb)
sudo resize2fs /dev/sdb <sizeInMegabytes>M
You now have more space to process your flights. Diagnostics should show the new size as available disk space.
P.S.1 If you run multiple large projects, a dedicated drive of 1TB or more comes useful, especially if you want to keep them for a while.
P.S.2 Spilt projects take up huge space while running, almost 100GB per submodel and can fill up the space well before completing.