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.