storage_layout = FlatStorageLayout(node)
storage_layout.configure()
raid_members = []
for bdev in raid_candidates:
raid_members.append(bdev.create_partition())
r = RAIDManager()
raiddev = r.create_raid(
FILESYSTEM_GROUP_TYPE.RAID_0, partitions=raid_members
)
I’ve been working on a project to dynamically create customize server storage layouts using MAAS preseeds. Thanks to some good advice from a couple colleagues, I have something that works pretty well for me. See my write-up on the MAAS discourse.