New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud-init disk_setup fails to partition disk for Ubuntu18 #3490
Comments
Launchpad user Chaynika Saikia(csaikia) wrote on 2019-11-05T21:58:53.627476+00:00 Launchpad attachments: cloud-init-disk-setup-err.PNG |
Launchpad user Chaynika Saikia(csaikia) wrote on 2019-11-05T22:02:51.264274+00:00 Launchpad attachments: cloud-init-disk-setup-err-2.PNG |
Launchpad user Chaynika Saikia(csaikia) wrote on 2019-11-05T22:27:21.251491+00:00 util-linux package version output from dpkg -l : |
Launchpad user Ryan Harper(raharper) wrote on 2019-11-05T22:45:19.465971+00:00 https://marc.info/?l=util-linux-ng&m=142920033601419&w=2 Seems to say this is by-design. util-linux/fdisk versions in Xenial and newer all have this issue. The workaround for user-data is to specify: disk_setup: Which will create a single partition spanning the whole disk. And cloud-init will need to emit ",," as input to sfdisk moving forward. |
Launchpad user Ryan Harper(raharper) wrote on 2019-11-05T22:50:43.369078+00:00 This should include an integration test in cloud_tests since it involves #cloud-config |
Launchpad user Ryan Harper(raharper) wrote on 2019-11-05T22:58:16.050640+00:00 On trusty; this complains but works. ubuntu@ubuntu: 253 0 10485760 vda Disk /dev/vdb: 20805 cylinders, 16 heads, 63 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature Device Boot Start End #sectors Id System Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) 253 0 10485760 vda |
Launchpad user Alberto Contreras(aciba) wrote on 2023-01-05T16:55:05.208356+00:00 Fixed in #1932 |
Launchpad user Alberto Contreras(aciba) wrote on 2023-02-22T16:52:16.969115+00:00 This bug is believed to be fixed in cloud-init in version 23.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1851438
Launchpad details
Launchpad user Chaynika Saikia(csaikia) wrote on 2019-11-05T21:58:53.627476+00:00
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:
/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.The text was updated successfully, but these errors were encountered: