yashbhutwala / kubectl-df-pv

kubectl plugin - giving admins df (disk free) like utility for persistent volumes
Apache License 2.0
403 stars 32 forks source link

PVC Size shows different #34

Open Chandan1693 opened 1 year ago

Chandan1693 commented 1 year ago

@yashbhutwala @Volatus @ybstaked I noticed that when using the df-pv plugin the Size of PVC was showingSIZE 7GB however when I check within the pod it is showing 8GB. Is this a bug?

Volatus commented 1 year ago

@yashbhutwala @Volatus @ybstaked I noticed that when using the df-pv plugin the Size of PVC was showingSIZE 7GB however when I check within the pod it is showing 8GB. Is this a bug?

@Chandan1693 This may be due to rounding. Can you post the result of running the plugin?

Chandan1693 commented 1 year ago

@Volatus Thank you for quick response, really appreciate it.

pvc-269b087f-9d82-452e-adf7-245a0ea00acd opensearch-cluster-master-opensearch-cluster-master-2 opensearch wdc-tkg-wld-a1-md-0-787d8f95f6-p8glq opensearch-cluster-master-2 opensearch-cluster-master 7Gi 6Gi 783Mi 84.88 2802 521486 0.53 pvc-3f4245b8-e4e4-44f0-8345-dba71e9ac9e0 opensearch-cluster-lt-client-opensearch-cluster-lt-client-0 opensearch-lt wdc-tkg-wld-a1-md-0-787d8f95f6-bj4qg opensearch-cluster-lt-client-0 opensearch-cluster-lt-client 294Gi 102Mi 279Gi 0.03 1918 19658882 0.01 pvc-3159d23e-b44f-412a-b6e5-13a89eb149de opensearch-cluster-lt-master-opensearch-cluster-lt-master-0 opensearch-lt wdc-tkg-wld-a1-md-0-787d8f95f6-p8glq opensearch-cluster-lt-master-0 opensearch-cluster-lt-master 294Gi 108Mi 279Gi 0.04 1946 19658854 0.01 pvc-0544b66d-df4b-47bf-8b2f-462013786aed claim1 opensearch wdc-tkg-wld-a1-md-0-787d8f95f6-gfdjf nginx-deployment-6bbdcb56c7-jgqnz pvol 7Gi 22Mi 7Gi 0.28 35 524253 0.01 pvc-661a9d20-f857-4acc-9023-81c7677b4818 opensearch-cluster-lt-client-opensearch-cluster-lt-client-2 opensearch-lt wdc-tkg-wld-a1-md-0-787d8f95f6-gfdjf opensearch-cluster-lt-client-2 opensearch-cluster-lt-client 294Gi 105Mi 279Gi 0.04 1887 19658913 0.01 pvc-b7e5eb06-e5fb-4d79-a924-1f08959cc56d opensearch-cluster-master-opensearch-cluster-master-0 opensearch wdc-tkg-wld-a1-md-0-787d8f95f6-gfdjf opensearch-cluster-master-0 opensearch-cluster-master 7Gi 7Gi 268Ki 94.68 1837 522451 0.35 pvc-740cf022-984a-429c-9ef6-ab605972c416 opensearch-cluster-lt-master-opensearch-cluster-lt-master-1 opensearch-lt wdc-tkg-wld-a1-md-0-787d8f95f6-j5k57 opensearch-cluster-lt-master-1 opensearch-cluster-lt-master 294Gi 105Mi 279Gi 0.04 1867 19658933 0.01 pvc-1e56493d-0b66-4d2f-8fe8-281c313a4229 opensearch-cluster-master-opensearch-cluster-master-1 opensearch wdc-tkg-wld-a1-md-0-787d8f95f6-bj4qg opensearch-cluster-master-1

When checking within the pod:

sh-4.2$ df -h Filesystem Size Used Avail Use% Mounted on overlay 79G 56G 20G 74% / tmpfs 64M 0 64M 0% /dev tmpfs 32G 0 32G 0% /sys/fs/cgroup /dev/sda3 79G 56G 20G 74% /etc/hosts shm 64M 0 64M 0% /dev/shm /dev/sdh 7.9G 7.4G 268K 100% /usr/share/opensearch/data tmpfs 32G 12K 32G 1% /run/secrets/kubernetes.io/serviceaccount tmpfs 32G 40K 32G 1% /usr/share/opensearch/config/certs tmpfs 32G 4.0K 32G 1% /usr/share/opensearch/config/ldap-certs tmpfs 32G 12K 32G 1% /usr/share/opensearch/plugins/opensearch-security/securityconfig/config.yml tmpfs 32G 0 32G 0% /proc/acpi tmpfs 32G 0 32G 0% /proc/scsi tmpfs 32G 0 32G 0% /sys/firmware

Even this below command gives same 8GB. kubectl get pvc --all-namespaces -o custom-columns="NAMESPACE:.metadata.namespace,NAME:metadata.name,REQUESTS:spec.resources.requests.storage,CAPACITY:status.capacity.storage" | grep opensearch

opensearch opensearch-cluster-master-opensearch-cluster-master-0 8Gi 8Gi opensearch opensearch-cluster-master-opensearch-cluster-master-1 8Gi 8Gi opensearch opensearch-cluster-master-opensearch-cluster-master-2 8Gi 8Gi

Chandan1693 commented 1 year ago

@Volatus @yashbhutwala @ybstaked I see this is reported before https://github.com/yashbhutwala/kubectl-df-pv/issues/28. Any reason we are not adding it?