Unanswered: DB2 tablespace space usage on raw partitions
For tablespaces (SMS) on OS filesystems we can get the tablespace space space usage from the view SYSIBMADM.CONTAINER_UTILIZATION.
BUT this view does not provide data when my tablespace containers are spread on raw partitions. (Guess the view is only supported for OS filesystems)
Can anyone please help me find the space usage of my tablespace containers on raw partitions? Please let me know anyother view which could provide this data.
I am trying to get free space for SMS tablespaces by subtracting FS_TOTAL_SIZE_KB - FS_USED_SIZE_KB. This works fine when my tablespace conatiners are spread on file systems but for raw partitions this view does not provide data.
As you pointed this is only supported for filesystems and hence I was looking for some other view which could provide me the same data.
I am not interested in tablespace pages used which I can get from "db2 list tablespaces" but the raw partition space consumed by these tablespaces.
You keep mentioning SMS and raw partitions. I suppose you have DMS tablespace on raw devices and so can use the [ # of used pages at the tablespace level / # of containers per tablespace ] to estimate the number of used pages at the container level (assuming they're the same size). A raw device can only hold one container and DMS size is preallocated so not sure why you can't just use the output from list tablespaces.
So sorry for the confusion. Yes u right it is DMS tablespace and since DMS tablespace for raw device cannot be autoresize we can use the db2 list tablespaces command to get space usage. [used pages/usable pages]
I was not aware that autoresize cannot be set for raw devices and hence was assuming the tablespace would grow to the size of raw device.