Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

❯ ERROR: Could not allocate a file for the system disk. #281

Closed
chaunceyPan opened this issue Jun 27, 2023 · 13 comments
Closed

❯ ERROR: Could not allocate a file for the system disk. #281

chaunceyPan opened this issue Jun 27, 2023 · 13 comments

Comments

@chaunceyPan
Copy link

I use docker for windows and it gives an error during initialization.
❯ Starting Virtual DSM for Docker v4.08...
dsm | ❯ Install: Downloading DSM_VirtualDSM_64570.pat...
dsm |
dsm | 0K ........ ........ ........ ........ 8% 5.90M 55s
dsm | 32768K ........ ........ ........ ........ 17% 9.09M 41s
dsm | 65536K ........ ........ ........ ........ 26% 10.3M 33s
dsm | 98304K ........ ........ ........ ........ 35% 9.00M 28s
dsm | 131072K ........ ........ ........ ........ 44% 9.95M 23s
dsm | 163840K ........ ........ ........ ........ 53% 8.88M 19s
dsm | 196608K ........ ........ ........ ........ 62% 8.82M 15s
dsm | 229376K ........ ........ ........ ........ 71% 9.44M 12s
dsm | 262144K ........ ........ ........ ........ 80% 8.37M 8s
dsm | 294912K ........ ........ ........ ........ 89% 9.51M 4s
dsm | 327680K ........ ........ ........ ........ 98% 10.0M 1s
dsm | 360448K ..... 100% 10.1M=40s
dsm |
dsm | ❯ Install: Extracting downloaded image...
dsm | fallocate: fallocate failed: Operation not supported
dsm | ❯ ERROR: Could not allocate a file for the system disk.

Does it not support NTFS format hard disk?My configuration is as follows
volumes:
- J:/dsm:/storage

@kroese
Copy link
Collaborator

kroese commented Jun 27, 2023

Can you see if it makes a difference if you set ALLOCATE to N?

@chaunceyPan
Copy link
Author

it's still wrong

❯ Starting Virtual DSM for Docker v4.08...
❯ Install: Downloading installer...
❯ Install: Downloading DSM_VirtualDSM_64570.pat...
❯ Install: Extracting downloaded image...
❯ Starting Virtual DSM for Docker v4.08...
0K ........ ........ ........ ........ 8% 5.03M 65s
32768K ........ ........ ........ ........ 17% 5.01M 58s
65536K ........ ........ ........ ........ 26% 7.03M 47s
98304K ........ ........ ........ ........ 35% 8.63M 38s
131072K ........ ........ ........ ........ 44% 7.61M 31s
163840K ........ ........ ........ ........ 53% 6.30M 26s
196608K ........ ........ ........ ........ 62% 6.85M 21s
229376K ........ ........ ........ ........ 71% 6.90M 16s
262144K ........ ........ ........ ........ 80% 5.58M 11s
294912K ........ ........ ........ ........ 89% 5.07M 6s
327680K ........ ........ ........ ........ 98% 6.19M 1s
360448K ..... 100% 8.20M=57s
fallocate: fallocate failed: Operation not supported
❯ ERROR: Could not allocate a file for the system disk.

version: "3"
services:
dsm:
container_name: dsm
image: kroese/virtual-dsm:latest
environment:
DISK_SIZE: "256G"
ALLOCATE: "N"
devices:
- /dev/kvm
- /dev/vhost-net
cap_add:
- NET_ADMIN
ports:
- 6000:5000
volumes:
- J:\dsm\config:/storage
restart: on-failure
stop_grace_period: 1m

@kroese
Copy link
Collaborator

kroese commented Jun 27, 2023

Do you use Win11 and have WSL2 enabled in Docker for Windows? Because last time I tested the container worked fine on Win11 (only not on Win10).

Maybe its a permission error? That it does not have the rights to write in that folder. Can you see if it makes a changes if you use a different one (or a docker volume)?

Also, another note: dont map the port to 6000 because it doesnt work in Chrome (its a reserved port), use 6001 or anything else.

@chaunceyPan
Copy link
Author

Yes, I'm using wsl2 docker for windows on windows11.Can you show me your config?I don't want to install DSM on C drive.Thanks for the reminder, I will use 6001

@kroese
Copy link
Collaborator

kroese commented Jun 27, 2023

The only difference is that I did not use a directory bind, but just used a docker volume (so without that volumes part in the compose file).

I will see if I have some time to test if it works with folders too, and if not, I need to modify the code to use another method when the fallocate function fails. So Im sure its solveable in the end, but nobody ever reported this issue before.

@chaunceyPan
Copy link
Author

I used a docker volume, it was successful

@kroese
Copy link
Collaborator

kroese commented Jun 27, 2023

Yes but the docker volumes are stored on your C drive, so maybe you can modify in the settings that you want to store them on the J drive?

@chaunceyPan
Copy link
Author

But wsl2 is installed on the C drive

kroese added a commit that referenced this issue Jul 3, 2023
kroese added a commit that referenced this issue Jul 3, 2023
kroese added a commit that referenced this issue Jul 3, 2023
Fix issue #281 and #283
@kroese
Copy link
Collaborator

kroese commented Jul 3, 2023

@chaunceyPan The problem should now be fixed in the latest version (v4.09), please test if it works with directory mounts correctly now.

@kroese
Copy link
Collaborator

kroese commented Jul 10, 2023

@chaunceyPan Can you confirm the issue is fixed in the latest release? Otherwise I close this issue.

@kroese kroese closed this as completed Jul 12, 2023
@coolspot18
Copy link

coolspot18 commented Jul 18, 2023

Directory mounts are still an issue - I'm getting the following:

2023-07-18T04:14:44.884287524Z ❯ Starting Virtual DSM for Docker v4.10... 2023-07-18T04:14:45.396041692Z ❯ Install: Downloading DSM_VirtualDSM_64570.pat... 2023-07-18T04:14:45.615470620Z 2023-07-18T04:14:45.978806674Z 0K ........ ........ ........ ........ 8% 75.6M 4s 2023-07-18T04:14:46.341661674Z 32768K ........ ........ ........ ........ 17% 89.4M 4s 2023-07-18T04:14:46.689295758Z 65536K ........ ........ ........ ........ 26% 91.6M 3s 2023-07-18T04:14:47.033109353Z 98304K ........ ........ ........ ........ 35% 92.3M 3s 2023-07-18T04:14:47.354359629Z 131072K ........ ........ ........ ........ 44% 101M 2s 2023-07-18T04:14:47.712886854Z 163840K ........ ........ ........ ........ 53% 89.3M 2s 2023-07-18T04:14:48.059129105Z 196608K ........ ........ ........ ........ 62% 91.7M 1s 2023-07-18T04:14:48.417080314Z 229376K ........ ........ ........ ........ 71% 93.5M 1s 2023-07-18T04:14:48.764241003Z 262144K ........ ........ ........ ........ 80% 87.8M 1s 2023-07-18T04:14:49.103730195Z 294912K ........ ........ ........ ........ 89% 95.6M 0s 2023-07-18T04:14:49.464297421Z 327680K ........ ........ ........ ........ 98% 88.8M 0s 2023-07-18T04:14:49.499133786Z 360448K ..... 100% 111M=4.0s 2023-07-18T04:14:49.499158146Z 2023-07-18T04:14:49.501460920Z ❯ Install: Extracting downloaded image... 2023-07-18T04:14:51.549169476Z ❯ ERROR: Not enough free space to create a 4 GB system disk.

Looks like I have to set "Allocate N" to bypass this error?

@kroese
Copy link
Collaborator

kroese commented Jul 18, 2023

It says you dont have 4GB of diskspace available. Even ALLOCATE=N will not help, because that setting is for the data-disk and the 4GB is needed for the system-disk.

@coolspot18
Copy link

It says you dont have 4GB of diskspace available. Even ALLOCATE=N will not help, because that setting is for the data-disk and the 4GB is needed for the system-disk.

On shoots, my docker partition was indeed out of space!

kroese added a commit that referenced this issue Dec 6, 2023
kroese added a commit that referenced this issue Dec 6, 2023
kroese added a commit that referenced this issue Dec 6, 2023
Fix issue #281 and #283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants