[GH-ISSUE #2232] Error: error loading model /root/.ollama/models/blobs when I use any other directory for the volume. #1280

Closed
opened 2026-04-12 11:05:05 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @jds11111 on GitHub (Jan 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2232

I am using docker-compose to create both the server and webgui of ollama. These compile fine. Going to either port shows that both are running. There are no errors in the logs. However, if I use exec in the container, or go to a console in portainer, there are problems loading any model (I tried openchat and llama2). It downloads the files fine, but then ends with the above error statement:

oot@c19165979f14:~/.ollama# ollama run openchat
pulling manifest 
pulling 1cecc26325a1... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.1 GB                         
pulling 43070e2d4e53... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏  11 KB                         
pulling d68706c17530... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏   98 B                         
pulling 415f0f6b43dd... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏   65 B                         
pulling 278996753456... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏  483 B                         
verifying sha256 digest 
writing manifest 
removing any unused layers 
success 
Error: error loading model /root/.ollama/models/blobs/sha256:1cecc26325a197571a1961bfacf64dc6e35e0f05faf57d3c6941a982e1eb2e1d

The problem seems to stem from trying to use a chosen directory to store all the data, instead of using /data/compose. If I use

version: '3.8' 

services:
  ollama-server:
    image: ollama/ollama
    container_name: ollama-server
    volumes:
      - ./ollama:/root/.ollama
    restart: unless-stopped
    ports:
      - '11434:11434'

then I can load models fine. However, if I change that volume to something else, it fails. Changing permissions on that volume does not help.

Originally created by @jds11111 on GitHub (Jan 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2232 I am using docker-compose to create both the server and webgui of ollama. These compile fine. Going to either port shows that both are running. There are no errors in the logs. However, if I use exec in the container, or go to a console in portainer, there are problems loading any model (I tried openchat and llama2). It downloads the files fine, but then ends with the above error statement: ``` oot@c19165979f14:~/.ollama# ollama run openchat pulling manifest pulling 1cecc26325a1... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 4.1 GB pulling 43070e2d4e53... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling d68706c17530... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 98 B pulling 415f0f6b43dd... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 65 B pulling 278996753456... 100% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏ 483 B verifying sha256 digest writing manifest removing any unused layers success Error: error loading model /root/.ollama/models/blobs/sha256:1cecc26325a197571a1961bfacf64dc6e35e0f05faf57d3c6941a982e1eb2e1d ``` The problem seems to stem from trying to use a chosen directory to store all the data, instead of using `/data/compose`. If I use ``` version: '3.8' services: ollama-server: image: ollama/ollama container_name: ollama-server volumes: - ./ollama:/root/.ollama restart: unless-stopped ports: - '11434:11434' ``` then I can load models fine. However, if I change that volume to something else, it fails. Changing permissions on that volume does not help.
Author
Owner

@jukofyork commented on GitHub (Jan 28, 2024):

Have you tried to create a symlink to the other volume?

<!-- gh-comment-id:1913710097 --> @jukofyork commented on GitHub (Jan 28, 2024): Have you tried to create a symlink to the other volume?
Author
Owner

@jds11111 commented on GitHub (Jan 28, 2024):

Have you tried to create a symlink to the other volume?

No, I haven't, since idk how to do that. The directory is created by docker-compose automatically (with root owner, despite creating the container as user). I suppose that could be done after it is created by docker, and move everything? Would that persist on updates?

I suspected that maybe there was some assumption in the code about where it would be stored. It just seemed odd to me that we don't have the option to store the configuration wherever we want.

<!-- gh-comment-id:1913713027 --> @jds11111 commented on GitHub (Jan 28, 2024): > Have you tried to create a symlink to the other volume? No, I haven't, since idk how to do that. The directory is created by docker-compose automatically (with root owner, despite creating the container as user). I suppose that could be done after it is created by docker, and move everything? Would that persist on updates? I suspected that maybe there was some assumption in the code about where it would be stored. It just seemed odd to me that we don't have the option to store the configuration wherever we want.
Author
Owner

@luannbertaud commented on GitHub (Jan 29, 2024):

Hi, can you try to set the env variable to the new folder in the container ?

<!-- gh-comment-id:1914378012 --> @luannbertaud commented on GitHub (Jan 29, 2024): Hi, can you try to set the [env variable](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-set-them-to-a-different-location) to the new folder in the container ?
Author
Owner

@jds11111 commented on GitHub (Jan 29, 2024):

Hi, can you try to set the env variable to the new folder in the container ?

Ahh, I missed that in the FAQs---my bad. Many thanks!

<!-- gh-comment-id:1915064724 --> @jds11111 commented on GitHub (Jan 29, 2024): > Hi, can you try to set the [env variable](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-set-them-to-a-different-location) to the new folder in the container ? Ahh, I missed that in the FAQs---my bad. Many thanks!
Author
Owner

@gleog6 commented on GitHub (Jul 20, 2025):

root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3
Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8

<!-- gh-comment-id:3094609009 --> @gleog6 commented on GitHub (Jul 20, 2025): root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3 Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8
Author
Owner

@york-cmd commented on GitHub (Jul 20, 2025):

这是来自QQ邮箱的假期自动回复邮件。
 
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

<!-- gh-comment-id:3094609697 --> @york-cmd commented on GitHub (Jul 20, 2025): 这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Author
Owner

@milcent-CVM commented on GitHub (Jul 31, 2025):

root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3 Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8

Same here. Not happening with the other models, though. Only with smollm3

<!-- gh-comment-id:3141188730 --> @milcent-CVM commented on GitHub (Jul 31, 2025): > root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3 Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8 Same here. Not happening with the other models, though. Only with smollm3
Author
Owner

@jmcastagnetto commented on GitHub (Aug 7, 2025):

root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3 Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8

Same here. Not happening with the other models, though. Only with smollm3

OK, it might be something with ollama itself. I am using the latest version of ollama (as of today):

$ ollama --version
ollama version is 0.11.3

And tried a couple of smollm3 models in GGUF format from HuggingFace directly and gave the same error (omitting the pull info):

$ ollama run hf.co/unsloth/SmolLM3-3B-GGUF
pulling manifest 
(...)
verifying sha256 digest 
writing manifest 
success 
Error: 500 Internal Server Error: unable to load model: /usr/share/ollama/.ollama/models/blobs/sha256-4de907d2d388a5508fb7cb443a06effe14cce3518b0a78d3bdd9e74d9edce989

$ ollama run hf.co/ggml-org/SmolLM3-3B-GGUF
pulling manifest 
(...)
verifying sha256 digest 
writing manifest 
success 
Error: 500 Internal Server Error: unable to load model: /usr/share/ollama/.ollama/models/blobs/sha256-8334b850b7bd46238c16b0c550df2138f0889bf433809008cc17a8b05761863e

Just to check, I used llm (https://github.com/simonw/llm) that also has support for using GGUF models, and it worked with one of the unsloth GGUF files:

$ llm gguf download-model 'https://huggingface.co/unsloth/SmolLM3-3B-GGUF/resolve/main/SmolLM3-3B-Q4_1.gguf' --alias smollm3-hf
$ llm chat -m smollm3-hf
(...)
> what is a leap year?
<think>

</think>
A leap year is a year in the Gregorian calendar that has 366 days instead of the usual 365 days. This extra day is added to the month of February, making it a 29-day month instead of the usual 28 days. The purpose of a leap year is to keep the calendar in sync with the Earth's orbit around the Sun, which takes approximately 365.25 days to complete.

The extra day is added every four years, which is why leap years occur every four years. However, there are some exceptions to this rule. For example, years that are divisible by 100 are not leap years, unless they are also divisible by 400. This means that years like 1900 and 2100 are not leap years, but years like 2000 and 2400 are.

The leap year rule was introduced by Julius Caesar in 45 BCE, and it was later refined by Pope Gregory XIII in 1582. The current Gregorian calendar is the most widely used calendar in the world, and it is used by most countries, including the United States and the United Kingdom.
> 
<!-- gh-comment-id:3165046147 --> @jmcastagnetto commented on GitHub (Aug 7, 2025): > > root@leog66-ondaoliver leog66]# ollama run alibayram/smollm3 Error: unable to load model: /var/lib/ollama/.ollama/models/blobs/sha256-048b986bb243c09b5410fc9f73bdc5bf749bf8e24e1a703ca830c1b29b0267f8 > > Same here. Not happening with the other models, though. Only with smollm3 OK, it might be something with **ollama** itself. I am using the latest version of ollama (as of today): ``` $ ollama --version ollama version is 0.11.3 ``` And tried a couple of smollm3 models in GGUF format from HuggingFace directly and gave the same error (omitting the pull info): ``` $ ollama run hf.co/unsloth/SmolLM3-3B-GGUF pulling manifest (...) verifying sha256 digest writing manifest success Error: 500 Internal Server Error: unable to load model: /usr/share/ollama/.ollama/models/blobs/sha256-4de907d2d388a5508fb7cb443a06effe14cce3518b0a78d3bdd9e74d9edce989 $ ollama run hf.co/ggml-org/SmolLM3-3B-GGUF pulling manifest (...) verifying sha256 digest writing manifest success Error: 500 Internal Server Error: unable to load model: /usr/share/ollama/.ollama/models/blobs/sha256-8334b850b7bd46238c16b0c550df2138f0889bf433809008cc17a8b05761863e ``` Just to check, I used `llm` (https://github.com/simonw/llm) that also has support for using GGUF models, and it worked with one of the unsloth GGUF files: ``` $ llm gguf download-model 'https://huggingface.co/unsloth/SmolLM3-3B-GGUF/resolve/main/SmolLM3-3B-Q4_1.gguf' --alias smollm3-hf $ llm chat -m smollm3-hf (...) > what is a leap year? <think> </think> A leap year is a year in the Gregorian calendar that has 366 days instead of the usual 365 days. This extra day is added to the month of February, making it a 29-day month instead of the usual 28 days. The purpose of a leap year is to keep the calendar in sync with the Earth's orbit around the Sun, which takes approximately 365.25 days to complete. The extra day is added every four years, which is why leap years occur every four years. However, there are some exceptions to this rule. For example, years that are divisible by 100 are not leap years, unless they are also divisible by 400. This means that years like 1900 and 2100 are not leap years, but years like 2000 and 2400 are. The leap year rule was introduced by Julius Caesar in 45 BCE, and it was later refined by Pope Gregory XIII in 1582. The current Gregorian calendar is the most widely used calendar in the world, and it is used by most countries, including the United States and the United Kingdom. > ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1280