Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
daf145f
schema: add MD RAIDs to storage schema
joseivanlopez Apr 23, 2025
d7b4eaf
refactor(storage): reorganize tests
joseivanlopez Apr 24, 2025
81a714d
storage: generate md raid config from json
joseivanlopez Apr 24, 2025
bad634b
refactor(storage): reorganize tests
joseivanlopez Apr 25, 2025
b3955dd
storage: solve generate sections from md raids
joseivanlopez Apr 25, 2025
da0ed1d
storage: solve md raids
joseivanlopez Apr 25, 2025
ea70ef0
Add alias to Configs::MdRaid
ancorgs Apr 25, 2025
9478922
storage: extend from json conversion tests
joseivanlopez Apr 29, 2025
a0e67ba
storage: solve boot device from md raid
joseivanlopez Apr 28, 2025
92685e5
refactor(storage): improve config checkers
joseivanlopez Apr 30, 2025
b25b643
refactor(storage): reorganize config checker tests
joseivanlopez Apr 30, 2025
f58a3ce
storage: add md config checker
joseivanlopez Apr 30, 2025
9f142e2
storage: add validation for overused device
joseivanlopez May 2, 2025
93a3676
storage: add validations for used devices
joseivanlopez May 5, 2025
693ab27
Add search capabilities for RAIDs
ancorgs Apr 29, 2025
ac25a8f
Do not require a level for reused RAIDs
ancorgs May 5, 2025
ef0e93b
Add MDs to AgamaProposal
ancorgs Apr 23, 2025
a2848e5
Remove unused parameter
ancorgs May 2, 2025
fe2c34e
Merge pull request #8 from ancorgs/raid-proposal
joseivanlopez May 5, 2025
53bcdb2
schema: add search to md raids
joseivanlopez May 5, 2025
64a1695
storage: add search checker to md raid
joseivanlopez May 5, 2025
1451485
storage: add validation for incompatible physical volume targets
joseivanlopez May 5, 2025
43e2909
schema: remove _6 values of md raid parity
joseivanlopez May 6, 2025
f3d2e60
storage: fix typos
joseivanlopez May 6, 2025
2b6d682
storage: document method
joseivanlopez May 6, 2025
2901196
refactor(storage): reorganize tests
joseivanlopez May 6, 2025
01055ca
storage: convert md raids to json
joseivanlopez May 6, 2025
efdc50f
storage: make md level optional
joseivanlopez May 6, 2025
82c1d13
storage: rename methods
joseivanlopez May 6, 2025
46a04fb
storage: improve schema
joseivanlopez May 6, 2025
43b5c0a
Merge branch 'master' into raid-config
joseivanlopez May 6, 2025
b1a557e
Merge branch 'master' into raid-config
joseivanlopez May 7, 2025
d727a9c
rust: changelog
joseivanlopez May 7, 2025
81b82a6
service: changelog
joseivanlopez May 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions rust/agama-lib/share/examples/storage/md_raids.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"storage": {
"drives": [
{
"search": "/dev/vda",
"partitions": [
{
"search": "*",
"delete": true
},
{
"alias": "system-device1",
"size": "10 GiB"
},
{
"alias": "home-device1",
"size": "10 GiB"
}
]
},
{
"search": "/dev/vdb",
"partitions": [
{
"search": "*",
"delete": true
},
{
"alias": "system-device2",
"size": "10 GiB"
},
{
"alias": "home-device2",
"size": "10 GiB"
}
]
}
],
"mdRaids": [
{
"alias": "system",
"name": "system",
"level": "raid1",
"parity": "left_symmetric",
"chunkSize": "4 KiB",
"devices": ["system-device1", "system-device2"],
"ptableType": "gpt",
"partitions": [
{
"encryption": {
"luks1": {
"password": "notsecret"
}
},
"filesystem": {
"type": {
"btrfs": {
"snapshots": true
}
},
"path": "/"
}
}
]
},
{
"alias": "home",
"name": "home",
"level": "raid0",
"devices": ["home-device1", "home-device2"],
"encryption": {
"luks1": {
"password": "notsecret"
}
},
"filesystem": {
"type": "xfs",
"path": "/home"
}
},
{
"search": "/dev/md1",
"name": "data",
"level": "raid1",
"filesystem": {"path": "/data" }
}
]
}
}
90 changes: 87 additions & 3 deletions rust/agama-lib/share/storage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"description": "LVM volume groups.",
"type": "array",
"items": { "$ref": "#/$defs/volumeGroup" }
},
"mdRaids": {
"description": "MD RAIDs.",
"type": "array",
"items": { "$ref": "#/$defs/mdRaidElement" }
}
},
"$defs": {
Expand All @@ -34,15 +39,14 @@
},
"driveElement": {
"anyOf": [
{ "$ref": "#/$defs/formattedDrive" },
{ "$ref": "#/$defs/nonPartitionedDrive" },
{ "$ref": "#/$defs/partitionedDrive" }
]
},
"formattedDrive": {
"nonPartitionedDrive": {
"description": "Drive without a partition table (e.g., directly formatted).",
"type": "object",
"additionalProperties": false,
"required": ["filesystem"],
"properties": {
"search": { "$ref": "#/$defs/searchElement" },
"alias": { "$ref": "#/$defs/alias" },
Expand All @@ -53,16 +57,96 @@
"partitionedDrive": {
"type": "object",
"additionalProperties": false,
"required": ["partitions"],
"properties": {
"search": { "$ref": "#/$defs/searchElement" },
"alias": { "$ref": "#/$defs/alias" },
"ptableType": { "$ref": "#/$defs/ptableType" },
"partitions": {
"type": "array",
"items": { "$ref": "#/$defs/partitionElement" }
}
}
},
"mdRaidElement": {
"anyOf": [
{ "$ref": "#/$defs/nonPartitionedMdRaid" },
{ "$ref": "#/$defs/partitionedMdRaid" }
]
},
"nonPartitionedMdRaid": {
"description": "MD RAID without a partition table (e.g., directly formatted).",
"type": "object",
"additionalProperties": false,
"properties": {
"search": { "$ref": "#/$defs/searchElement" },
"alias": { "$ref": "#/$defs/alias" },
"name": { "$ref": "#/$defs/mdRaidName" },
"level": { "$ref": "#/$defs/mdRaidLevel" },
"parity": { "$ref": "#/$defs/mdRaidParity" },
"chunkSize": { "$ref": "#/$defs/sizeValue" },
"devices": { "$ref": "#/$defs/mdRaidDevices" },
"encryption": { "$ref": "#/$defs/encryption" },
"filesystem": { "$ref": "#/$defs/filesystem" }
}
},
"partitionedMdRaid": {
"type": "object",
"additionalProperties": false,
"required": ["partitions"],
"properties": {
"search": { "$ref": "#/$defs/searchElement" },
"alias": { "$ref": "#/$defs/alias" },
"name": { "$ref": "#/$defs/mdRaidName" },
"level": { "$ref": "#/$defs/mdRaidLevel" },
"parity": { "$ref": "#/$defs/mdRaidParity" },
"chunkSize": { "$ref": "#/$defs/sizeValue" },
"devices": { "$ref": "#/$defs/mdRaidDevices" },
"ptableType": { "$ref": "#/$defs/ptableType" },
"partitions": {
"type": "array",
"items": { "$ref": "#/$defs/partitionElement" }
}
}
},
"mdRaidName": {
"description": "MD base name.",
"type": "string",
"examples": ["system"]
},
"mdRaidLevel": {
"title": "MD level",
"enum": [
"raid0",
"raid1",
"raid5",
"raid6",
"raid10"
]
},
"mdRaidParity": {
"title": "MD parity",
"description": "Only applies to raid5, raid6 and raid10",
"enum": [
"left_asymmetric",
Comment thread
joseivanlopez marked this conversation as resolved.
"left_symmetric",
"right_asymmetric",
"right_symmetric",
"first",
"last",
"near_2",
"offset_2",
"far_2",
"near_3",
"offset_3",
"far_3"
]
},
"mdRaidDevices": {
"description": "Devices used by the MD RAID.",
"type": "array",
"items": { "$ref": "#/$defs/alias" }
},
"ptableType": {
"description": "Partition table type.",
"$comment": "The partition table is created only if all the current partitions are deleted.",
Expand Down
5 changes: 5 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 7 06:35:19 UTC 2025 - José Iván López González <jlopez@suse.com>

- Add MD RAIDs to the storage schema (gh#agama-project/agama#2286).

-------------------------------------------------------------------
Mon May 5 06:38:07 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
Loading
Loading