Azure ephemeral disk and custom mount points
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The creation of custom mount points with cloud-config, when creating a (linux) VM in Azure, is fairly simple, with some caveats.
However, the format
[ ephemeralX, <mount point> ]
is not working properly, even when explicitly declaring device aliases.
The format
[ sdb, <mount point> ]
or
[ sdbX, <mount point> ]
is working properly.
The above is not really a bug, but an inconvenience that can require some improvement.
In addition, note the following.
An "accidental" declaration of (something similar like)
[ swap, <mount point or "None"> ]
will result in the ephemeral disk not being mounted at all, even if a declaration of missing fields is applied.
The above is a bug, in the sense that a (mis)declaration in (custom) config settings should not result in an unmounted ephemeral disk.
The same results apply, when partitioning the ephemeral disk to contain a swap partition of type 82 and assigning the partition to a specific device (a change in fs_setup does not affect the results in any way), in order to have a possibility to declare
[ <swap device>, <mount point> ]
and therefore having a mounted disk/device with Linux swap partition.
The swap partition will not function as a swap space after boot and/or a swap file, when created at boot, on the swap partition will not be active.
In essence, the creation of a swap partition will lead to
a) only (!) the mount of the swap space (if the swap partition is declared first in the disk_setup, like for instance
disk_setup:
ephmeral0:
table_type: 'mbr'
layout:
- [33, 82]
- 66
overwrite: True
),
OR
b) the mount of the disk partition (if the swap partition is declared last), with the disk partition being smaller than the whole ephemeral disk (as result of the disk setup).
The above has only been executed for testing purposes, these scenarios do not have to occur in reality.
In conclusion, in creation of Azure (linux) VMs, two (potential) bugs exist:
- the failure to create custom mount points when referring to ephemeral0 (the proper name of the disk in Azure),
- the dangers of and/or issues with declarations regarding swap mounts.
Kind regards.....
+1 :)
The [ sdb, <mount point> ] syntax is a bug as well. Device names are not persistent in Linux and could change, so it is not guaranteed that the ephemeral disk will be called /dev/sdb. Ideally this should be auto-detected in cloud-init at runtime (for example, see DeviceForIdePort() in the Azure Linux agent).