← Back to team overview

cloud-init team mailing list archive

Problems with disk_setup and cloud-init

 

Hi

I am trying to setup disks for my openstack instances with cloud init but it doesn't seem to work. I have this as my user-data:

#cloud-config
disk_setup:
    /dev/vdb:
        type: 'mbr'
        layout: 'true'
        overwrite: true
fs_setup:
    - label: 'scratch'
      filesystem: 'ext4'
      device: '/dev/vdb1'
mounts:
- [ 'LABEL=scratch', /scratch, ext4, "rw,noatime,nodiratime,user_xattr,acl", "0", "2" ]

But when I look at the openstack instance when it is created it doesn't seem to have worked:

mount |grep vdb
/dev/vdb on /mnt type ext4 (rw,relatime,data=ordered)


parted -s /dev/vdb print
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  21.5GB  21.5GB  ext4

grep "Cloud-init" /var/log/cloud-init-output.log |grep finished
Cloud-init v. 0.7.5 finished at Mon, 20 Feb 2017 08:49:36 +0000. Datasource DataSourceOpenStack [net,ver=2]. Up 22.65 seconds


I am also wondering if it is possible to disable the disk_setup module in cloud-init? If it is possible, how?

Regards,
Andreas