[GH-ISSUE #1201] Issues with files written to /tmp #612

Closed
opened 2026-04-12 10:19:14 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jmont-dev on GitHub (Nov 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1201

I noticed that when creating modelfiles, ollama will write very large files to /tmp named similarly to /tmp/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b2640781174

This is causing a few issues. First, /tmp is frequently part of a separate logical volume than /home/ and other partitions. In my case, /tmp is much smaller than my other filesystems (about 20G of space, and cannot be expanded) which is making generation of larger models fail due to filling up all of the disk space in that partition (an example is Goliath, which even as a Q_2 takes up 47GB of space).

Secondly, even if I create smaller modelfiles ollama appears to be doing some kind of a link or copying that fails due to the different filesystems. When I attempt to create a model from a 7B parameter base GGUF I receive the following error:

transferring context Error: rename /tmp/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b2640781174 /home/jmont/.ollama/models/blobs/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b: invalid cross-device link

A quick google search seems to associate that issue with creating hard links across different filesystems, though I'm not sure what ollama is doing under the hood.

These were all models that were working just fine in the last version of ollama that I had before updating. Is there any way to change this behavior so that these files can be written to a different location?

Originally created by @jmont-dev on GitHub (Nov 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1201 I noticed that when creating modelfiles, ollama will write very large files to /tmp named similarly to `/tmp/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b2640781174` This is causing a few issues. First, /tmp is frequently part of a separate logical volume than /home/ and other partitions. In my case, /tmp is much smaller than my other filesystems (about 20G of space, and cannot be expanded) which is making generation of larger models fail due to filling up all of the disk space in that partition (an example is Goliath, which even as a Q_2 takes up 47GB of space). Secondly, even if I create smaller modelfiles ollama appears to be doing some kind of a link or copying that fails due to the different filesystems. When I attempt to create a model from a 7B parameter base GGUF I receive the following error: transferring context Error: rename /tmp/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b2640781174 /home/jmont/.ollama/models/blobs/sha256:73bcb64521284e790e63aa8a017669fa5fa40448bc4895c500d7529e374aad7b: invalid cross-device link A quick google search seems to associate that issue with creating hard links across different filesystems, though I'm not sure what ollama is doing under the hood. These were all models that were working just fine in the last version of ollama that I had before updating. Is there any way to change this behavior so that these files can be written to a different location?
Author
Owner

@jmorganca commented on GitHub (Nov 20, 2023):

Hi @jmont-dev sorry you hit this issue. A fix is on it's way in the next release which will be coming out very soon and will not rely on /tmp directories. For now I'll merge this with https://github.com/jmorganca/ollama/issues/1181

<!-- gh-comment-id:1818210948 --> @jmorganca commented on GitHub (Nov 20, 2023): Hi @jmont-dev sorry you hit this issue. A fix is on it's way in the next release which will be coming out very soon and will not rely on `/tmp` directories. For now I'll merge this with https://github.com/jmorganca/ollama/issues/1181
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#612