Ask Your Question
1

API/CLI to know free_capacity_gb

asked 2014-04-28 01:01:04 -0600

parash_hallur gravatar image

updated 2014-04-28 01:02:12 -0600

Every cinder driver installed populates the free_capacity_gb based on which the volume create happens if there is enough free space available.

Now If I want to fetch this information either through API/CLI, what is that would be? I tried looking at the ceilometer statistics, I dont seem to get what I want. Could some one help me?

Following is the data I could get from the ceilometer, which I dont see it lists anywhere the free_capacity_gb of volume.

>>ceilometer meter-list
+--------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+
| Name         | Type  | Unit   | Resource ID                          | User ID                          | Project ID                       |
+--------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+
| image        | gauge | image  | 66432dd4-9c51-4fb3-9a45-1979ff7db1c2 | None                             | 96e3e6f754c840128de66be670d792dd |
| image        | gauge | image  | 7f84024a-89df-4464-82c0-d20586d287a6 | None                             | 96e3e6f754c840128de66be670d792dd |
| image        | gauge | image  | a34e3b99-0121-4275-8fdc-1b7a6c18238f | None                             | 96e3e6f754c840128de66be670d792dd |
| image.size   | gauge | B      | 66432dd4-9c51-4fb3-9a45-1979ff7db1c2 | None                             | 96e3e6f754c840128de66be670d792dd |
| image.size   | gauge | B      | 7f84024a-89df-4464-82c0-d20586d287a6 | None                             | 96e3e6f754c840128de66be670d792dd |
| image.size   | gauge | B      | a34e3b99-0121-4275-8fdc-1b7a6c18238f | None                             | 96e3e6f754c840128de66be670d792dd |
| image.update | delta | image  | 7f84024a-89df-4464-82c0-d20586d287a6 | None                             | 96e3e6f754c840128de66be670d792dd |
| image.update | delta | image  | a34e3b99-0121-4275-8fdc-1b7a6c18238f | None                             | 96e3e6f754c840128de66be670d792dd |
| image.upload | delta | image  | 7f84024a-89df-4464-82c0-d20586d287a6 | None                             | 96e3e6f754c840128de66be670d792dd |
| image.upload | delta | image  | a34e3b99-0121-4275-8fdc-1b7a6c18238f | None                             | 96e3e6f754c840128de66be670d792dd |
| volume       | gauge | volume | 483f9f47-e1b8-40b5-ae01-1ea1fc5e44d7 | bc5338895bc44054821e2630cccd97fb | aa894e7e04214a3c89db8b78146c9c81 |
| volume       | gauge | volume | 5405c83d-6533-4a96-b0b6-60388b56b653 | bc5338895bc44054821e2630cccd97fb | aa894e7e04214a3c89db8b78146c9c81 |
| volume.size  | gauge | GB     | 483f9f47-e1b8-40b5-ae01-1ea1fc5e44d7 | bc5338895bc44054821e2630cccd97fb | aa894e7e04214a3c89db8b78146c9c81 |
| volume.size  | gauge | GB     | 5405c83d-6533-4a96-b0b6-60388b56b653 | bc5338895bc44054821e2630cccd97fb | aa894e7e04214a3c89db8b78146c9c81 |
+--------------+-------+--------+--------------------------------------+----------------------------------+----------------------------------+

>> ceilometer statistics -m volume.size
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| Period | Period Start               | Period End                 | Max | Min | Avg | Sum | Count | Duration    | Duration Start             | Duration End               |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| 0      | 2014-04-28T03:43:53.402878 | 2014-04-28T05:37:09.374874 | 1.0 | 1.0 | 1.0 | 4.0 | 4     | 6795.971996 | 2014-04-28T03:43:53.402878 | 2014-04-28T05:37:09.374874 |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+

>>$ ceilometer statistics -m volume
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| Period | Period Start               | Period End                 | Max | Min | Avg | Sum | Count | Duration    | Duration Start             | Duration End               |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| 0      | 2014-04-28T03:43:53.402878 | 2014-04-28T05:37:09.374874 | 1.0 | 1.0 | 1.0 | 4.0 | 4     | 6795.971996 | 2014-04-28T03:43:53.402878 | 2014-04-28T05:37:09.374874 |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-04-29 06:02:39 -0600

parash_hallur gravatar image

Appreciate any pointers here? There is not any API or CLI command to know how much more size I can utilize interms of GB?

edit flag offensive delete link more
0

answered 2014-04-29 07:37:45 -0600

kamlesh gravatar image

#vgs by command line..........

edit flag offensive delete link more

Comments

Thanks Kamlesh. However when I looked at the o/p of "vgs" command, it shows up as below.

[root@lglap051 ~]# vgs
  VG             #PV #LV #SN Attr   VSize  VFree
  cinder-volumes   1   0   0 wz--n- 20.60g 20.60g
  stack-volumes    1   0   0 wz--n- 10.01g 10.01g
  vg_lglap051      1   2   0 wz--n- 19.51g     0

The value VFree does not change whether I create more volumes or delete existing volumes, I doubt if it populates the information I'm looking for.

Isn't there any commands from cinder/openstack to see this info?

parash_hallur gravatar imageparash_hallur ( 2014-04-30 03:49:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-28 01:01:04 -0600

Seen: 174 times

Last updated: Apr 29 '14