[Bug 1374166] Re: Document how to add swap space on Azure resource disk

Daniel Watkins daniel.watkins at canonical.com
Fri Jan 16 17:18:58 UTC 2015


OK, so passing a file containing the following as custom-data gives us a
swap partition and a mounted disk at /mnt:

#cloud-config
disk_setup:
    ephemeral0:
        table_type: mbr
        layout: [[66, 82], 33]
        overwrite: True
fs_setup:
    - device: ephemeral0.1
      filesystem: swap
    - device: ephemeral0.2
      filesystem: ext4
mounts:
    - ["ephemeral0.1", "none", "swap", "sw", "0", "0"]
    - ["ephemeral0.2", "/mnt"]

Like so:

$ mount
...
/dev/sdb2 on /mnt type ext4 (rw,_netdev)

$ swapon -s
Filename				Type		Size	Used	Priority
/dev/sdb1                               partition	418696184	0	-1

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1374166

Title:
  Document how to add swap space on Azure resource disk

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions



More information about the Ubuntu-server-bugs mailing list