agama/rust/agama-lib/share
José Iván López 382dd5d2e7
feat(storage): LVM policy for generating physical volumes (#3549)
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"
      }
    }
  ]
}
~~~
2026-06-02 15:50:51 +01:00
..
examples Fix example 2025-10-31 16:53:07 +00:00
.gitignore Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
dasd.schema.json Fix dasd schema 2026-02-25 09:47:34 +00:00
examples space test fixtures: do not make an infinite directory loop with symlinks 2025-04-02 10:49:38 +02:00
examples%20percent test fixtures: do not make an infinite directory loop with symlinks 2025-04-02 10:49:38 +02:00
iscsi.schema.json Autoinstallation schema improvements (#2773) 2025-10-01 16:53:34 +02:00
package-lock.json Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
package.json Extract zFCP schema 2026-03-03 12:09:23 +00:00
profile.schema.json rename remoteAccess to access 2026-06-02 09:52:14 +02:00
README-weird-filenames.md agama profile validate: integration tests 2025-03-21 14:12:44 +01:00
README.md Extract zFCP schema 2026-03-03 12:09:23 +00:00
software.schema.json Fix software JSON schema 2025-12-17 22:14:26 +00:00
storage.model.schema.json Extend model schema 2026-06-01 06:40:33 +01:00
storage.schema.json Extend config schema 2026-06-01 06:40:32 +01:00
zfcp.schema.json Improve zFCP config schema to generate TS types 2026-03-12 10:28:02 +00:00

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:

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.