|
| 1 | +# cephos-set-fill-ratios |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +The `cephos-set-fill-ratios` script is used to configure the fill ratios for a Ceph cluster. It sets three important OSD (Object Storage Daemon) ratios that control when Ceph considers a storage device to be near full, backfill full, or completely full. |
| 6 | + |
| 7 | +## Usage |
| 8 | + |
| 9 | +```bash |
| 10 | +cephos-set-fill-ratios -n <ratio> -b <ratio> -f <ratio> [-hv] |
| 11 | +``` |
| 12 | + |
| 13 | +## Options |
| 14 | + |
| 15 | +- `-n <ratio>`: Set the nearfull-ratio (default: 0.85) |
| 16 | +- `-b <ratio>`: Set the backfillfull-ratio (default: 0.9) |
| 17 | +- `-f <ratio>`: Set the full-ratio (default: 0.95) |
| 18 | +- `-h`: Show this help message and exit |
| 19 | +- `-v`: Enable verbose mode |
| 20 | + |
| 21 | +## Ratios Explanation |
| 22 | +1. **nearfull-ratio**: When the storage usage reaches this ratio, Ceph will start considering the device as near full. This triggers certain behaviors to prevent the device from becoming completely full. (Default: 0.85) |
| 23 | +1. **backfillfull-ratio**: When the storage usage reaches this ratio, Ceph will consider the device as backfill full. This affects backfill operations where data is being moved to balance the cluster. (Default: 0.9) |
| 24 | +1. **full-ratio**: When the storage usage reaches this ratio, Ceph will consider the device as completely full. No new data will be written to the device until space is freed up. (Default: 0.95) |
| 25 | + |
| 26 | +## Validation |
| 27 | + |
| 28 | +The script validates that the ratios are set in the correct order: |
| 29 | +`nearfull-ratio < backfillfull-ratio < full-ratio` |
| 30 | + |
| 31 | +If the ratios are not in the correct order, the script will display an error and exit. |
| 32 | + |
| 33 | +## Example Usage |
| 34 | + |
| 35 | +```bash |
| 36 | +# Set custom ratios |
| 37 | +cephos-set-fill-ratios -n 0.80 -b 0.85 -f 0.90 |
| 38 | + |
| 39 | +# Show help |
| 40 | +cephos-set-fill-ratios -h |
| 41 | + |
| 42 | +# Run with verbose output and set ratios to defaults |
| 43 | +cephos-set-fill-ratios -v |
| 44 | +``` |
| 45 | + |
| 46 | +## Default Values |
| 47 | + |
| 48 | +If no options are provided, the script will use the following default values: |
| 49 | +- nearfull-ratio: 0.85 |
| 50 | +- backfillfull-ratio: 0.9 |
| 51 | +- full-ratio: 0.95 |
0 commit comments