cloud-init disk_setup fails to partition disk for Ubuntu18
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
util-linux (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Xenial |
New
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Eoan |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned |
Bug Description
Pasting disk_setup for cloud-config:
disk_setup:
/dev/xvde:
layout: True
overwrite: False
type: mbr
fs_setup:
-device: /dev/xvde
filesystem: ext4
label: data
overwrite: false
partition: auto
I want to attach and mount a /data disk on the VM using cloud-init so I just want to single partition 100% of the disk.
Error while running the sfdisk command for partitioning the disk (please see attached file).
OS: Ubuntu18
How I repro-ed it outside cloud-init environment:
1. Open XenCenter, add a new disk, say /dev/xvdc
2. Run `/sbin/sfdisk --Linux --unit=S --force /dev/xvdc` and specify start sector as 0. Because from the cloud-init logs and source code, I figured that it was picking start sector as 0. Save it and see the error.
util-linux package version output from dpkg -l :
Version: 2.31.1-0.4ubuntu3.3
Arch: amd64
Name: util-linux