I was asked about this in another post of mine and thought it really deserves its own post on this forum. This guide should hopefully give you a quick run over of how to mount an external storage drive and how to re-provision the docker volumes to access the storage as well.
DISCLAIMER: I DO NOT HAVE AN UMBREL HOME, THIS HAS BEEN RUN FROM A Z800 WORKSTATION WITH UBUNTU 22.04 LTS SERVER WHICH HAS UMBREL RUNNING ON TOP OF IT. I CANNOT GUARANTEE THAT THIS WILL WORK ON UMBREL HOME. UMBREL HOME HAS ITS OWN MOUNT SCRIPT FOR EXTERNAL STORAGE.
(as mentioned above there is a script to run the mounting procedure on Umbrel Home. there is probably a forum post describing its usage on the site. However, if you would like an easier way to find and run those scripts I do suggest trying out Umbrel-cli as I could really use some testers on it as its creator and maintainer to validate its success on Umbrel Home, especially with UmbrelOS only commands.
prerequisites:
-
Umbrel running with the apps you would like to have access to storage installed.
-
External storage device, formatted to ext4 and plugged into pc or Umbrel Home
-
(optional) Umbrel-cli installed as it makes things like stopping and restarting Umbrel apps a breeze. I will be using it in this guide so if you do not wish to install it you will need to go into the scripts directory and do a bit more work.
Step 1: Find the name of the externally connected device with the lsblk
command. This will typically have an sdX label for the disk and sdXY for the partition. Take note of the partition label
Step 2: Create the directory you wish to connect the partition to.
(I personally keep my mounted directories as ~/extX
for clarity but feel free to do as you wish)
Step 3: Mount the partition to the file system.
mount /dev/sdXY /path/to/mount/directory
Step 4: Open docker-compose.yml in editor of choice and go down to volumes. Change the volume on the left to the mount directory for the volumes you with to change.
(in this example we are using the Plex docker-compose and will tell it to store the data or /media to the external storage directory that we will say is placed at ~/ext1)
volumes:
- ${APP_DATA_DIR}/data/config:/config
- ${APP_DATA_DIR}/data/transcode:/transcode
- /home/$USER/ext1:/media
docker volumes should always be called by using the absolute path.
Step 5: Restart the docker container
umbrel app restart app-name
Step 6: Verify procedure.
At this point you should go into the external storage directory and verify that the docker volume has been created successfully.
I hope that this how-to proves to be useful to people starting out on using Umbrel, especially if not on Umbrel Home.