https://rancher.com/ logo
Title
h

hundreds-hairdresser-46043

05/23/2022, 10:14 AM
Good Day Fellow ranchers. General question: what is the reasoning of mounting the storage via the UI to a specific node? I saw that once mounted the storage is exposed as /dev/sdX drive on the OS. My reason for this question is what happens when that node is lost/rebooted or offline? We are currently using rook-ceph and it works a little different then longhorn
f

famous-journalist-11332

05/25/2022, 10:49 PM
Manually attaching volume to a node using Longhorn UI is mostly for debuging and testing purposes. The normal use case is: workload pod that require a PVC provisioned by Longhorn is deployed. Kubernetes will reach out to Longhorn through the CSI mechanism to attach/mount the volume automatically
what happens when that node is lost/rebooted or offline?
Longhorn will auto detach/attach volume when needed. You can you some tests for this case. Please let us know if any unexpected issues.
h

hundreds-hairdresser-46043

05/26/2022, 9:55 AM
@famous-journalist-11332 thanks for this information. I have been playing with Longhorn the last few days and I can confirm this behavior. Especially after i change the default storage class to longhorn. Just works. I did however notice dynamic PVC does not seem to be able to be backed up and restored easily (can you possible confirmed this?) i made a backup - that works - when i restore i have to detached the PVC volume and when i do that the POD just creates another PVC. I have to assume that you need to create static PVC's for the restore to work correctly?
f

famous-journalist-11332

06/01/2022, 12:41 AM
Restoring a volume from backup mean create a new volume from the backup. You usually only do this when the existing volume is gone (so you want to store it from backup) or you want to create a new volume with the same content.
To revert the existing volume to the previous data, you can take a look at the snapshot reverting feature https://longhorn.io/docs/1.2.4/concepts/#22-reverting-volumes-in-maintenance-mode