From 0b1c87d460a3c90f26cda59d220b54c4658a83cf Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 18 May 2022 13:47:01 -0600 Subject: [PATCH 1/9] filesystem: fix and futureproof probert unit test --- subiquity/server/controllers/tests/test_filesystem.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/subiquity/server/controllers/tests/test_filesystem.py b/subiquity/server/controllers/tests/test_filesystem.py index 4231a271..41307a92 100644 --- a/subiquity/server/controllers/tests/test_filesystem.py +++ b/subiquity/server/controllers/tests/test_filesystem.py @@ -40,15 +40,18 @@ class TestSubiquityControllerFilesystem(TestCase): run_coro(self.fsc._probe_once(context=None, restricted=True)) self.app.prober.get_storage.assert_called_with({'blockdev'}) - def test_probe_defaults(self): + def test_probe_os_prober_false(self): self.app.opts.use_os_prober = False run_coro(self.fsc._probe_once(context=None, restricted=False)) - self.app.prober.get_storage.assert_called_with({'defaults'}) + actual = self.app.prober.get_storage.call_args.args[0] + self.assertTrue({'defaults'} <= actual) + self.assertNotIn('os', actual) - def test_probe_defaults_and_os(self): + def test_probe_os_prober_true(self): self.app.opts.use_os_prober = True run_coro(self.fsc._probe_once(context=None, restricted=False)) - self.app.prober.get_storage.assert_called_with({'defaults', 'os'}) + actual = self.app.prober.get_storage.call_args.args[0] + self.assertTrue({'defaults', 'os'} <= actual) class TestGuided(TestCase): From 021686d7d992ae9a3e4b1708172ab97c540bb30d Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 18 May 2022 13:31:37 -0600 Subject: [PATCH 2/9] probert: ask for sizing info --- subiquity/server/controllers/filesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subiquity/server/controllers/filesystem.py b/subiquity/server/controllers/filesystem.py index 7b713d3c..c0a265da 100644 --- a/subiquity/server/controllers/filesystem.py +++ b/subiquity/server/controllers/filesystem.py @@ -414,7 +414,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator): fname = 'probe-data-restricted.json' key = "ProbeDataRestricted" else: - probe_types = {'defaults'} + probe_types = {'defaults', 'filesystem_sizing'} if self.app.opts.use_os_prober: probe_types |= {'os'} fname = 'probe-data.json' From b298caf83addc707c8bee10132392da4610f1ddb Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 18 May 2022 16:30:30 -0600 Subject: [PATCH 3/9] examples: add sample with size info --- examples/win10-along-ubuntu.json | 1286 ++++++++++++++++++++++++++++++ 1 file changed, 1286 insertions(+) create mode 100644 examples/win10-along-ubuntu.json diff --git a/examples/win10-along-ubuntu.json b/examples/win10-along-ubuntu.json new file mode 100644 index 00000000..ae2e6681 --- /dev/null +++ b/examples/win10-along-ubuntu.json @@ -0,0 +1,1286 @@ +{ + "network": { + "links": [ + { + "addresses": [ + { + "address": "10.0.2.15/24", + "family": 2, + "scope": "global", + "source": "dhcp" + }, + { + "address": "fec0::5054:ff:fe12:3456/64", + "family": 10, + "scope": "site", + "source": "dhcp" + }, + { + "address": "fe80::5054:ff:fe12:3456/64", + "family": 10, + "scope": "link", + "source": "static" + } + ], + "bond": { + "is_master": false, + "is_slave": false, + "lacp_rate": null, + "master": null, + "mode": null, + "slaves": [], + "xmit_hash_policy": null + }, + "bridge": { + "interfaces": [], + "is_bridge": false, + "is_port": false, + "options": {} + }, + "netlink_data": { + "arptype": 1, + "family": 0, + "flags": 69699, + "ifindex": 2, + "is_vlan": false, + "name": "ens3" + }, + "type": "eth", + "udev_data": { + "DEVPATH": "/devices/pci0000:00/0000:00:03.0/net/ens3", + "ID_BUS": "pci", + "ID_MM_CANDIDATE": "1", + "ID_MODEL_FROM_DATABASE": "82540EM Gigabit Ethernet Controller (QEMU Virtual Machine)", + "ID_MODEL_ID": "0x100e", + "ID_NET_NAME_MAC": "enx525400123456", + "ID_NET_NAME_PATH": "enp0s3", + "ID_NET_NAME_SLOT": "ens3", + "ID_NET_NAMING_SCHEME": "v240", + "ID_PATH": "pci-0000:00:03.0", + "ID_PATH_TAG": "pci-0000_00_03_0", + "ID_PCI_CLASS_FROM_DATABASE": "Network controller", + "ID_PCI_SUBCLASS_FROM_DATABASE": "Ethernet controller", + "ID_VENDOR_FROM_DATABASE": "Intel Corporation", + "ID_VENDOR_ID": "0x8086", + "IFINDEX": "2", + "INTERFACE": "ens3", + "SUBSYSTEM": "net", + "SYSTEMD_ALIAS": "/sys/subsystem/net/devices/ens3", + "TAGS": ":systemd:", + "USEC_INITIALIZED": "82651806", + "attrs": { + "addr_assign_type": "0", + "addr_len": "6", + "address": "52:54:00:12:34:56", + "broadcast": "ff:ff:ff:ff:ff:ff", + "carrier": "1", + "carrier_changes": "2", + "carrier_down_count": "1", + "carrier_up_count": "1", + "dev_id": "0x0", + "dev_port": "0", + "device": null, + "dormant": "0", + "duplex": "full", + "flags": "0x1003", + "gro_flush_timeout": "0", + "ifalias": "", + "ifindex": "2", + "iflink": "2", + "link_mode": "0", + "mtu": "1500", + "name_assign_type": "4", + "netdev_group": "0", + "operstate": "up", + "phys_port_id": null, + "phys_port_name": null, + "phys_switch_id": null, + "proto_down": "0", + "speed": "1000", + "subsystem": "net", + "tx_queue_len": "1000", + "type": "1", + "uevent": "INTERFACE=ens3\nIFINDEX=2" + } + } + }, + { + "addresses": [ + { + "address": "127.0.0.1/8", + "family": 2, + "scope": "host", + "source": "static" + }, + { + "address": "::1/128", + "family": 10, + "scope": "host", + "source": "static" + } + ], + "bond": { + "is_master": false, + "is_slave": false, + "lacp_rate": null, + "master": null, + "mode": null, + "slaves": [], + "xmit_hash_policy": null + }, + "bridge": { + "interfaces": [], + "is_bridge": false, + "is_port": false, + "options": {} + }, + "netlink_data": { + "arptype": 772, + "family": 0, + "flags": 65609, + "ifindex": 1, + "is_vlan": false, + "name": "lo" + }, + "type": "lo", + "udev_data": { + "DEVPATH": "/devices/virtual/net/lo", + "ID_MM_CANDIDATE": "1", + "IFINDEX": "1", + "INTERFACE": "lo", + "SUBSYSTEM": "net", + "USEC_INITIALIZED": "89206115", + "attrs": { + "addr_assign_type": "0", + "addr_len": "6", + "address": "00:00:00:00:00:00", + "broadcast": "00:00:00:00:00:00", + "carrier": "1", + "carrier_changes": "0", + "carrier_down_count": "0", + "carrier_up_count": "0", + "dev_id": "0x0", + "dev_port": "0", + "dormant": "0", + "duplex": null, + "flags": "0x9", + "gro_flush_timeout": "0", + "ifalias": "", + "ifindex": "1", + "iflink": "1", + "link_mode": "0", + "mtu": "65536", + "name_assign_type": null, + "netdev_group": "0", + "operstate": "unknown", + "phys_port_id": null, + "phys_port_name": null, + "phys_switch_id": null, + "proto_down": "0", + "speed": null, + "subsystem": "net", + "tx_queue_len": "1000", + "type": "772", + "uevent": "INTERFACE=lo\nIFINDEX=1" + } + } + } + ], + "routes": [ + { + "dst": "default", + "family": 2, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "10.0.2.0/24", + "family": 2, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "10.0.2.2", + "family": 2, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "10.0.2.0", + "family": 2, + "ifindex": 2, + "table": 255, + "type": 3 + }, + { + "dst": "10.0.2.15", + "family": 2, + "ifindex": 2, + "table": 255, + "type": 2 + }, + { + "dst": "10.0.2.255", + "family": 2, + "ifindex": 2, + "table": 255, + "type": 3 + }, + { + "dst": "127.0.0.0", + "family": 2, + "ifindex": 1, + "table": 255, + "type": 3 + }, + { + "dst": "127.0.0.0/8", + "family": 2, + "ifindex": 1, + "table": 255, + "type": 2 + }, + { + "dst": "127.0.0.1", + "family": 2, + "ifindex": 1, + "table": 255, + "type": 2 + }, + { + "dst": "127.255.255.255", + "family": 2, + "ifindex": 1, + "table": 255, + "type": 3 + }, + { + "dst": "::1", + "family": 10, + "ifindex": 1, + "table": 254, + "type": 1 + }, + { + "dst": "fe80::/64", + "family": 10, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "fec0::/64", + "family": 10, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "default", + "family": 10, + "ifindex": 2, + "table": 254, + "type": 1 + }, + { + "dst": "::1", + "family": 10, + "ifindex": 1, + "table": 255, + "type": 2 + }, + { + "dst": "fe80::5054:ff:fe12:3456", + "family": 10, + "ifindex": 2, + "table": 255, + "type": 2 + }, + { + "dst": "fec0::5054:ff:fe12:3456", + "family": 10, + "ifindex": 2, + "table": 255, + "type": 2 + }, + { + "dst": "ff00::/8", + "family": 10, + "ifindex": 2, + "table": 255, + "type": 1 + } + ] + }, + "storage": { + "bcache": { + "backing": {}, + "caching": {} + }, + "dasd": {}, + "lvm": {}, + "dmcrypt": {}, + "multipath": { + "paths": [ + { + "device": "sda", + "serial": "QM00001", + "multipath": "[orphan]", + "host_wwnn": "[undef]", + "target_wwnn": "ata-1.00", + "host_wwpn": "[undef]", + "target_wwpn": "[undef]", + "host_adapter": "[undef]" + } + ] + }, + "zfs": { + "zpools": {} + }, + "raid": {}, + "blockdev": { + "/dev/sda": { + "DEVLINKS": "/dev/disk/by-path/pci-0000:00:01.1-ata-1 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001", + "DEVNAME": "/dev/sda", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda", + "DEVTYPE": "disk", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "0", + "MPATH_SBIN_PATH": "/sbin", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "USEC_INITIALIZED": "1683330", + "attrs": { + "alignment_offset": "0", + "bdi": null, + "capability": "40", + "dev": "8:0", + "device": null, + "discard_alignment": "0", + "diskseq": "9", + "events": "", + "events_async": "", + "events_poll_msecs": "-1", + "ext_range": "256", + "hidden": "0", + "inflight": " 0 0", + "range": "16", + "removable": "0", + "ro": "0", + "size": "109521666048", + "stat": " 1427322 2112 260321886 247903 1016 0 0 157 0 309064 248215 0 0 0 0 1016 154", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=0\nDEVNAME=sda\nDEVTYPE=disk\nDISKSEQ=9" + }, + "partitiontable": { + "label": "gpt", + "id": "17EDEF9F-34BF-42C9-A15F-CEE9AA2E1499", + "device": "/dev/sda", + "unit": "sectors", + "firstlba": 34, + "lastlba": 213909470, + "sectorsize": 512, + "partitions": [ + { + "node": "/dev/sda1", + "start": 2048, + "size": 204800, + "type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", + "uuid": "9F8B9DD0-4C48-4E38-B1C6-D6C130A3B9B1", + "name": "EFI system partition", + "attrs": "GUID:63" + }, + { + "node": "/dev/sda2", + "start": 206848, + "size": 32768, + "type": "E3C9E316-0B5C-4DB8-817D-F92DF00215AE", + "uuid": "55850C46-570D-4D08-9E84-1339E41B8746", + "name": "Microsoft reserved partition", + "attrs": "GUID:63" + }, + { + "node": "/dev/sda3", + "start": 239616, + "size": 166486126, + "type": "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", + "uuid": "695BCD76-922C-4194-9097-17355ED02893", + "name": "Basic data partition" + }, + { + "node": "/dev/sda4", + "start": 166727680, + "size": 1040384, + "type": "DE94BBA4-06D1-4D40-A16A-BFD50179D6AC", + "uuid": "9E09A65A-4FF5-4AF1-9B2D-3B5010D0714C", + "attrs": "RequiredPartition GUID:63" + }, + { + "node": "/dev/sda5", + "start": 167768064, + "size": 46141407, + "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", + "uuid": "4CAE555C-1A8D-064A-B232-05F24B0F3641" + } + ] + } + }, + "/dev/sda1": { + "DEVLINKS": "/dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001-part1 /dev/disk/by-partlabel/EFI\\x20system\\x20partition /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part1 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001-part1 /dev/disk/by-uuid/54E4-27B3 /dev/disk/by-path/pci-0000:00:01.1-ata-1-part1 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part1 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1 /dev/disk/by-partuuid/9f8b9dd0-4c48-4e38-b1c6-d6c130a3b9b1", + "DEVNAME": "/dev/sda1", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1", + "DEVTYPE": "partition", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_FS_TYPE": "vfat", + "ID_FS_USAGE": "filesystem", + "ID_FS_UUID": "54E4-27B3", + "ID_FS_UUID_ENC": "54E4-27B3", + "ID_FS_VERSION": "FAT32", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_ENTRY_DISK": "8:0", + "ID_PART_ENTRY_FLAGS": "0x8000000000000000", + "ID_PART_ENTRY_NAME": "EFI\\x20system\\x20partition", + "ID_PART_ENTRY_NUMBER": "1", + "ID_PART_ENTRY_OFFSET": "2048", + "ID_PART_ENTRY_SCHEME": "gpt", + "ID_PART_ENTRY_SIZE": "204800", + "ID_PART_ENTRY_TYPE": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b", + "ID_PART_ENTRY_UUID": "9f8b9dd0-4c48-4e38-b1c6-d6c130a3b9b1", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "1", + "PARTN": "1", + "PARTNAME": "EFI system partition", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "UDISKS_IGNORE": "1", + "USEC_INITIALIZED": "1795887", + "attrs": { + "alignment_offset": "0", + "dev": "8:1", + "discard_alignment": "0", + "inflight": " 0 0", + "partition": "1", + "ro": "0", + "size": "104857600", + "start": "2048", + "stat": " 6738 0 393509 1264 0 0 0 0 0 8016 1264 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=1\nDEVNAME=sda1\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=1\nPARTNAME=EFI system partition" + }, + "partitiontable": { + "label": "dos", + "id": "0x500a0dff", + "device": "/dev/sda1", + "unit": "sectors", + "sectorsize": 512, + "partitions": [ + { + "node": "/dev/sda1p1", + "start": 1948285285, + "size": 1701978223, + "type": "6e" + }, + { + "node": "/dev/sda1p2", + "start": 0, + "size": 0, + "type": "74" + }, + { + "node": "/dev/sda1p4", + "start": 28049408, + "size": 441, + "type": "0" + } + ] + } + }, + "/dev/sda2": { + "DEVLINKS": "/dev/disk/by-partuuid/55850c46-570d-4d08-9e84-1339e41b8746 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part2 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part2 /dev/disk/by-partlabel/Microsoft\\x20reserved\\x20partition /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part2 /dev/disk/by-path/pci-0000:00:01.1-ata-1-part2 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001-part2 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001-part2", + "DEVNAME": "/dev/sda2", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2", + "DEVTYPE": "partition", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_ENTRY_DISK": "8:0", + "ID_PART_ENTRY_FLAGS": "0x8000000000000000", + "ID_PART_ENTRY_NAME": "Microsoft\\x20reserved\\x20partition", + "ID_PART_ENTRY_NUMBER": "2", + "ID_PART_ENTRY_OFFSET": "206848", + "ID_PART_ENTRY_SCHEME": "gpt", + "ID_PART_ENTRY_SIZE": "32768", + "ID_PART_ENTRY_TYPE": "e3c9e316-0b5c-4db8-817d-f92df00215ae", + "ID_PART_ENTRY_UUID": "55850c46-570d-4d08-9e84-1339e41b8746", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "2", + "PARTN": "2", + "PARTNAME": "Microsoft reserved partition", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "UDISKS_IGNORE": "1", + "USEC_INITIALIZED": "1794265", + "attrs": { + "alignment_offset": "0", + "dev": "8:2", + "discard_alignment": "0", + "inflight": " 0 0", + "partition": "2", + "ro": "0", + "size": "16777216", + "start": "206848", + "stat": " 9144 0 536840 1492 0 0 0 0 0 8288 1492 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=2\nDEVNAME=sda2\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=2\nPARTNAME=Microsoft reserved partition" + } + }, + "/dev/sda3": { + "DEVLINKS": "/dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001-part3 /dev/disk/by-uuid/C4E8E493E8E484D0 /dev/disk/by-partuuid/695bcd76-922c-4194-9097-17355ed02893 /dev/disk/by-partlabel/Basic\\x20data\\x20partition /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part3 /dev/disk/by-path/pci-0000:00:01.1-ata-1-part3 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part3 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001-part3 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part3", + "DEVNAME": "/dev/sda3", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda3", + "DEVTYPE": "partition", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_FS_TYPE": "ntfs", + "ID_FS_USAGE": "filesystem", + "ID_FS_UUID": "C4E8E493E8E484D0", + "ID_FS_UUID_ENC": "C4E8E493E8E484D0", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_ENTRY_DISK": "8:0", + "ID_PART_ENTRY_NAME": "Basic\\x20data\\x20partition", + "ID_PART_ENTRY_NUMBER": "3", + "ID_PART_ENTRY_OFFSET": "239616", + "ID_PART_ENTRY_SCHEME": "gpt", + "ID_PART_ENTRY_SIZE": "166486126", + "ID_PART_ENTRY_TYPE": "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7", + "ID_PART_ENTRY_UUID": "695bcd76-922c-4194-9097-17355ed02893", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "3", + "PARTN": "3", + "PARTNAME": "Basic data partition", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "USEC_INITIALIZED": "1801159", + "attrs": { + "alignment_offset": "0", + "dev": "8:3", + "discard_alignment": "0", + "inflight": " 0 0", + "partition": "3", + "ro": "0", + "size": "85240896512", + "start": "239616", + "stat": " 1357976 2017 255447402 234787 1 0 0 0 0 283620 234787 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=3\nDEVNAME=sda3\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=3\nPARTNAME=Basic data partition" + }, + "partitiontable": { + "label": "dos", + "id": "0x73736572", + "device": "/dev/sda3", + "unit": "sectors", + "sectorsize": 512, + "partitions": [ + { + "node": "/dev/sda3p1", + "start": 1920221984, + "size": 1816210284, + "type": "72" + }, + { + "node": "/dev/sda3p2", + "start": 1936028192, + "size": 1953653108, + "type": "6c" + }, + { + "node": "/dev/sda3p3", + "start": 0, + "size": 0, + "type": "0" + }, + { + "node": "/dev/sda3p4", + "start": 27722122, + "size": 447, + "type": "0" + } + ] + } + }, + "/dev/sda4": { + "DEVLINKS": "/dev/disk/by-path/pci-0000:00:01.1-ata-1-part4 /dev/disk/by-partuuid/9e09a65a-4ff5-4af1-9b2d-3b5010d0714c /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part4 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part4 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001-part4 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part4 /dev/disk/by-uuid/7448E57248E53410 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001-part4", + "DEVNAME": "/dev/sda4", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda4", + "DEVTYPE": "partition", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_FS_TYPE": "ntfs", + "ID_FS_USAGE": "filesystem", + "ID_FS_UUID": "7448E57248E53410", + "ID_FS_UUID_ENC": "7448E57248E53410", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_ENTRY_DISK": "8:0", + "ID_PART_ENTRY_FLAGS": "0x8000000000000001", + "ID_PART_ENTRY_NUMBER": "4", + "ID_PART_ENTRY_OFFSET": "166727680", + "ID_PART_ENTRY_SCHEME": "gpt", + "ID_PART_ENTRY_SIZE": "1040384", + "ID_PART_ENTRY_TYPE": "de94bba4-06d1-4d40-a16a-bfd50179d6ac", + "ID_PART_ENTRY_UUID": "9e09a65a-4ff5-4af1-9b2d-3b5010d0714c", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "4", + "PARTN": "4", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "UDISKS_IGNORE": "1", + "USEC_INITIALIZED": "1787174", + "attrs": { + "alignment_offset": "0", + "dev": "8:4", + "discard_alignment": "0", + "inflight": " 0 0", + "partition": "4", + "ro": "0", + "size": "532676608", + "start": "166727680", + "stat": " 15989 0 1585912 3155 1 0 0 0 0 11540 3155 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=4\nDEVNAME=sda4\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=4" + }, + "partitiontable": { + "label": "dos", + "id": "0x73736572", + "device": "/dev/sda4", + "unit": "sectors", + "sectorsize": 512, + "partitions": [ + { + "node": "/dev/sda4p1", + "start": 1920221984, + "size": 1816210284, + "type": "72" + }, + { + "node": "/dev/sda4p2", + "start": 1936028192, + "size": 1953653108, + "type": "6c" + }, + { + "node": "/dev/sda4p3", + "start": 0, + "size": 0, + "type": "0" + }, + { + "node": "/dev/sda4p4", + "start": 27722122, + "size": 447, + "type": "0" + } + ] + } + }, + "/dev/sda5": { + "DEVLINKS": "/dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part5 /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001-part5 /dev/disk/by-id/scsi-0ATA_QEMU_HARDDISK_QM00001-part5 /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part5 /dev/disk/by-id/scsi-1ATA_QEMU_HARDDISK_QM00001-part5 /dev/disk/by-uuid/1981ceb1-b25f-4290-91d0-45c8f5865a47 /dev/disk/by-partuuid/4cae555c-1a8d-064a-b232-05f24b0f3641 /dev/disk/by-path/pci-0000:00:01.1-ata-1-part5", + "DEVNAME": "/dev/sda5", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda5", + "DEVTYPE": "partition", + "DISKSEQ": "9", + "DM_MULTIPATH_DEVICE_PATH": "0", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_FS_TYPE": "ext4", + "ID_FS_USAGE": "filesystem", + "ID_FS_UUID": "1981ceb1-b25f-4290-91d0-45c8f5865a47", + "ID_FS_UUID_ENC": "1981ceb1-b25f-4290-91d0-45c8f5865a47", + "ID_FS_VERSION": "1.0", + "ID_MODEL": "QEMU_HARDDISK", + "ID_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "ID_PART_ENTRY_DISK": "8:0", + "ID_PART_ENTRY_NUMBER": "5", + "ID_PART_ENTRY_OFFSET": "167768064", + "ID_PART_ENTRY_SCHEME": "gpt", + "ID_PART_ENTRY_SIZE": "46141407", + "ID_PART_ENTRY_TYPE": "0fc63daf-8483-4772-8e79-3d69d8477de4", + "ID_PART_ENTRY_UUID": "4cae555c-1a8d-064a-b232-05f24b0f3641", + "ID_PART_TABLE_TYPE": "gpt", + "ID_PART_TABLE_UUID": "17edef9f-34bf-42c9-a15f-cee9aa2e1499", + "ID_PATH": "pci-0000:00:01.1-ata-1.0", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_0", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SCSI_SERIAL": "QM00001", + "ID_SERIAL": "QEMU_HARDDISK_QM00001", + "ID_SERIAL_SHORT": "QM00001", + "ID_TYPE": "disk", + "ID_VENDOR": "ATA", + "ID_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "MAJOR": "8", + "MINOR": "5", + "PARTN": "5", + "SCSI_IDENT_LUN_ATA": "QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_HARDDISK_QM00001", + "SCSI_IDENT_LUN_VENDOR": "QM00001", + "SCSI_IDENT_SERIAL": "QM00001", + "SCSI_MODEL": "QEMU_HARDDISK", + "SCSI_MODEL_ENC": "QEMU\\x20HARDDISK\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "disk", + "SCSI_VENDOR": "ATA", + "SCSI_VENDOR_ENC": "ATA\\x20\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":systemd:", + "USEC_INITIALIZED": "1789520", + "attrs": { + "alignment_offset": "0", + "dev": "8:5", + "discard_alignment": "0", + "inflight": " 0 0", + "partition": "5", + "ro": "0", + "size": "23624400384", + "start": "167768064", + "stat": " 22060 95 1461299 4101 1014 0 0 157 0 15372 4258 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=8\nMINOR=5\nDEVNAME=sda5\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=5" + } + }, + "/dev/sr0": { + "DEVLINKS": "/dev/disk/by-id/scsi-0QEMU_QEMU_DVD-ROM_QM00002 /dev/disk/by-id/ata-QEMU_DVD-ROM_QM00002 /dev/disk/by-uuid/2022-04-21-06-14-25-00 /dev/disk/by-id/scsi-1ATA_QEMU_DVD-ROM_QM00002 /dev/disk/by-label/Ubuntu\\x20custom /dev/disk/by-path/pci-0000:00:01.1-ata-1.1 /dev/disk/by-path/pci-0000:00:01.1-ata-1 /dev/cdrom", + "DEVNAME": "/dev/sr0", + "DEVPATH": "/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:1/0:0:1:0/block/sr0", + "DEVTYPE": "disk", + "DISKSEQ": "11", + "ID_ATA": "1", + "ID_BUS": "ata", + "ID_CDROM": "1", + "ID_CDROM_DVD": "1", + "ID_CDROM_MEDIA": "1", + "ID_CDROM_MEDIA_DVD": "1", + "ID_CDROM_MEDIA_SESSION_COUNT": "1", + "ID_CDROM_MEDIA_STATE": "complete", + "ID_CDROM_MEDIA_TRACK_COUNT": "1", + "ID_CDROM_MEDIA_TRACK_COUNT_DATA": "1", + "ID_CDROM_MRW": "1", + "ID_CDROM_MRW_W": "1", + "ID_FOR_SEAT": "block-pci-0000_00_01_1-ata-1_1", + "ID_FS_BOOT_SYSTEM_ID": "EL\\x20TORITO\\x20SPECIFICATION", + "ID_FS_DATA_PREPARER_ID": "XORRISO-1.5.2\\x202019.10.26.180001\\x2c\\x20LIBISOBURN-1.5.2\\x2c\\x20LIBISOFS-1.5.2\\x2c\\x20LIBBURN-1.5.2", + "ID_FS_LABEL": "Ubuntu_custom", + "ID_FS_LABEL_ENC": "Ubuntu\\x20custom", + "ID_FS_TYPE": "iso9660", + "ID_FS_USAGE": "filesystem", + "ID_FS_UUID": "2022-04-21-06-14-25-00", + "ID_FS_UUID_ENC": "2022-04-21-06-14-25-00", + "ID_MODEL": "QEMU_DVD-ROM", + "ID_MODEL_ENC": "QEMU\\x20DVD-ROM\\x20\\x20\\x20\\x20", + "ID_PART_TABLE_TYPE": "dos", + "ID_PATH": "pci-0000:00:01.1-ata-1.1", + "ID_PATH_ATA_COMPAT": "pci-0000:00:01.1-ata-1", + "ID_PATH_TAG": "pci-0000_00_01_1-ata-1_1", + "ID_REVISION": "2.5+", + "ID_SCSI": "1", + "ID_SCSI_INQUIRY": "1", + "ID_SERIAL": "QEMU_DVD-ROM_QM00002", + "ID_TYPE": "cd/dvd", + "ID_VENDOR": "QEMU", + "ID_VENDOR_ENC": "QEMU\\x20\\x20\\x20\\x20", + "MAJOR": "11", + "MINOR": "0", + "SCSI_IDENT_LUN_ATA": "QEMU_DVD-ROM_QM00002", + "SCSI_IDENT_LUN_T10": "ATA_QEMU_DVD-ROM_QM00002", + "SCSI_IDENT_LUN_VENDOR": "QM00002", + "SCSI_MODEL": "QEMU_DVD-ROM", + "SCSI_MODEL_ENC": "QEMU\\x20DVD-ROM\\x20\\x20\\x20\\x20", + "SCSI_REVISION": "2.5+", + "SCSI_TPGS": "0", + "SCSI_TYPE": "cd/dvd", + "SCSI_VENDOR": "QEMU", + "SCSI_VENDOR_ENC": "QEMU\\x20\\x20\\x20\\x20", + "SUBSYSTEM": "block", + "TAGS": ":seat:uaccess:systemd:", + "USEC_INITIALIZED": "1715729", + "attrs": { + "alignment_offset": "0", + "bdi": null, + "capability": "109", + "dev": "11:0", + "device": null, + "discard_alignment": "0", + "diskseq": "11", + "events": "media_change eject_request", + "events_async": "", + "events_poll_msecs": "-1", + "ext_range": "1", + "hidden": "0", + "inflight": " 0 0", + "range": "1", + "removable": "1", + "ro": "0", + "size": "1557112832", + "stat": " 13591 92 2903141 3523 0 0 0 0 0 6812 3523 0 0 0 0 0 0", + "subsystem": "block", + "uevent": "MAJOR=11\nMINOR=0\nDEVNAME=sr0\nDEVTYPE=disk\nDISKSEQ=11" + }, + "partitiontable": { + "label": "dos", + "id": "0x00000000", + "device": "/dev/sr0", + "unit": "sectors", + "sectorsize": 2048, + "partitions": [ + { + "node": "/dev/sr0p1", + "start": 64, + "size": 3032012, + "type": "83", + "bootable": true + }, + { + "node": "/dev/sr0p2", + "start": 3032076, + "size": 8496, + "type": "ef" + } + ] + } + } + }, + "filesystem": { + "/dev/sda1": { + "TYPE": "vfat", + "USAGE": "filesystem", + "UUID": "54E4-27B3", + "UUID_ENC": "54E4-27B3", + "VERSION": "FAT32", + "ESTIMATED_MIN_SIZE": -1 + }, + "/dev/sda3": { + "TYPE": "ntfs", + "USAGE": "filesystem", + "UUID": "C4E8E493E8E484D0", + "UUID_ENC": "C4E8E493E8E484D0", + "SIZE": 85240893952, + "ESTIMATED_MIN_SIZE": 21018488832 + }, + "/dev/sda4": { + "TYPE": "ntfs", + "USAGE": "filesystem", + "UUID": "7448E57248E53410", + "UUID_ENC": "7448E57248E53410", + "SIZE": 532673024, + "ESTIMATED_MIN_SIZE": 442748928 + }, + "/dev/sda5": { + "TYPE": "ext4", + "USAGE": "filesystem", + "UUID": "1981ceb1-b25f-4290-91d0-45c8f5865a47", + "UUID_ENC": "1981ceb1-b25f-4290-91d0-45c8f5865a47", + "VERSION": "1.0", + "SIZE": 23622320128, + "ESTIMATED_MIN_SIZE": 199974912 + }, + "/dev/sr0": { + "BOOT_SYSTEM_ID": "EL\\x20TORITO\\x20SPECIFICATION", + "DATA_PREPARER_ID": "XORRISO-1.5.2\\x202019.10.26.180001\\x2c\\x20LIBISOBURN-1.5.2\\x2c\\x20LIBISOFS-1.5.2\\x2c\\x20LIBBURN-1.5.2", + "LABEL": "Ubuntu_custom", + "LABEL_ENC": "Ubuntu\\x20custom", + "TYPE": "iso9660", + "USAGE": "filesystem", + "UUID": "2022-04-21-06-14-25-00", + "UUID_ENC": "2022-04-21-06-14-25-00", + "ESTIMATED_MIN_SIZE": -1 + } + }, + "mount": [ + { + "target": "/", + "source": "/cow", + "fstype": "overlay", + "options": "rw,relatime,lowerdir=/ubuntu-server-minimal.ubuntu-server.installer.generic.custom.squashfs:/ubuntu-server-minimal.ubuntu-server.installer.generic.squashfs:/ubuntu-server-minimal.ubuntu-server.installer.squashfs:/ubuntu-server-minimal.ubuntu-server.squashfs:/ubuntu-server-minimal.squashfs,upperdir=/cow/upper,workdir=/cow/work,xino=off", + "children": [ + { + "target": "/sys", + "source": "sysfs", + "fstype": "sysfs", + "options": "rw,nosuid,nodev,noexec,relatime", + "children": [ + { + "target": "/sys/kernel/security", + "source": "securityfs", + "fstype": "securityfs", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/fs/cgroup", + "source": "cgroup2", + "fstype": "cgroup2", + "options": "rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot" + }, + { + "target": "/sys/fs/pstore", + "source": "pstore", + "fstype": "pstore", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/firmware/efi/efivars", + "source": "efivarfs", + "fstype": "efivarfs", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/fs/bpf", + "source": "bpf", + "fstype": "bpf", + "options": "rw,nosuid,nodev,noexec,relatime,mode=700" + }, + { + "target": "/sys/kernel/debug", + "source": "debugfs", + "fstype": "debugfs", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/kernel/tracing", + "source": "tracefs", + "fstype": "tracefs", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/kernel/config", + "source": "configfs", + "fstype": "configfs", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/sys/fs/fuse/connections", + "source": "fusectl", + "fstype": "fusectl", + "options": "rw,nosuid,nodev,noexec,relatime" + } + ] + }, + { + "target": "/proc", + "source": "proc", + "fstype": "proc", + "options": "rw,nosuid,nodev,noexec,relatime", + "children": [ + { + "target": "/proc/sys/fs/binfmt_misc", + "source": "systemd-1", + "fstype": "autofs", + "options": "rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13814" + } + ] + }, + { + "target": "/dev", + "source": "udev", + "fstype": "devtmpfs", + "options": "rw,nosuid,relatime,size=5926676k,nr_inodes=1481669,mode=755,inode64", + "children": [ + { + "target": "/dev/pts", + "source": "devpts", + "fstype": "devpts", + "options": "rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000" + }, + { + "target": "/dev/shm", + "source": "tmpfs", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,inode64" + }, + { + "target": "/dev/mqueue", + "source": "mqueue", + "fstype": "mqueue", + "options": "rw,nosuid,nodev,noexec,relatime" + }, + { + "target": "/dev/hugepages", + "source": "hugetlbfs", + "fstype": "hugetlbfs", + "options": "rw,relatime,pagesize=2M" + } + ] + }, + { + "target": "/run", + "source": "tmpfs", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,noexec,relatime,size=1196564k,mode=755,inode64", + "children": [ + { + "target": "/run/lock", + "source": "tmpfs", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,noexec,relatime,size=5120k,inode64" + }, + { + "target": "/run/credentials/systemd-sysusers.service", + "source": "none", + "fstype": "ramfs", + "options": "ro,nosuid,nodev,noexec,relatime,mode=700" + }, + { + "target": "/run/user/999", + "source": "tmpfs", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,relatime,size=1196560k,nr_inodes=299140,mode=700,uid=999,gid=999,inode64" + }, + { + "target": "/run/snapd/ns", + "source": "tmpfs[/snapd/ns]", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,noexec,relatime,size=1196564k,mode=755,inode64", + "children": [ + { + "target": "/run/snapd/ns/lxd.mnt", + "source": "nsfs[mnt:[4026532220]]", + "fstype": "nsfs", + "options": "rw" + } + ] + } + ] + }, + { + "target": "/cdrom", + "source": "/dev/sr0", + "fstype": "iso9660", + "options": "ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8" + }, + { + "target": "/rofs", + "source": "/dev/loop0", + "fstype": "squashfs", + "options": "ro,noatime,errors=continue" + }, + { + "target": "/media/minimal", + "source": "/dev/loop5", + "fstype": "squashfs", + "options": "ro,relatime,errors=continue" + }, + { + "target": "/media/full", + "source": "/dev/loop6", + "fstype": "squashfs", + "options": "ro,relatime,errors=continue" + }, + { + "target": "/media/filesystem", + "source": "overlay", + "fstype": "overlay", + "options": "ro,relatime,lowerdir=/root/media/full:/root/media/minimal" + }, + { + "target": "/snap/lxd/22923", + "source": "/dev/loop7", + "fstype": "squashfs", + "options": "ro,nodev,relatime,errors=continue" + }, + { + "target": "/snap/core20/1434", + "source": "/dev/loop8", + "fstype": "squashfs", + "options": "ro,nodev,relatime,errors=continue" + }, + { + "target": "/snap/subiquity/x1", + "source": "/dev/loop9", + "fstype": "squashfs", + "options": "ro,nodev,relatime,errors=continue" + }, + { + "target": "/tmp", + "source": "tmpfs", + "fstype": "tmpfs", + "options": "rw,nosuid,nodev,relatime,inode64", + "children": [ + { + "target": "/tmp/tmpsqhaxnwt/ubuntu-server-minimal.squashfs.dir", + "source": "/dev/loop0", + "fstype": "squashfs", + "options": "ro,relatime,errors=continue" + }, + { + "target": "/tmp/tmpsqhaxnwt/ubuntu-server-minimal.ubuntu-server.squashfs.dir", + "source": "/dev/loop1", + "fstype": "squashfs", + "options": "ro,relatime,errors=continue" + }, + { + "target": "/tmp/tmpsqhaxnwt/root.dir", + "source": "overlay", + "fstype": "overlay", + "options": "ro,relatime,lowerdir=/tmp/tmpsqhaxnwt/ubuntu-server-minimal.ubuntu-server.squashfs.dir:/tmp/tmpsqhaxnwt/ubuntu-server-minimal.squashfs.dir" + } + ] + }, + { + "target": "/snap/snapd/15534", + "source": "/dev/loop10", + "fstype": "squashfs", + "options": "ro,nodev,relatime,errors=continue" + } + ] + } + ] + } +} From 40b2f3267b4b3cd35af626d63537608c9b8419ab Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 18 May 2022 16:56:29 -0600 Subject: [PATCH 4/9] storage/v2: report min part size --- subiquity/common/filesystem/labels.py | 1 + subiquity/common/types.py | 1 + subiquity/models/filesystem.py | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/subiquity/common/filesystem/labels.py b/subiquity/common/filesystem/labels.py index 122f8a08..742f7f33 100644 --- a/subiquity/common/filesystem/labels.py +++ b/subiquity/common/filesystem/labels.py @@ -319,6 +319,7 @@ def _for_client_partition(partition, *, min_size=0): offset=partition.offset, resize=partition.resize, path=partition._path(), + estimated_min_size=partition.estimated_min_size, mount=partition.mount, format=partition.format) diff --git a/subiquity/common/types.py b/subiquity/common/types.py index 533f4ec2..70f53170 100644 --- a/subiquity/common/types.py +++ b/subiquity/common/types.py @@ -268,6 +268,7 @@ class Partition: boot: Optional[bool] = None os: Optional[OsProber] = None offset: Optional[int] = None + estimated_min_size: Optional[int] = -1 resize: Optional[bool] = None path: Optional[str] = None diff --git a/subiquity/models/filesystem.py b/subiquity/models/filesystem.py index 0b11cba9..8f3b75b1 100644 --- a/subiquity/models/filesystem.py +++ b/subiquity/models/filesystem.py @@ -702,6 +702,16 @@ class Partition(_Formattable): from subiquity.common.filesystem import boot return boot.is_bootloader_partition(self) + @property + def estimated_min_size(self): + fs_data = self._m._probe_data.get('filesystem', {}).get(self._path()) + if fs_data is None: + return -1 + val = fs_data.get('ESTIMATED_MIN_SIZE') + if val == 0: + return self.device.alignment_data().part_align + return val + @property def ok_for_raid(self): if self.boot: From 73853e5769b3caf54a4f419edc52214a6a548d21 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Fri, 27 May 2022 11:17:53 -0600 Subject: [PATCH 5/9] snapcraft: rev probert --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 920ce34a..1e544b95 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -187,7 +187,7 @@ parts: - libnl-route-3-dev source: https://github.com/canonical/probert.git source-type: git - source-commit: 0e52863cb0a1637c6268a74f224f5cc2653beb9d + source-commit: 31778895be3002422e9e8758d42940f290dc70af requirements: [requirements.txt] stage: - "*" From 498d2203145ffe91413a607991f339b9f8201d28 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Fri, 27 May 2022 12:54:10 -0600 Subject: [PATCH 6/9] test/api: add MachineConfig class Make it easier to edit machine configs on the fly for test. --- subiquity/tests/api/test_api.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/subiquity/tests/api/test_api.py b/subiquity/tests/api/test_api.py index 4ef627b5..a47dc411 100755 --- a/subiquity/tests/api/test_api.py +++ b/subiquity/tests/api/test_api.py @@ -135,6 +135,27 @@ class Server(Client): class TestAPI(unittest.IsolatedAsyncioTestCase, SubiTestCase): + class _MachineConfig(os.PathLike): + def __init__(self, outer, path): + self.outer = outer + self.orig_path = path + self.path = None + + def __fspath__(self): + return self.path or self.orig_path + + @contextlib.contextmanager + def edit(self): + with open(self.orig_path, 'r') as fp: + data = json.load(fp) + yield data + self.path = self.outer.tmp_path('machine-config.json') + with open(self.path, 'w') as fp: + json.dump(data, fp) + + def machineConfig(self, path): + return self._MachineConfig(self, path) + def assertDictSubset(self, expected, actual): """All keys in dictionary expected, and matching values, must match keys and values in actual. Actual may contain additional keys and From b999cbc08702073f8da18e36a4a6ac5b418ba0ef Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Fri, 27 May 2022 13:37:12 -0600 Subject: [PATCH 7/9] test/api: test_resize cleanup --- subiquity/tests/api/test_api.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/subiquity/tests/api/test_api.py b/subiquity/tests/api/test_api.py index a47dc411..76cea1fa 100755 --- a/subiquity/tests/api/test_api.py +++ b/subiquity/tests/api/test_api.py @@ -874,23 +874,14 @@ class TestPartitionTableEditing(TestAPI): @timeout() async def test_resize(self): - # load config, edit size, use that for server - with open('examples/ubuntu-and-free-space.json', 'r') as fp: - data = json.load(fp) - - # expand sda3 to use the rest of the disk - def get_size(key): - return int(data['storage']['blockdev'][key]['attrs']['size']) - - sda_size = get_size('/dev/sda') - sda1_size = get_size('/dev/sda1') - sda2_size = get_size('/dev/sda2') - sda3_size = sda_size - sda1_size - sda2_size - (2 << 20) - data['storage']['blockdev']['/dev/sda3']['attrs']['size'] = \ - str(sda3_size) - cfg = self.tmp_path('machine-config.json') - with open(cfg, 'w') as fp: - json.dump(data, fp) + cfg = self.machineConfig('examples/ubuntu-and-free-space.json') + with cfg.edit() as data: + blockdev = data['storage']['blockdev'] + sizes = {k: int(v['attrs']['size']) for k, v in blockdev.items()} + # expand sda3 to use the rest of the disk + sda3_size = (sizes['/dev/sda'] - sizes['/dev/sda1'] + - sizes['/dev/sda2'] - (2 << 20)) + blockdev['/dev/sda3']['attrs']['size'] = str(sda3_size) extra = ['--storage-version', '2'] async with start_server(cfg, extra_args=extra) as inst: From 4d2d6455bf781da63f29f96d852378477e294012 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Fri, 27 May 2022 12:54:54 -0600 Subject: [PATCH 8/9] test/api: estimated_min --- subiquity/tests/api/test_api.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/subiquity/tests/api/test_api.py b/subiquity/tests/api/test_api.py index 76cea1fa..27204cb1 100755 --- a/subiquity/tests/api/test_api.py +++ b/subiquity/tests/api/test_api.py @@ -934,6 +934,26 @@ class TestPartitionTableEditing(TestAPI): self.assertTrue(sda3['resize']) self.assertTrue(sda3_format['preserve']) + @timeout() + async def test_est_min_size(self): + # load config, edit size, use that for server + cfg = self.machineConfig('examples/win10-along-ubuntu.json') + with cfg.edit() as data: + fs = data['storage']['filesystem'] + fs['/dev/sda1']['ESTIMATED_MIN_SIZE'] = 0 + # data file has no sda2 in filesystem + fs['/dev/sda3']['ESTIMATED_MIN_SIZE'] = -1 + fs['/dev/sda4']['ESTIMATED_MIN_SIZE'] = 1 << 30 + + extra = ['--storage-version', '2'] + async with start_server(cfg, extra_args=extra) as inst: + resp = await inst.get('/storage/v2') + [sda] = resp['disks'] + [p1, _, p3, p4, _] = sda['partitions'] + self.assertEqual(1 << 20, p1['estimated_min_size']) + self.assertEqual(-1, p3['estimated_min_size']) + self.assertEqual(1 << 30, p4['estimated_min_size']) + class TestGap(TestAPI): async def test_blank_disk_is_one_big_gap(self): From 69b765efd5bb29e6e5d9ed22abe1aa4243ec3293 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Tue, 31 May 2022 09:16:51 -0600 Subject: [PATCH 9/9] storage/v2: report aligned min size value --- subiquity/models/filesystem.py | 6 ++++-- subiquity/tests/api/test_api.py | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/subiquity/models/filesystem.py b/subiquity/models/filesystem.py index 8f3b75b1..35cbb00b 100644 --- a/subiquity/models/filesystem.py +++ b/subiquity/models/filesystem.py @@ -707,10 +707,12 @@ class Partition(_Formattable): fs_data = self._m._probe_data.get('filesystem', {}).get(self._path()) if fs_data is None: return -1 - val = fs_data.get('ESTIMATED_MIN_SIZE') + val = fs_data.get('ESTIMATED_MIN_SIZE', -1) if val == 0: return self.device.alignment_data().part_align - return val + if val == -1: + return -1 + return align_up(val, self.device.alignment_data().part_align) @property def ok_for_raid(self): diff --git a/subiquity/tests/api/test_api.py b/subiquity/tests/api/test_api.py index 27204cb1..911d6756 100755 --- a/subiquity/tests/api/test_api.py +++ b/subiquity/tests/api/test_api.py @@ -936,14 +936,13 @@ class TestPartitionTableEditing(TestAPI): @timeout() async def test_est_min_size(self): - # load config, edit size, use that for server cfg = self.machineConfig('examples/win10-along-ubuntu.json') with cfg.edit() as data: fs = data['storage']['filesystem'] fs['/dev/sda1']['ESTIMATED_MIN_SIZE'] = 0 # data file has no sda2 in filesystem fs['/dev/sda3']['ESTIMATED_MIN_SIZE'] = -1 - fs['/dev/sda4']['ESTIMATED_MIN_SIZE'] = 1 << 30 + fs['/dev/sda4']['ESTIMATED_MIN_SIZE'] = (1 << 20) + 1 extra = ['--storage-version', '2'] async with start_server(cfg, extra_args=extra) as inst: @@ -952,7 +951,7 @@ class TestPartitionTableEditing(TestAPI): [p1, _, p3, p4, _] = sda['partitions'] self.assertEqual(1 << 20, p1['estimated_min_size']) self.assertEqual(-1, p3['estimated_min_size']) - self.assertEqual(1 << 30, p4['estimated_min_size']) + self.assertEqual(2 << 20, p4['estimated_min_size']) class TestGap(TestAPI):