New LVM volume groups use the needed space to allocate its logical
volumes. For example, if two disks are selected as target devices for
creating physical volumes and everything fits into the first disk, then
the second disk is not used at all.
This behaviour could be unexpected, so now Agama allows configuring the
policy for creating new physical volumes:
## `useNeeded` policy
This is the policy for the current behaviour. Only needed space is used.
It is the default value to keep backward compatibility with old
profiles.
~~~json
{
"physicalVolumes": [
{
"generate": {
"targetDevices": ["disk1", "disk2"],
"spacePolicy": "useNeeded"
}
}
]
}
~~~
If a config is loaded using the CLI and `useNeeded` is used, then the UI
will inform to the user, but it does not allow changing the policy. In
this case, the volume group has to be removed and created again in order
to use `useAvailable` policy.
## `useAvailable` policy
Creates the volume group using all the space available in the target
devices. Volume groups created through the UI will always use this
policy.
~~~json
{
"physicalVolumes": [
{
"generate": {
"targetDevices": ["disk1", "disk2"],
"spacePolicy": "useAvailable"
}
}
]
}
~~~
|
||
|---|---|---|
| .. | ||
| examples | ||
| .gitignore | ||
| dasd.schema.json | ||
| examples space | ||
| examples%20percent | ||
| iscsi.schema.json | ||
| package-lock.json | ||
| package.json | ||
| profile.schema.json | ||
| README-weird-filenames.md | ||
| README.md | ||
| software.schema.json | ||
| storage.model.schema.json | ||
| storage.schema.json | ||
| zfcp.schema.json | ||
JSON schema definition
See the JSON schema documentation for more details. The Agama schemas uses the Draft 2019-09 version.
Autoinstallation profile
The Agama autoinstallation profile JSON schema is defined in these files:
- profile.schema.json (the main definition)
- storage.schema.json (referenced from the main definition)
- iscsi.schema.json (referenced from the main definition)
- dasd.schema.json (referenced from the main definition)
- zfcp.schema.json (referenced from the main definition)
- software.schema.json (referenced from the main definition)
Agama REST API
The storage.model.schema.json file describes the structure of the storage data passed via the internal REST API. This is important only for Agama developers, it is not intended to be used by end users.
Validation
To verify that the definitions are correct run these commands:
# install needed NPM packages
npm ci
# verify the schema
npm run validate
These commands are run in the CI automatically whenever a schema file is modified.