Merge pull request #21945 from rhvgoyal/export-min-free-space
Export Mininum Thin Pool Free Space through docker info
This commit is contained in:
commit
227c83826a
|
@ -167,6 +167,7 @@ type Status struct {
|
|||
// thin pool and it can't be activated again.
|
||||
DeferredDeleteEnabled bool
|
||||
DeferredDeletedDeviceCount uint
|
||||
MinFreeSpace uint64
|
||||
}
|
||||
|
||||
// Structure used to export image/container metadata in docker inspect.
|
||||
|
@ -2469,6 +2470,9 @@ func (devices *DeviceSet) Status() *Status {
|
|||
status.Metadata.Available = actualSpace
|
||||
}
|
||||
}
|
||||
|
||||
minFreeData := (dataTotal * uint64(devices.minFreeSpacePercent)) / 100
|
||||
status.MinFreeSpace = minFreeData * blockSizeInSectors * 512
|
||||
}
|
||||
|
||||
return status
|
||||
|
|
|
@ -76,6 +76,7 @@ func (d *Driver) Status() [][2]string {
|
|||
{"Metadata Space Used", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Used)))},
|
||||
{"Metadata Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Total)))},
|
||||
{"Metadata Space Available", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Available)))},
|
||||
{"Thin Pool Minimum Free Space", fmt.Sprintf("%s", units.HumanSize(float64(s.MinFreeSpace)))},
|
||||
{"Udev Sync Supported", fmt.Sprintf("%v", s.UdevSyncSupported)},
|
||||
{"Deferred Removal Enabled", fmt.Sprintf("%v", s.DeferredRemoveEnabled)},
|
||||
{"Deferred Deletion Enabled", fmt.Sprintf("%v", s.DeferredDeleteEnabled)},
|
||||
|
|
|
@ -109,6 +109,7 @@ The following command shows how to start the Docker daemon with the
|
|||
Metadata Space Used: 1.479 MB
|
||||
Metadata Space Total: 2.147 GB
|
||||
Metadata Space Available: 2.146 GB
|
||||
Thin Pool Minimum Free Space: 10.74 GB
|
||||
Udev Sync Supported: true
|
||||
Deferred Removal Enabled: false
|
||||
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
|
||||
|
|
Loading…
Reference in New Issue