local-path-provisioner
local-path-provisioner copied to clipboard
Feature request create,delete,resize_cmd support
In order to have a reliable setup it does not make sense to have one big volumes with a lot of pvc as folders because any single pvc could fill the whole disk.
Therefore I would like to have some additional options like this:
{
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths":["/opt/local-path-provisioner"]
"create_cmd":"btrfs subvolume create ${PATH}",
"delete_cmd":"btrfs subvolume delete ${PATH}"
},
{
"node":"yasker-lp-dev1",
"paths":["/opt/local-path-provisioner", "/data1"]
"create_cmd":"lvm create blabla ${PATH}",
"delete_cmd":"lvm delete blabla ${PATH}",
"reszie_cmd":"lvm resize",
"available_cmd" "check_lvm_space.sh {SIZE}"
},
{
"node":"yasker-lp-dev3",
"paths":[]
"create_cmd":null,
"delete_cmd":null
}
It would be greate to have examples for btrfs and lvm which are most commonly used... with variables for PVC name, storage size and so on we could also ensure that no single volume would max out a single node.
This solution is very flexible and would also support any other filesystem like zfs...
would also fix https://github.com/rancher/local-path-provisioner/issues/21
@runningman84 no it wouldn't. The creator of #21 wants to have btrfs support for snapshot and backup functionality. Doing this properly requires to integrate with the volume snapshot API.