{"id":2877,"date":"2025-02-05T12:00:16","date_gmt":"2025-02-05T13:00:16","guid":{"rendered":"https:\/\/fdswebdesign.com\/?p=2877"},"modified":"2025-02-11T23:40:56","modified_gmt":"2025-02-11T23:40:56","slug":"how-to-run-llm-from-external-hard-drive-with-ollama","status":"publish","type":"post","link":"https:\/\/fdswebdesign.com\/index.php\/2025\/02\/05\/how-to-run-llm-from-external-hard-drive-with-ollama\/","title":{"rendered":"How to Run LLM from External Hard Drive with Ollama"},"content":{"rendered":"

Want to run generative AI right on your Mac? There\u2019s where Ollama<\/a> comes in. But there\u2019s a problem \u2013 modern LLMs can eat up anywhere from 4GB to 40GB each, quickly filling up your internal drive.<\/p>\n

\"Setup<\/figure>\n

That\u2019s where this guide comes in \u2013 I\u2019ll show you how to install and run Ollama on your external drive, with all the LLMs you download stored right on your external drive so they don\u2019t take up space on your Mac\u2019s internal hard drive.<\/p>\n

In this step-by-step guide, I\u2019ll walk you through everything from installing Ollama to moving it to your external drive. Let\u2019s get started!<\/p>\n

Installing Homebrew<\/h4>\n

First, let\u2019s get Homebrew installed (skip this if you already have it). <\/p>\n

Homebrew makes installing Ollama super easy, plus it\u2019s handy if you ever want to uninstall Ollama<\/a> later.<\/p>\n

    \n
  1. Open Terminal (hit Cmd<\/kbd> + Space<\/kbd>, type \u201cTerminal,\u201d press Enter<\/kbd>)<\/li>\n
  2. Copy and paste this command:\n
    \/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"<\/code><\/pre>\n<\/li>\n
  3. Check if it worked:\n
    brew --version<\/code><\/pre>\n<\/li>\n<\/ol>\n

    Installing Ollama<\/h4>\n

    Now that we have Homebrew ready, installing Ollama is just two commands away:<\/p>\n

      \n
    1. Install it:\n
      brew install ollama<\/code><\/pre>\n<\/li>\n
    2. Verify it\u2019s installed:\n
      ollama --version<\/code><\/pre>\n<\/li>\n<\/ol>\n

      Note:<\/strong> If you see a message saying \u201cWarning: could not connect to a running Ollama instance<\/strong>\u201d \u2013 don\u2019t worry! That\u2019s normal since we haven\u2019t started Ollama<\/a> yet. As long as you see something like \u201cclient version 0.5.7<\/strong>\u201c, you\u2019re good to go.<\/p>\n

      \"Check<\/figure>\n

      Setting Up Ollama on Your External Drive<\/h4>\n

      By default, Ollama stores everything in a ~\/.ollama<\/code> folder on your Mac\u2019s internal drive. Let\u2019s move it to your external drive instead:<\/p>\n

        \n
      1. Connect your external drive to your Mac<\/li>\n
      2. Create an Ollama folder on your external drive:\n
        mkdir \/Volumes\/YourDriveName\/.ollama<\/code><\/pre>\n

        For example, if your drive is named \u201cMyDrive\u201d:<\/p>\n

        mkdir \/Volumes\/MyDrive<\/strong>\/.ollama<\/code><\/pre>\n<\/li>\n
      3. Move existing Ollama files to external drive:\n
        mv ~\/.ollama \/Volumes\/YourDriveName\/.ollama<\/code><\/pre>\n<\/li>\n
      4. Create a link so Ollama knows where to look:\n
        ln -s \/Volumes\/YourDriveName\/.ollama ~\/.ollama<\/code><\/pre>\n<\/li>\n<\/ol>\n

        Download and Run Your First LLM<\/h4>\n

        Time to get your first LLM running! Open Terminal and:<\/p>\n

          \n
        1. Start Ollama:\n
          ollama serve<\/code><\/pre>\n<\/li>\n
        2. Open a new Terminal window and download an LLM (let\u2019s try Llama 2<\/a>):\n
          ollama pull llama2<\/code><\/pre>\n

          The download will take a while since LLMs are pretty big files \u2013 could be several minutes or longer depending on your internet speed.<\/p>\n

          \"Downloading<\/figure>\n<\/li>\n
        3. Once downloaded, run it:\n
          ollama run llama2<\/code><\/pre>\n
          \"Running<\/figure>\n<\/li>\n<\/ol>\n

          That\u2019s it! You can now start chatting with Llama 2 via Ollama, all running from your external drive.<\/p>\n

          FAQ<\/h4>\n

          How do I check where my Ollama files are on the external drive?<\/h5>\n

          Everything\u2019s stored in your \/Volumes\/YourDriveName\/.ollama<\/code> folder. Models are in the models\/blobs<\/code> subfolder. <\/p>\n

          Type ls \/Volumes\/YourDriveName\/.ollama\/models\/blobs\/<\/code> in Terminal to see all your downloaded models.<\/p>\n

          How do I uninstall Ollama?<\/h5>\n

          Since we installed via Homebrew, just run:<\/p>\n

          brew uninstall ollama<\/code><\/pre>\n

          Then delete the .ollama <\/em>folder from your external drive.\n<\/p>\n

          How do I install more LLMs?<\/h5>\n

          Find more LLM you can download on Ollama\u2019s library page<\/a>, then use the pull command:<\/p>\n

          ollama pull modelname<\/code><\/pre>\n

          For example: ollama pull deepseek-r1<\/code> or ollama pull llama3.3<\/code>\n<\/p>\n

          How do I see all LLMs I\u2019ve downloaded?<\/h5>\n

          Run this command:<\/p>\n

          ollama list<\/code><\/pre>\n

          This shows all your installed models with their sizes.\n<\/p>\n

          How do I delete an LLM I don\u2019t use anymore?<\/h5>\n

          Use the remove command:<\/p>\n

          ollama rm modelname<\/code><\/pre>\n

          For example: ollama rm llama2<\/code>\n<\/p>\n

          Can I use my external drive with Ollama on another Mac?<\/h5>\n

          Yes. Follow the steps above to install Ollama on the other Mac, then create the symbolic link pointing to your external drive\u2019s .ollama <\/em>folder and connect your external drive. Your models will be ready to use without downloading them again.<\/p>\n

          The post How to Run LLM from External Hard Drive with Ollama<\/a> appeared first on Hongkiat<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

          Want to run generative AI right on your Mac? There\u2019s where Ollama comes in. But there\u2019s a problem \u2013 modern LLMs can eat up anywhere from 4GB to 40GB each, quickly filling up your internal drive. That\u2019s where this guide comes in \u2013 I\u2019ll show you how to install and run Ollama on your external…<\/p>\n","protected":false},"author":1,"featured_media":2879,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2877","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-inspiration"],"_links":{"self":[{"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/posts\/2877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/comments?post=2877"}],"version-history":[{"count":3,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/posts\/2877\/revisions"}],"predecessor-version":[{"id":2888,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/posts\/2877\/revisions\/2888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/media\/2879"}],"wp:attachment":[{"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/media?parent=2877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/categories?post=2877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fdswebdesign.com\/index.php\/wp-json\/wp\/v2\/tags?post=2877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}