Recently I noticed that I have insufficient disk space.
I checked disk usage and noticed that my Postgres database consumes 375GB, however my Persistent Volume storage is setup only on 5GB.
I have checked the PV and PVC:
Name: postgres-volume-claim
Namespace: default
StorageClass: local-storage
Status: Bound
Volume: postgres-volume
Labels: app=postgres
Annotations: pv.kubernetes.io/bind-completed: yes
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 5Gi
Access Modes: RWX
VolumeMode: Filesystem
Used By: postgres-8475b9554f-czjq8
Events: <none>
Name: postgres-volume
Labels: app=postgres
Annotations: pv.kubernetes.io/bound-by-controller: yes
Finalizers: [kubernetes.io/pv-protection]
StorageClass: local-storage
Status: Bound
Claim: default/postgres-volume-claim
Reclaim Policy: Retain
Access Modes: RWX
VolumeMode: Filesystem
Capacity: 5Gi
Node Affinity: <none>
Message:
Source:
Type: HostPath (bare host directory volume)
Path: /mnt/raid/db
HostPathType:
Events: <none>
And the disk usage of mounted directory:
4,0K db/pgdata/pg_twophase
4,0K db/pgdata/pg_stat
832K db/pgdata/pg_subtrans
4,0K db/pgdata/pg_wal/archive_status
7,5G db/pgdata/pg_wal
4,0K db/pgdata/pg_snapshots
592K db/pgdata/global
4,0K db/pgdata/pg_serial
4,0K db/pgdata/pg_replslot
4,0K db/pgdata/pg_tblspc
12K db/pgdata/pg_multixact/members
12K db/pgdata/pg_multixact/offsets
28K db/pgdata/pg_multixact
12K db/pgdata/pg_notify
161G db/pgdata/base/16476
7,6G db/pgdata/base/pgsql_tmp
199G db/pgdata/base/16477
7,4M db/pgdata/base/1
7,9M db/pgdata/base/452050895
7,6M db/pgdata/base/13067
7,4M db/pgdata/base/13066
8,6M db/pgdata/base/30664
367G db/pgdata/base
5,6M db/pgdata/pg_xact
4,0K db/pgdata/pg_dynshmem
4,0K db/pgdata/pg_logical/snapshots
4,0K db/pgdata/pg_logical/mappings
16K db/pgdata/pg_logical
116K db/pgdata/pg_stat_tmp
4,0K db/pgdata/pg_commit_ts
374G db/pgdata
374G db
How is it possible that mounted directory of Persistent Volume is much bigger than 5Gi?
New contributor
Kacper Woźniak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.