HOW-TO Using 2 SDDs in umbrellos (in a simple and practical way)

This guide is based on using 2 ssd running on umbrelos in a mini pc (NUC). Starting from my own personal context where my NUC allows me to use 2 internal ssd. However, it also works for those who need to connect a second ssd externally.

It is important to clarify that my intention is to have the entire blockchain of my bitcoin node available, in case of any possible disaster. Remember that umbrelos updates are usually “problematic” and then we have the “surprise” that something went wrong and we have to download the entire blockchain again and, rather than complain, I looked for and applied a solution.

In my case I was only interested in having the blockchain saved on ssd2. However, this is functional and applicable to any other app that you need to be saved on another disk in case of possible disasters.

To give you an idea. Reassembling everything from scratch after a “disaster” takes me less than 1 hour, and everything is functional again as if nothing had happened.

The context is as follows.

I install a first 120Gb SATA ssd in my NUC, which will be cited as ssd1, and a second 2Tb NVME ssd that will be cited as ssd2.

The ssd1 will be where umbrelos and the other apps I use (Pi-Hole and qBitorrent) will run.

The ssd2 will be where the “Bitcoin” folder with the entire blockchain will be hosted.

It is convenient to do this after having installed umbrelos and without having installed any app yet. It is easier, faster and cleaner process.

When installing Umbrelos, the installer shows us a window where the available SSDs are displayed and we have to indicate the SSD where we want to install Umbrelos. This is a good time to identify the data of each SSD. If not, we will confirm later without problem.

Once Umbrelos is installed and, as a recommendation, having assigned a static IP, we connect to the NUC via SSH and identify the SSDs, using the following command.

sudo blkid

Taking my situation as an example, the result is the following.

/dev/nvme0n1p1: LABEL="Home" UUID="bbc59068-39ff-4782-81e8-3395837c5608" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Home" PARTUUID="0dcb62b0-3962-44e0-822c-eb662da2b22e"
/dev/sda4: UUID="c52094cd-2108-47e2-9c76-373c646d64c0" BLOCK_SIZE="1024" TYPE="ext4" PARTLABEL="primary" PARTUUID="d1d36e34-2753-4dc7-96eb-3c9b5584e867"
/dev/sda2: UUID="b65f5dac-e322-4fbe-91d3-de31e5afb5d1" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="2fe5a278-9b55-4266-8220-6665aa96940b"
/dev/sda3: UUID="b65f5dac-e322-4fbe-91d3-de31e5afb5d1" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="f5e6d27c-4a25-447b-8e08-a9d2e738345a"
/dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="ESP" LABEL="ESP" UUID="B3A0-1E84" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="ESP" PARTUUID="14a31e9d-a8d7-4da0-9eb2-f268dd9d7ad9"

In this example, we see that the first result shows “/dev/nvme0n1p1” where “nvme0n1p1” is my nvme ssd where the “Bitcoin” folder with the entire blockchain will be hosted. The system detects it but it is not mounted yet because we have not told the system to do so and assign it a task.

If this is confusing, we can reconfirm using the following command.

df

This command shows the mounted ssds that the system is using in my case as an example.

Filesystem      1K-blocks      Used  Available Use% Mounted on
udev              8051180         0    8051180   0% /dev
tmpfs             1614924      2332    1612592   1% /run
/dev/sda2        10054312   3888700    5684124  41% /
tmpfs             8074612         0    8074612   0% /dev/shm
tmpfs                5120         0       5120   0% /run/lock
/dev/sda1          204580     47788     156792  24% /boot/efi
/dev/sda4        93350418   2090060   87399729   3% /data
tmpfs             1614920         0    1614920   0% /run/user/1000

In my case as an example, it shows all the partitions used by ssd1, but my ssd2 doesn’t appear yet or it would show “/dev/nvme0n1p1”. For the same reason, I just confirmed that ssd2 is “nvme0n1p1”

Once ssd2 is identified, we need to know one of its parameters: the PARTUUID.

If they came out of the results of the first command, we use it again.

sudo blkid

There we see that the first result showing my ssd identified as “nvme0n1p1” indicates a PARTUUID=“0dcb62b0-3962-44e0-822c-eb662da2b22e”. This serial number in quotes of numbers and letters is what we need to configure it.

/dev/nvme0n1p1: LABEL="Home" UUID="bbc59068-39ff-4782-81e8-3395837c5608" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Home" PARTUUID="0dcb62b0-3962-44e0-822c-eb662da2b22e"

Now that we have the PARTUUID fully identified, we will proceed to tell the system to mount it automatically when the system starts. We will do this with the following configuration that we will add to a file later. Before editing the file in question, I will give a little detail for better understanding.

/dev/disk/by-partuuid/Add-partuuid /mnt/nvme0n1/ auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=nvme0n1 0 0

This configuration tells the system to automatically mount it every time the NUC boots, to mount it in the path
“/mnt/nvme0n1/” and to identify it as “name=nvme0n1”. We will replace the “Add-partuuid” with the serial number between quoted numbers and letters, the PARTUUID of our ssd, which is what we need to configure it.

Also in the same file to be edited later, we will have to tell it to redirect to ssd2, in my case, the “Bitcoin” folder so that it saves the blockchain there. As I said before, it can be used for any or all the apps that you want to save on ssd2. This will be done with the following configuration.

/mnt/nvme0n1/bitcoin/ /home/umbrel/umbrel/app-data/bitcoin/data/bitcoin none bind 0 0

Now we edit the file in question with the settings detailed above. Since we are still connected via SSH, we edit the file with the following command.

sudo nano /etc/fstab

It will show you something like the following…

  GNU nano 7.2                                         /etc/fstab                                             M     
/dev/disk/by-partuuid/14a31e9d-a8d7-4da0-9eb2-f268dd9d7ad9   /boot/efi          auto       defaults,sync    0  0
/dev/root            /                    auto       defaults,x-systemd.growfs 1  1

/dev/disk/by-partuuid/d1d36e34-2753-4dc7-96eb-3c9b5584e867   /data          auto       defaults,x-systemd.growfs   >

# entries kept from original fstab
# <device>                                  <dir>                        <type>      <options>   <dump>  <fsck>
/                                           /mnt/root                    none        bind        0       0
/data/umbrel-os/var/log                     /var/log                     none        bind        0       0
/data/umbrel-os/var/lib/docker              /var/lib/docker              none        bind        0       0
/data/umbrel-os/home                        /home                        none        bind        0       0
/data/umbrel-os/var/lib/systemd/timesync    /var/lib/systemd/timesync    none        bind        0       0

Here we will just add the configuration detailed above to the end of everything else and without changing, editing, deleting or moving anything else. This file is vital for your system, so be very careful when doing it. What we need to add is the following (taking my case as an example).

/dev/disk/by-partuuid/0dcb62b0-3962-44e0-822c-eb662da2b22e /mnt/nvme0n1/ auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=nvme0n1 0 0
/mnt/nvme0n1/bitcoin/ /home/umbrel/umbrel/app-data/bitcoin/data/bitcoin none bind 0 0

And if I wanted to add more apps, for example, electrs and mempool, it would be like this.

/dev/disk/by-partuuid/0dcb62b0-3962-44e0-822c-eb662da2b22e /mnt/nvme0n1/ auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=nvme0n1 0 0
/mnt/nvme0n1/bitcoin/ /home/umbrel/umbrel/app-data/bitcoin/data/bitcoin none bind 0 0
/mnt/nvme0n1/electrs/ /home/umbrel/umbrel/app-data/electrs/data/electrs none bind 0 0
/mnt/nvme0n1/lightning/ /home/umbrel/umbrel/app-data/lightning/data none bind 0 0
/mnt/nvme0n1/mempool/ /home/umbrel/umbrel/app-data/mempool/data none bind 0 0

Save and close (CTRL+X).

Reboot the NUC.

When you reboot, the ssd2 should already be mounted and working. If you want to reconfirm before doing anything else, via SSH and with the df command, it should already show you the ssd2 mounted and working.

Now we can install the apps we want. In my case as an example, install bitcoin-core and it will be automatically installed on ssd2.

If a disaster occurs, I will only have to reinstall umbrelos on my ssd1, do all the above and, when rebooting, bitcoin-core will detect the entire blockchain and will work again as if nothing had happened. All this in less than an hour.

5 Likes

Perfect, exactly what I was looking for!
I have my 4TB SSD holding the expensive data now.

Perfect working solution …like a Boss! =)

Excellent tutorial, thanks for sharing this!

One question, I noticed the fstab was restored after an UmbrelOS upgrade. Is there a way to prevent this from happening?

Thank you mate, it works for my media server.

Tested on umbrel 1.4 and it works perfectly.

Hi @jofraprez , I’m trying to follow your guide but I have a step that is not clear to me. I can’t execute the command /dev/disk/by-partuuid/Add-partuuid /mnt/nvme0n1/ auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=nvme0n1 0 0. Permission denied error appear. Can you help me?

Permission denied

That’s not a command to run in the console/terminal.
It’s a line of code to add/edit in the “fstab” file of your Umbrelos installation.
Obviously, that line of code must include the partuuid number of your disk as well as the path to the app to mount on that disk.
I recommend rereading the entire process carefully. It couldn’t be clearer, and with examples.

@jofraprez , thanks for the great article! The basic setup works great, however I faced another problem. In my case I have 2x1TB SSDs. The data of UmbrelOS + Electrs + Mempool is physically on SSD1, the data of Bitcoin Core (e.g. the blockchain is physically on SSD2).

However doing the above procedure, commands like du reports SSD1 completely full (20 mb free) causing my system to crash. Reading about it, seems like du reports the space of mounted data, regardless where it physically lives.

Similarly, the UI of UmbrelOS reports the same - no free space left. Now I’m at the point Bitcoin core and other apps don’t work anymore as they all think there’s no free space left.

Have you faced similar problems? Any suggestions how to fix them? Many thanks

It’s very difficult to tell you anything due to the limited information you provide. There are many variables at play regarding your situation that we don’t know about.

Anyway, based on what you say and since you have the problem, I would make the following observations.

  • The SSD where you say you store the blockchain is 1 TB. At the time of writing this, the blockchain alone weighs 748 GB. It’s a matter of time before you run out of space on that drive. At the rate the blockchain is growing, it may be a few months. It’s recommended that you upgrade to a 2 TB drive, at least.

  • Personally, I would keep the 1 TB SSD for the OS (umbrelos) and everything you want to install, and I would relocate the blockchain and the Electr database to the second 2 TB SSD. Just as I show in this How-To. This not only helps you manage your disk space better, but it will also give your device better performance when working with these apps.

  • The good thing about this is that you already have backups on your current SSDs in case you need them.

I can’t tell you more with the limited information available.

Hey,

Many thanks for the reply! These last generic suggestions are correct and on my radar, but until I can get a 2TB drive, need a different solution. Any specific information you need to make a more detailed recommendation?

In the guide you say you have 120GB SSD1 where UmbrelOS and the actual app installations live, and 2TB SSD2 where the bulky data lives (blockchains, etc). Two questions in that setup:

  1. How much free space do you see in the built-in Settings widget of UmbrelOS? For me the widget always shows only the information for the SSD where UmbrelOS is installed.
  2. Can you paste the output of the df command after doing all your steps and downloading the full blockchain? For me it’s showing that SSD1 is completely completely full, which starts to cause issues with various applications.

Thanks

Answers…

  1. Yes. Umbrelos will only show you the disk space used by Umbrelos. This is a limitation imposed by the developers, and you can already have 10 disks in use. Umbrelos will only show you the disk space used by Umbrelos.

  2. My disk configuration:

umbrel@umbrel1:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.7G     0  7.7G   0% /dev
tmpfs           1.6G  2.9M  1.6G   1% /run
/dev/sda2       9.4G  4.4G  4.6G  49% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda4        92G  2.4G   90G   3% /data
/dev/sda1       200M   49M  152M  25% /boot/efi
/dev/nvme0n1p1  1.8T  827G  910G  48% /mnt/nvme0n1
tmpfs           1.6G     0  1.6G   0% /run/user/1000

sda is the 120GB drive, and nvme0n1p1 is the second drive, where the “heavy stuff” is stored (blockchain and other monstrosities).

Your ssd1 could be full for many reasons. I tend to be more pragmatic. Figuring out why your SSDs are full can be a task that requires many hours, effort, and work. If you end up having to solve the space problem (the question isn’t whether you’ll have to solve it, the question is when you’ll get around to it because you already have the problem), I would dedicate that time, work, and effort to adding a new 2TB SSD and starting with a fresh, clean Umbrelos installation. This way, you’ll ensure you don’t carry over any existing problems to your new Umbrelos installation.

Now, if what you want is to play around figuring out the reason for your full disks… well, that’s a different story. :slight_smile:

What about bitcoin knots is it the same for it?

Yes. This works for any app you install on Umbrelos.

You just need to add the default path for each app.

In the case of Knots, the default path is:

/home/umbrell/umbrell/app-data/bitcoin-knots/data/bitcoin

Therefore, following my example and using the same folder to save the blockchain on the second drive, the code to add to the “fstab” file would be:

/mnt/nvme0n1/bitcoin/ /home/umbrell/umbrell/app-data/bitcoin-knots/data/bitcoin none bind 0 0

With the above, we are indicating that the “bitcoin” folder that Knots uses to save the blockchain is stored in the “bitcoin” folder located on the “nvme0n1” drive.

1 Like

and how do you uninstalland reinstall it seems like umbrel has a problem with that