Hi, I have a set of hundred machines with triple SSD drives, where I want to deploy Ubuntu 18.04 with MAAS version: 2.4.2 (7034-g2f5deb8b8-0ubuntu1).
I wanted to install Ubuntu on /dev/mdadm127 RAID1 devices, which should be possible with curtin configuration. I tried configuring RAID in GUI, and it didn’t work with message:
Custom storage configuration only supported on Ubuntu. Using flat layout.
When I try to install with flat layout, it curses about hardware RAID controller:
curtin: Installation started. (19.1-7-g37a7a0f4-0ubuntu1~18.04.1)
third party drivers not installed or necessary.
/dev/md127 (size=0): 1048576 bytes from 0 > size.
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: /dev/md127 (size=0): 1048576 bytes from 0 > size.
Stderr: ''
What I want to do is manually re-configure storage with curtin. Before releasing the machine, I can read my current config with $ maas admin machine get-curtin-config tadswg
:
Success.
Machine-readable output follows:
apt:
preserve_sources_list: false
primary:
- arches:
- default
uri: http://archive.ubuntu.com/ubuntu
proxy: http://10.100.70.24:8000/
security:
- arches:
- default
uri: http://archive.ubuntu.com/ubuntu
cloudconfig:
maas-cloud-config:
content: "#cloud-config\ndatasource:\n MAAS: {consumer_key: bqeNggnjHbtbn8gcft,\
\ metadata_url: 'http://10.100.70.24:5240/MAAS/metadata/',\n token_key: DyMEt5GDsZVQxvGxqq,\
\ token_secret: BUaPp2csacdkULq6ZwXdAAGt8dzD4Vbf}\n"
path: /etc/cloud/cloud.cfg.d/90_maas_cloud_config.cfg
maas-datasource:
content: 'datasource_list: [ MAAS ]'
path: /etc/cloud/cloud.cfg.d/90_maas_datasource.cfg
maas-reporting:
content: "#cloud-config\nreporting:\n maas: {consumer_key: bqeNggnjHbtbn8gcft,\
\ endpoint: 'http://10.100.70.24:5240/MAAS/metadata/status/tadswg',\n token_key:\
\ DyMEt5GDsZVQxvGxqq, token_secret: BUaPp2csacdkULq6ZwXdAAGt8dzD4Vbf,\n type:\
\ webhook}\n"
path: /etc/cloud/cloud.cfg.d/90_maas_cloud_init_reporting.cfg
maas-ubuntu-sso:
content: '#cloud-config
snappy: {email: admin@maas}
'
path: /etc/cloud/cloud.cfg.d/90_maas_ubuntu_sso.cfg
debconf_selections:
grub2: grub2 grub2/update_nvram boolean false
maas: 'cloud-init cloud-init/datasources multiselect MAAS
cloud-init cloud-init/maas-metadata-url string http://10.100.70.24:5240/MAAS/metadata/
cloud-init cloud-init/maas-metadata-credentials string oauth_consumer_key=bqeNggnjHbtbn8gcft&oauth_token_key=DyMEt5GDsZVQxvGxqq&oauth_token_secret=BUaPp2csacdkULq6ZwXdAAGt8dzD4Vbf
cloud-init cloud-init/local-cloud-config string apt:\n preserve_sources_list:
false\n primary:\n - arches: [default]\n uri: http://archive.ubuntu.com/ubuntu\n proxy:
http://10.100.70.24:8000/\n security:\n - arches: [default]\n uri: http://archive.ubuntu.com/ubuntu\napt_preserve_sources_list:
true\napt_proxy: http://10.100.70.24:8000/\nmanage_etc_hosts: false\nmanual_cache_clean:
true\nreporting:\n maas: {consumer_key: bqeNggnjHbtbn8gcft, endpoint: ''http://10.100.70.24:5240/MAAS/metadata/status/tadswg'',\n token_key:
DyMEt5GDsZVQxvGxqq, token_secret: BUaPp2csacdkULq6ZwXdAAGt8dzD4Vbf,\n type:
webhook}\nsystem_info:\n package_mirrors:\n - arches: [i386, amd64]\n failsafe:
{primary: ''http://archive.ubuntu.com/ubuntu'', security: ''http://security.ubuntu.com/ubuntu''}\n search:\n primary:
[''http://archive.ubuntu.com/ubuntu'']\n security: [''http://archive.ubuntu.com/ubuntu'']\n -
arches: [default]\n failsafe: {primary: ''http://ports.ubuntu.com/ubuntu-ports'',
security: ''http://ports.ubuntu.com/ubuntu-ports''}\n search:\n primary:
[''http://ports.ubuntu.com/ubuntu-ports'']\n security: [''http://ports.ubuntu.com/ubuntu-ports'']\n
'
early_commands:
driver_00:
- sh
- -c
- echo third party drivers not installed or necessary.
install:
error_tarfile: /tmp/curtin-logs.tar
log_file: /tmp/install.log
post_files:
- /tmp/install.log
- /tmp/curtin-logs.tar
kernel:
mapping: {}
package: linux-signed-generic
late_commands:
maas:
- wget
- --no-proxy
- http://10.100.70.24:5240/MAAS/metadata/latest/by-id/tadswg/
- --post-data
- op=netboot_off
- -O
- /dev/null
network:
config:
- id: eno1
mac_address: ac:1f:6b:bc:de:40
mtu: 1500
name: eno1
subnets:
- address: 10.100.70.228/24
gateway: 10.100.70.1
type: static
type: physical
- id: eno2
mac_address: ac:1f:6b:bc:de:41
mtu: 1500
name: eno2
subnets:
- type: manual
type: physical
- address:
- 10.100.70.24
search:
- maas
type: nameserver
version: 1
network_commands:
builtin:
- curtin
- net-meta
- custom
partitioning_commands:
builtin:
- curtin
- block-meta
- custom
reporting:
maas:
consumer_key: bqeNggnjHbtbn8gcft
endpoint: http://10.100.70.24:5240/MAAS/metadata/status/tadswg
token_key: DyMEt5GDsZVQxvGxqq
token_secret: BUaPp2csacdkULq6ZwXdAAGt8dzD4Vbf
type: webhook
storage:
config:
- id: sda
model: INTEL SSDSC2KB48
name: sda
ptable: msdos
serial: PHYF922104E4480BGN
type: disk
wipe: superblock
- id: sdb
model: INTEL SSDSC2KB48
name: sdb
serial: PHYF922102A6480BGN
type: disk
wipe: superblock
- grub_device: true
id: sdc
model: INTEL SSDSC2KB48
name: sdc
ptable: gpt
serial: PHYF922101PJ480BGN
type: disk
wipe: superblock
- device: sdc
flag: bios_grub
id: sdc-part1
number: 1
offset: 4194304B
size: 1048576B
type: partition
wipe: zero
- id: nvme1n1
model: INTEL SSDPE2KE016T8
name: nvme1n1
serial: PHLN928000TA1P6AGN
type: disk
wipe: superblock
- id: nvme2n1
model: INTEL SSDPE2KE016T8
name: nvme2n1
serial: PHLN928000831P6AGN
type: disk
wipe: superblock
- id: nvme0n1
model: INTEL SSDPE2KE016T8
name: nvme0n1
serial: PHLN928000811P6AGN
type: disk
wipe: superblock
- id: nvme3n1
model: INTEL SSDPE2KE016T8
name: nvme3n1
serial: PHLN928000QY1P6AGN
type: disk
wipe: superblock
- device: sda
id: sda-part1
name: sda-part1
number: 1
offset: 4194304B
size: 480096813056B
type: partition
uuid: 2266c72d-bccb-45ae-b3eb-ed7a6585acc8
wipe: superblock
- fstype: ext4
id: sda-part1_format
label: root
type: format
uuid: a1ee3691-936c-4bb7-82a3-8d6e2468e9ac
volume: sda-part1
- device: sda-part1_format
id: sda-part1_mount
path: /
type: mount
version: 1
But how do I write my own custom storage config? Feels like it should be some file in /etc/maas/preseeds
, something like curtin_userdata
, but what?
Thanks!