Skip to content

Instantly share code, notes, and snippets.

@NeuronButter
Last active August 6, 2025 06:26
Show Gist options
  • Save NeuronButter/86b30069853890ec77e3e5ac9504a767 to your computer and use it in GitHub Desktop.
Save NeuronButter/86b30069853890ec77e3e5ac9504a767 to your computer and use it in GitHub Desktop.
Mounting Longhorn volumes

Usually Longhorn devices attached to a node are usually:

/dev/longhorn/{volumename}

So just mount it to a temporary folder and unmount it when finished:

sudo mount /dev/longhorn/{volumename} tempmount
sudo umount tempmount

Generally this is possible when the volume is in use by a pod, although it's probably best to not have it bound to a running pod and to just leave it attached.

When shrinking volumes, the general gist is available below. Essentially, you just create a new ext4 volume, mount it, and then use rclone to copy all of the files over. It's probably a good idea to turn off the pods using the existing volume. longhorn/longhorn#4178 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment