]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make NFS share selection more intelligent.
authorMorgan Fainberg <m@metacloud.com>
Tue, 14 May 2013 20:04:20 +0000 (13:04 -0700)
committerMorgan Fainberg <m@metacloud.com>
Thu, 23 May 2013 19:23:26 +0000 (12:23 -0700)
commit5bf7b9be798296b08de42f4cb6295071dc299ef8
tree82906fb6f16efc8f541f7efc865464ede10c1eba
parentb3db10f0ee487394b548979dadacad9e8d4335c9
Make NFS share selection more intelligent.

Make the NFS share selection more intelligent by using a used_ratio
and oversub_ratio to determine the valid target.  The used_ratio
is a hard-cap of maximum "actual" used space, oversub_ratio allows
for oversubscription of the share based upon the apparant-allocated
space for sparse files.

Removed Options: nfs_disk_util

New options added:
* nfs_used_ratio:
    Float representation of the maximum allowed usage (e.g. 0.95
    calculated by available_space / total_space) before the share
    is no longer concidered a valid target.  Default: 0.95

* nfs_oversub_ratio:
    Float representation of the oversubscriotion ratio allowed when
    utilizing sparse files (determined via "du").  This gets
    multiplied against the total_capacity before comparing the
    apparant space used by the backing volume files.  Default
    ratio is 1.0 (meaning reserved/allocated space cannot exceed
    total space available on the mount).

DocImpact: New Configuration Options / Removal of Config Option

bp nfs-share-selection-logic-improvement

Change-Id: I3572e106eb4c794b08bf6f499e2da2d494c4072d
cinder/tests/test_nfs.py
cinder/units.py [new file with mode: 0644]
cinder/volume/drivers/nfs.py
etc/cinder/cinder.conf.sample