test/data: use LVM in fedora-ostree-image

Now that we have support for LVM convert the ostree image manifest
to use it for the root partition.
This commit is contained in:
Christian Kellner 2021-07-29 12:35:28 +00:00 committed by Tom Gundersen
parent c1c9c550d8
commit 8014ab5f1c
2 changed files with 125 additions and 9 deletions

View file

@ -1035,7 +1035,7 @@
}
},
{
"type": "org.osbuild.mkfs.xfs",
"type": "org.osbuild.lvm2.create",
"devices": {
"device": {
"type": "org.osbuild.loopback",
@ -1046,6 +1046,34 @@
}
}
},
"options": {
"volumes": [
{
"name": "root",
"size": "100%FREE"
}
]
}
},
{
"type": "org.osbuild.mkfs.xfs",
"devices": {
"lvm": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 413696,
"size": 20557791
}
},
"device": {
"type": "org.osbuild.lvm2.lv",
"parent": "lvm",
"options": {
"volume": "root"
}
}
},
"options": {
"uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"label": "root"
@ -1087,13 +1115,20 @@
"size": 204800
}
},
"root": {
"lvm": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 413696,
"size": 20557791
}
},
"root": {
"type": "org.osbuild.lvm2.lv",
"parent": "lvm",
"options": {
"volume": "root"
}
}
},
"mounts": [
@ -1135,6 +1170,25 @@
"path": "/grub2"
}
}
},
{
"type": "org.osbuild.lvm2.metadata",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 413696,
"size": 20557791,
"lock": true
}
}
},
"options": {
"vg_name": "osbuild",
"creation_host": "osbuild",
"description": "Built with osbuild"
}
}
]
},

View file

@ -27,7 +27,7 @@
"uuid": "61B2905B-DF3E-4FB3-80FA-49D1E773AA32"
},
{
"id": "root",
"id": "lvm",
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
}
@ -457,21 +457,53 @@
}
},
{
"type": "org.osbuild.mkfs.xfs",
"type": "org.osbuild.lvm2.create",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": {
"mpp-format-int": "{image.layout['root'].start}"
"mpp-format-int": "{image.layout['lvm'].start}"
},
"size": {
"mpp-format-int": "{image.layout['root'].size}"
"mpp-format-int": "{image.layout['lvm'].size}"
}
}
}
},
"options": {
"volumes": [
{
"name": "root",
"size": "100%FREE"
}
]
}
},
{
"type": "org.osbuild.mkfs.xfs",
"devices": {
"lvm": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": {
"mpp-format-int": "{image.layout['lvm'].start}"
},
"size": {
"mpp-format-int": "{image.layout['lvm'].size}"
}
}
},
"device": {
"type": "org.osbuild.lvm2.lv",
"parent": "lvm",
"options": {
"volume": "root"
}
}
},
"options": {
"uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"label": "root"
@ -521,17 +553,24 @@
}
}
},
"root": {
"lvm": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": {
"mpp-format-int": "{image.layout['root'].start}"
"mpp-format-int": "{image.layout['lvm'].start}"
},
"size": {
"mpp-format-int": "{image.layout['root'].size}"
"mpp-format-int": "{image.layout['lvm'].size}"
}
}
},
"root": {
"type": "org.osbuild.lvm2.lv",
"parent": "lvm",
"options": {
"volume": "root"
}
}
},
"mounts": [
@ -579,6 +618,29 @@
"path": "/grub2"
}
}
},
{
"type": "org.osbuild.lvm2.metadata",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": {
"mpp-format-int": "{image.layout['lvm'].start}"
},
"size": {
"mpp-format-int": "{image.layout['lvm'].size}"
},
"lock": true
}
}
},
"options": {
"vg_name": "osbuild",
"creation_host": "osbuild",
"description": "Built with osbuild"
}
}
]
},