#!/bin/bash # sudo maas $PROFILE commissioning-scripts create name=41-maas-gpt-storage-layout content@=./maas-gpt-storage-layout # sudo maas $PROFILE node-script delete 41-maas-gpt-storage-layout if [ -z "$MAAS_STORAGE_CONFIG_FILE"]; then MAAS_STORAGE_CONFIG_FILE="/storage-config.json" fi echo "Apply a custom storage layout..." echo '{ "layout": { "vda": { "type": "disk", "ptable": "gpt", "boot": true, "partitions": [ { "name": "vda1", "fs": "vfat", "size": "500M", "bootable": true }, { "name": "vda2", "size": "2G", "fs": "xfs" }, { "name": "vda3", "size": "20G", "fs": "xfs" } ] } }, "mounts": { "/": { "device": "vda3", "options": "noatime" }, "/boot/": { "device": "vda2" }, "/boot/efi": { "device": "vda1" } } }' > $MAAS_STORAGE_CONFIG_FILE exit 0