<p>I always installed bitcoin from the tar.gz but now tried the snap but it uses a different data folder, so I removed the blocks, chainstate and indexes and replaced them with the same old symlink to my external drive I had used with 0.18.1 but no matter what I do, I get</p>
<pre><code>2021-02-02T22:03:42Z init message: Loading block index...
2021-02-02T22:03:42Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2021-02-02T22:03:42Z Opening LevelDB in /home/leo/snap/bitcoin-core/common/.bitcoin/blocks/index
2021-02-02T22:03:42Z Fatal LevelDB error: IO error: /home/leo/snap/bitcoin-core/common/.bitcoin/blocks/index/LOCK: Permission denied
</code></pre>
<p>but the permissions on that file are the exact same as on the file bitcoin-core creates in the default folder. I also tried to move the default folder around and <code>symlink</code> it back to <code>blocks</code> but I get the same error.</p>
<p>I read that snap has tight restrictions on file access but don't see how or where that restrictions come into play. My main drive does not have 400GB available and I need indexing, not pruning. Is snap just not for me or can I store the blocks on my other drive after all?</p>

CC BY-SA 4.0
2021-02-12T13:38:25.337Z
Snap is restrictive like this by design. A symlink will not work. You will need to mount your drive somewhere in `/home/leo`, `/media/leo`, or `/mnt`, and then configure `bitcoind`/Bitcoin Core to use that directory as its datadir.
Jivan Pal
CC BY-SA 4.0
2021-02-15T13:53:14.480Z
Want to turn this into an acceptable answer? Something like "close bitcoin-core, edit file ???/bitcoin.conf adding datadir=/path/to/your/external/drive/folder, make sure your ??? folders with all the data are under that folder, start bitcoin-core".
Giszmo
<bitcoin-core>
How can I use a secondary disk for the blocks folder with the snap install?
Giszmo
# How can I use a secondary disk for the blocks folder with the snap install?

(Asked by: username_0 on 2021-02-02)

I always installed bitcoin from the tar.gz but now tried the snap but it uses a different data folder, so I removed the blocks, chainstate and indexes and replaced them with the same old symlink to my external drive I had used with 0.18.1 but no matter what I do, I get

```
2021-02-02T22:03:42Z init message: Loading block index...
2021-02-02T22:03:42Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2021-02-02T22:03:42Z Opening LevelDB in /home/leo/snap/bitcoin-core/common/.bitcoin/blocks/index
2021-02-02T22:03:42Z Fatal LevelDB error: IO error: /home/leo/snap/bitcoin-core/common/.bitcoin/blocks/index/LOCK: Permission denied

```

but the permissions on that file are the exact same as on the file bitcoin-core creates in the default folder. I also tried to move the default folder around and `symlink` it back to `blocks` but I get the same error.

I read that snap has tight restrictions on file access but don't see how or where that restrictions come into play. My main drive does not have 400GB available and I need indexing, not pruning. Is snap just not for me or can I store the blocks on my other drive after all?

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: Snap is restrictive like this by design. A symlink will not work. You will need to mount your drive somewhere in `/home/leo`, `/media/leo`, or `/mnt`, and then configure `bitcoind`/Bitcoin Core to use that directory as its datadir.  
> **username_0**: Want to turn this into an acceptable answer? Something like "close bitcoin-core, edit file ???/bitcoin.conf adding datadir=/path/to/your/external/drive/folder, make sure your ??? folders with all the data are under that folder, start bitcoin-core".  

---

## 0 answers

