diff --git a/kubernetes/map-dm-to-pv b/kubernetes/map-dm-to-pv new file mode 100644 index 0000000000000000000000000000000000000000..1bcf7367f4d92cf5ba054409983aa1611261ed09 --- /dev/null +++ b/kubernetes/map-dm-to-pv @@ -0,0 +1,19 @@ +When you use LVM, in the USE node monitoring dashboard, you see disk saturation, by device mapper (dm). + +The challenge is to map this to the kubernetes pv, this is how to do: + +On the node, run the follwoing command: + +``` +dmsetup ls --tree -o blkdevname | grep dm-80 +data--1-small--22 <dm-80> (253:80) +``` + +And then, run this on kubernetes: + +``` +k get pv -o custom-columns=NAME:metadata.name,PATH:spec.local.path,PVC:spec.claimRef.name,NODE:spec.nodeAffinity.required.nodeSelectorTerms[0].matchExpressions[0].values[0] | grep nodename | grep vol_1_22 +local-pv-ea776176 /mnt/small/vol_1_22 pgdata-pg-xx-1 nodename +``` + +Now you know the responsible!