<p>You can tell the Raspberry Pi to use your usb drive as your root file system (rootfs). That would fix the problem. </p>

<p>I am also running a full node on RPi 4 and a 1TB SSD, and what I did was to flash Rasbian in the SSD as well as in the SD card. Then, after booting for the first time the RPi with the SD card and with the SSD <strong>unplugged</strong>, I told the RPi to boot from the SSD like this:</p>

<ol>
<li>Connect your USB Hard drive to the RPi. </li>
<li>Change the id of the drive to something different so the RPi can differentiate the SD card from the drive. Let's set the id to <strong>0xd34db33f</strong> by doing this:</li>
</ol>

<pre><code>sudo fdisk /dev/sda
</code></pre>

<p>Enter the next values to the options that are going to pop up next:</p>

<pre><code>Command (m for help): p
Command (m for help): x
Expert command (m for help): i
Enter the new disk identifier: 0xd34db33f
Expert command (m for help): r
Command (m for help): w
</code></pre>

<ol start="3">
<li>Check that the PARTUUID of the SD card and the drive are different now by using the following command:</li>
</ol>

<pre><code>sudo blkid
</code></pre>

<p>the "/dev/mmcblk0p1" and "/dev/mmcblk0p1" are referencing the SD card, and the "/dev/sda1" and "/dev/sda2" are referencing the drive. So the PARTUUID of the sda1 and sda2 must be the one that we just setup (d34db33f) followed by a dash and the number of the partition.</p>

<ol start="4">
<li>Modify the cmdline.txt file to tell the RPi to boot from your drive like this:</li>
</ol>

<pre><code>sudo cp /boot/cmdline.txt /boot/cmdline.txt.bak
sudo nano /boot/cmdline.txt
</code></pre>

<p>Once in the file, find the variable <strong>root=PARTUUID=#######-02</strong> and change it to the one that we just set. The line should look like this:</p>

<pre> console=serial0,115200 console=tty1 root=PARTUUID=<b>d34db33f-02</b> rootfstype=ext4....</pre>

<p>Exit by pressing CTRL + X, Then "Y" to save changes, and then ENTER to confirm.<br><br></p>

<ol start="5">
<li>Reboot the RPi:</li>
</ol>

<pre><code>sudo reboot
</code></pre>

<ol start="6">
<li>Make sure the RPi is booting from the drive:</li>
</ol>

<pre><code>findmnt -n -o SOURCE /
</code></pre>

<p>if it shows <pre>dev/sda2</pre> then your good. If not, just recover your cmdline.txt file by using the backup we saved, and start over.<br><br></p>

<ol start="7">
<li>Finally, we will tell the RPi to mount automatically the drive and use it as the file system by modifying the fstab file:</li>
</ol>

<pre><code>sudo nano /etc/fstab
</code></pre>

<p>Once in the file editor, modify the <b>second</b> PARTUUID to the id we setup earlier. The file should look like this after modification:</p>

<pre>
proc            /proc           proc    defaults          0       0
PARTUUID=########-01  /boot           vfat    defaults          0       2
PARTUUID=<b>d34db33f-02</b>  /               ext4    defaults,noatime  0       1
</pre>

<p>CTRL + X, Y, and ENTER to save changes.</p>

<ol start="8">
<li>Reboot the RPi again, and That's it!</li>
</ol>

<p>I had to resize my SSD after this, but I am not sure if you will have to. If you do, or if you need more details, this is the tutorial I followed:</p>

<p><a href="https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/" rel="nofollow noreferrer">https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/</a></p>

<p>All credits for the guy of the tutorial.</p>

CC BY-SA 4.0
2020-04-17T02:33:00.460Z
2020-04-17T07:09:40.367Z
2020-04-17T07:09:40.367Z
Oscar Serna
<p>I was following <a href="https://medium.com/@meeDamian/bitcoin-full-node-on-rbp3-revised-88bb7c8ef1d1" rel="nofollow noreferrer">@meeDamian</a> Bitcoin node guide on a Raspberry Pi 3 and could get almost everything to work except that it stores the Blockchain on my USB Harddrive. Its mounted and I have disk space but it puts everything in my root folder. </p>

<p>Where and how can I specify that it gets stored on my USB Drive and can I just the delete the files in folder "blocks"</p>

<p>Thanks for your help</p>

<p>IMG: Node Logfile + Filesystem</p>

<p><a href="https://i.sstatic.net/UpaAT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UpaAT.png" alt="Bitcoin Log + Filesystem"></a></p>

CC BY-SA 4.0
2020-04-16T09:12:34.537Z
You have `/dev/sda1` mounted at `/mnt/hdd`. Maybe you should mount it at `~/.bitcoin` instead. ALternatively you could make `~/.bitcoin` a symbolic link to a directory under `/mnt/hdd`. It will be necessary to backup (e.g. `tar` or rename) the existing contents of `~/.bitcoin` before making either change and restore afterwards.
RedGrittyBrick
CC BY-SA 4.0
2020-04-17T09:42:54.823Z
Hi thanks, It now works. I had to copy the .bitcoin folder onto my USB drive first and than delete the original .bitcoin. After that the symbolic link worked fine. Before that the symbolic link always created a subfolder as if its not allowed to change the folder type from regular folder to symbolic link.
imbafisk4tw
<full-node><database><raspberry-pi>
Raspberry Pi 3 / Bitcoin Node / No space left on device / Link Database to External Hard drive /
imbafisk4tw
# Raspberry Pi 3 / Bitcoin Node / No space left on device / Link Database to External Hard drive /

(Asked by: username_0 on 2020-04-15)

I was following [@meeDamian](https://medium.com/@meeDamian/bitcoin-full-node-on-rbp3-revised-88bb7c8ef1d1) Bitcoin node guide on a Raspberry Pi 3 and could get almost everything to work except that it stores the Blockchain on my USB Harddrive. Its mounted and I have disk space but it puts everything in my root folder.

Where and how can I specify that it gets stored on my USB Drive and can I just the delete the files in folder "blocks"

Thanks for your help

IMG: Node Logfile + Filesystem

[![Bitcoin Log + Filesystem](https://i.sstatic.net/UpaAT.png)](https://i.sstatic.net/UpaAT.png)

**Tags:** full-node, database, raspberry-pi

> **Comments:**
> **username_1**: You have `/dev/sda1` mounted at `/mnt/hdd`. Maybe you should mount it at `~/.bitcoin` instead. ALternatively you could make `~/.bitcoin` a symbolic link to a directory under `/mnt/hdd`. It will be necessary to backup (e.g. `tar` or rename) the existing contents of `~/.bitcoin` before making either change and restore afterwards.  
> **username_0**: Hi thanks, It now works. I had to copy the .bitcoin folder onto my USB drive first and than delete the original .bitcoin. After that the symbolic link worked fine. Before that the symbolic link always created a subfolder as if its not allowed to change the folder type from regular folder to symbolic link.  

---

## 1 answers

### Answer by username_2 on 2020-04-17. Score: 0

You can tell the Raspberry Pi to use your usb drive as your root file system (rootfs). That would fix the problem.

I am also running a full node on RPi 4 and a 1TB SSD, and what I did was to flash Rasbian in the SSD as well as in the SD card. Then, after booting for the first time the RPi with the SD card and with the SSD **unplugged**, I told the RPi to boot from the SSD like this:

1. Connect your USB Hard drive to the RPi.
2. Change the id of the drive to something different so the RPi can differentiate the SD card from the drive. Let's set the id to **0xd34db33f** by doing this:

```
sudo fdisk /dev/sda

```

Enter the next values to the options that are going to pop up next:

```
Command (m for help): p
Command (m for help): x
Expert command (m for help): i
Enter the new disk identifier: 0xd34db33f
Expert command (m for help): r
Command (m for help): w

```

3. Check that the PARTUUID of the SD card and the drive are different now by using the following command:

```
sudo blkid

```

the "/dev/mmcblk0p1" and "/dev/mmcblk0p1" are referencing the SD card, and the "/dev/sda1" and "/dev/sda2" are referencing the drive. So the PARTUUID of the sda1 and sda2 must be the one that we just setup (d34db33f) followed by a dash and the number of the partition.

4. Modify the cmdline.txt file to tell the RPi to boot from your drive like this:

```
sudo cp /boot/cmdline.txt /boot/cmdline.txt.bak
sudo nano /boot/cmdline.txt

```

Once in the file, find the variable **root=PARTUUID=#######-02** and change it to the one that we just set. The line should look like this:

```
 console=serial0,115200 console=tty1 root=PARTUUID=d34db33f-02 rootfstype=ext4....
```

Exit by pressing CTRL + X, Then "Y" to save changes, and then ENTER to confirm.

5. Reboot the RPi:

```
sudo reboot

```

6. Make sure the RPi is booting from the drive:

```
findmnt -n -o SOURCE /

```

if it shows

```
dev/sda2
```

then your good. If not, just recover your cmdline.txt file by using the backup we saved, and start over.  
  

7. Finally, we will tell the RPi to mount automatically the drive and use it as the file system by modifying the fstab file:

```
sudo nano /etc/fstab

```

Once in the file editor, modify the **second** PARTUUID to the id we setup earlier. The file should look like this after modification:

```

proc            /proc           proc    defaults          0       0
PARTUUID=########-01  /boot           vfat    defaults          0       2
PARTUUID=d34db33f-02  /               ext4    defaults,noatime  0       1

```

CTRL + X, Y, and ENTER to save changes.

8. Reboot the RPi again, and That's it!

I had to resize my SSD after this, but I am not sure if you will have to. If you do, or if you need more details, this is the tutorial I followed:

<https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/>

All credits for the guy of the tutorial.


---

