You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48
Original file line number
Diff line number
Diff line change
@@ -89,3 +89,51 @@ nsenter -t 2152 -n
89
89
```
90
90
91
91
*You need to be able to start privileged containers for that.*
92
+
93
+
## Mounting External CSI Volumes
94
+
95
+
You can mount volumes from your CSI storage layer using the `-m` flag. This allows you to move data to/from node devices seamlessly. The PVC will be mounted at `/opt-pvc`. This is useful for failover in minimal systems that do not have a built in shell (eg. Talos).
96
+
Here is an example of how you can retrieve zfs/lvm data from a volume on a failed CSI node and put it back in your distributed storage layer:
97
+
98
+
```bash
99
+
k node-shell -n <namespace> -x <node_with_data> -m <pvc_name>
100
+
101
+
# install rsync
102
+
apk add rsync
103
+
104
+
# Add lvm/zfs libs
105
+
# ZFS
106
+
mount -o bind /host/dev /dev
107
+
mount -o bind /host/usr/local /usr/local
108
+
touch /lib/libuuid.so.1
109
+
mount -o bind /host/lib/libuuid.so.1 /lib/libuuid.so.1
110
+
touch /lib/libuuid.so.1.3.0
111
+
mount -o bind /host/lib/libuuid.so.1.3.0 /lib/libuuid.so.1.3.0
112
+
touch /lib/libblkid.so.1
113
+
mount -o bind /host/lib/libblkid.so.1 /lib/libblkid.so.1
114
+
touch /lib/libblkid.so.1.1.0
115
+
mount -o bind /host/lib/libblkid.so.1.1.0 /lib/libblkid.so.1.1.0
116
+
#LVM
117
+
touch /usr/lib/libaio.so.1
118
+
mount -o bind /host/usr/lib/libaio.so.1.0.2 /usr/lib/libaio.so.1
119
+
touch /usr/lib/libudev.so.1
120
+
mount -o bind /host/usr/lib/libudev.so.1 /usr/lib/libudev.so.1
0 commit comments