Partitioning drive with existing partition fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Attempting to partition a device in AWS using mbr fails when there is an existing filesystem detected. Per smoser this is due to the need to wipefs which cloud-init doesn't currently do.
Cloud-init config:
#cloud-config
disk_setup:
ephemeral1:
table_type: mbr
layout: true
overwrite: true
fs_setup:
- label: None
filesystem: ext4
device: ephemeral1
partition: auto
overwrite: true
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: cloud-init 17.1-27-
ProcVersionSign
Uname: Linux 4.4.0-1041-aws x86_64
ApportVersion: 2.20.1-0ubuntu2.13
Architecture: amd64
CloudName: Amazon - Ec2
Date: Mon Dec 4 18:29:50 2017
Ec2AMI: ami-ed019997
Ec2AMIManifest: qbis-amis/
Ec2Availability
Ec2InstanceType: c3.2xlarge
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
As suggested to Patrick in IRC, this can be worked around by partitioning with gpt rather than MBR.