-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZFS example #162
Comments
Hm.. ok im sorry. When creating or destroying ZFS datasets from a container like the podHelper's one, we need to mount the directory as 'Bidirectional', so the changes can propagate to the Host. This is maybe related to #165 |
I guess this can be done enabling the mountPropagation=Bidirectional directly, near here, but that would require the pod helper to run privileged, thus probably would need to be enabled via a flag. Anyway, another aproach could be something like this? In case anyone cares, just uploaded a docker image with that change. With the followin config, ZFS does actually work now =) kind: ConfigMap
apiVersion: v1
metadata:
name: local-path-config
namespace: local-path-storage
data:
config.json: |-
{
"nodePathMap":[
{
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths":["/tank/"]
}
]
}
setup: |-
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
#volMode=Filesystem
zfs create -o quota=${sizeInBytes} ${absolutePath:1}
chmod g+w ${absolutePath}
teardown: |-
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
zfs destroy ${absolutePath:1}
helperPod.yaml: |-
apiVersion: v1
kind: Pod
metadata:
name: helper-pod
spec:
containers:
- name: helper-pod
image: srueg/zfs-utils
securityContext:
privileged: true
volumeMounts:
- mountPath: /tank
name: data
mountPropagation: Bidirectional |
Thx for the effort, looking forward to trying this out in the coming days 🤓 |
PR #166 allows to specify the |
What needs to be done in order to integrate this with the volume snapshot API? |
@killfill I would suggest you can contribute back to the |
Hi @innobead, Thanks for your comment, but i think for this to work it needs the bidirectional mounting thing enabled. |
@killfill |
All right, adding the example file as a PR. Hope it helps. |
@killfill |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hi all 👋
Just adding a tip in here, in case it saves a couple of minutes for people wanted to use ZFS with this local-path-provisioner.
At least it will for me, when i forget it 😬
The text was updated successfully, but these errors were encountered: