Skip to content

fallocate error in docker on Windows #79

@jeffbrl

Description

@jeffbrl

I am encountering an error with fallocate on Windows 11 and Docker Desktop using the WSL2 backend.

powershell> docker run -v .:/data -it --rm jeffbrl/ogxbox-image-builder /bin/bash
>>> from pyfatx import Fatx
>>> Fatx.create('/data/foo',8 * 1024 * 1024 * 1024)
fallocate: fallocate failed: Operation not supported
>>>

If I run the same commands from WSL2, I do not encounter the error.

I noticed that pyfatx uses different allocation behavior based on platform.

subprocess.run(['fallocate', '-l', str(size), path])

Is a change needed here to accommodate WSL2? If this change isn't too complex, I can submit the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions