Hi,

these are the steps I've used to add a swap partition to my Ubuntu VM on
Azure:

1) Add from Azure portal a new data disk (in my case I added 2 data
disk, the first is a 100 GB disk, the second one is a 6GB size for swap
partition)

“/dev/sda” is the Azure VM OS disk;
“/dev/sdb” is the Azure VM local temporary disk;
“/dev/sdc” is the first Azure VM added data disk (100GB);
“/dev/sdd” is the second Azure VM added data disk (6GB);

2) create a new swap partition on /dev/sdd. Use cfdisk as follows:
# cfdisk /dev/sdd

partition type: Primary
FS type: Linux swap / Solaris (id 82)

3) mount swap partition on boot.
# nano /etc/fstab

append the following line and save the file: 
/dev/sdd1       none    swap    sw      0       0

4) reboot the VM

5) create the swap partition. Use the following commands:
# mkswap /dev/sdd1
# swapon /dev/sdd1

6) verify if partition has been successfully created:
# cat /proc/swaps

Hope this helps,
Cracco

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to 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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to