This time you'll stamp the encryption settings on the new data disk at the platform level.ISO stands for International Organization for Standardization, which has defined the format for a disk image.
To update the encryption settings on the disk, add a new LV and enable the extension on the VM.Īdd a new LV, create a file system on it, and add it to /etc/fstab. These are some of the reasons why LVM-on-crypt is the recommended approach.Ĭheck the encryption information from the portal: The actual data disk has no encryption settings at the platform level, so its encryption status isn't updated. When Azure Data Encryption is used on traditional LVM configurations, the encrypted layer is created at the LV level, not at the disk level.Īt this point, the encrypted layer is expanded to the new disk. Verify the new sizes of the LV and file system: df -h /mountpoint Use lsblk to identify the LV that needs to be resized: lsblkĮxtend the LV size by using -r to increase the file system online: lvextend -r -L +2G /dev/vgname/lvname Verify that the PV was added to the PV list: pvsĮxtend the VG by adding the new PV to it: vgextend vgname /dev/newdisk Alternatively, you can use fdisk to create a partition and then use that partition for pvcreate. This method uses the whole disk as a PV without a partition. ls -l /dev/disk/azure/scsi1/Ĭreate a new PV on top of the new data disk: pvcreate /dev/newdisk ls -l /dev/disk/azure/scsi1/Īttach the new disk to the VM by following the instructions in Attach a data disk to a Linux VM.Ĭheck the disk list, and notice the new disk. Identify data disks by checking the devices in /dev/disk/azure/scsi1/. When you need to add a new disk to increase the VG size, extend your traditional LVM volume by adding a new PV.Ĭheck the current disk list. You can check the LV information again to confirm the changes at the level of the LV: lvdisplay lvnameĮxtend a traditional LVM volume by adding a new PV The size output indicates that the LV and file system were successfully resized. Verify the new sizes for the LV and the file system: df -h /mountpoint Increase the LV size by using -r to resize the file system online: lvextend -r -L +2G /dev/vgname/lvname Identify which LV needs to be resized: lsblkįor LVM-on-crypt, the difference is that this output shows that the encrypted layer is at the disk level. You can also use vgdisplay: vgdisplay vgname Verify that the VG has enough space to increase the LV: vgs Verify the current size of the file system that you want to increase: df -h /mountpoint You can use this method for nonencrypted disks, traditional LVM-encrypted volumes, and LVM-on-crypt configurations. The traditional way to resize LVs is to extend an LV when the VG has space available. Extend an LV when the VG has available space Replace these values with your own values to fit your environment. The examples use preexisting values for disks, PVs, VGs, LVs, file systems, universally unique identifiers (UUIDs), and mount points.
The following sections provide examples of how to use LVM and LVM-on-crypt. We don't recommend mixing traditional LVM encryption and LVM-on-crypt on the same VM. This method encrypts the entire disk, not just the LV. The recommended method for disk encryption is LVM-on-encrypt.
Traditional LVM and LVM-on-crypt configurations extend a logical volume (LV) when the volume group (VG) has available space. Traditional LVM and LVM-on-crypt configurations
For more information, see Configure LVM on a Linux VM.ĭisks that are already encrypted by Azure Disk Encryption. Red Hat Enterprise Linux (RHEL) 7 or laterĪn existing LVM configuration.You can use this resizing process in the following environments: To resize the disks, you'll use logical volume management (LVM) on Linux. In this article, you'll learn how to resize data disks that use Azure Disk Encryption.
Applies to: ✔️ Linux VMs ✔️ Flexible scale sets