Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2010
    Posts
    9

    Unanswered: DB2 tablespace space usage on raw partitions

    Hi Guys,

    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.

    Thanks,
    Ron.

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Quote Originally Posted by ronakmaini View Post
    find the space usage of my tablespace containers on raw partitions?

    Are you trying to get FS_USED_SIZE_KB from SYSIBMADM.CONTAINER_UTILIZATION?


    fs_used_size - Amount of space used on a file system monitor element

    This element shows the amount of space (in bytes) already used on a file system pointed to by a storage path or container.

    Based on the description, this doesn't give you container usage (unless this is the only container/file on the FS), just the FS usage (how much is used).

    I don't expect SYSIBMADM.CONTAINER_UTILIZATION to display info for raw devices (only FS). Can't you get tablespace usage (not container usage) from list tablespase or db2pd?

  3. #3
    Join Date
    Feb 2010
    Posts
    9
    Thanks for responding!!!

    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.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    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.

  5. #5
    Join Date
    Feb 2010
    Posts
    9
    Hey db2girl!!!
    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.

    Thanks for clarification.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •