Skip to content

Commit 58806f3

Browse files
committed
edit pass: how-to-configure-lvm-raid-on-crypt
1 parent 2035c1b commit 58806f3

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

articles/virtual-machines/linux/how-to-configure-lvm-raid-on-crypt.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,26 @@ In a similar way, the RAID device is created on top of the encrypted layer on th
4242

4343
We recommend that you use LVM-on-crypt. RAID is an option when LVM can't be used because of specific application or environment limitations.
4444

45-
You'll use the **EncryptFormatAll** option. For more information, see [Use the EncryptFormatAll feature for data disks on Linux VMs](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-linux#use-encryptformatall-feature-for-data-disks-on-linux-vms).
45+
You'll use the **EncryptFormatAll** option. For more information about this option, see [Use the EncryptFormatAll feature for data disks on Linux VMs](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-linux#use-encryptformatall-feature-for-data-disks-on-linux-vms).
4646

4747
Although you can use this method when you're also encrypting the OS, we're just encrypting data drives here.
4848

49-
This procedure assumes you already reviewed the prerequisites mentioned in [Azure Disk Encryption scenarios on Linux VMs](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-linux) and in [Quickstart: Create and encrypt a Linux VM with the Azure CLI](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-cli-quickstart).
49+
The procedures assume that you already reviewed the prerequisites mentioned in [Azure Disk Encryption scenarios on Linux VMs](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-linux) and in [Quickstart: Create and encrypt a Linux VM with the Azure CLI](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption-cli-quickstart).
5050

5151
The Azure Disk Encryption dual-pass version is on a deprecation path and should no longer be used on new encryptions.
5252

5353
## General steps
5454

55-
When you're using the "on crypt" configurations, use the process outlined in the following procedures.
55+
When you're using the "on-crypt" configurations, use the process outlined in the following procedures.
5656

5757
>[!NOTE]
5858
>We're using variables throughout the article. Replace the values accordingly.
5959
6060
### Deploy a VM
61-
The following commands are optional, but we recommend that you to apply them on a newly deployed virtual machine (VM).
61+
The following commands are optional, but we recommend that you apply them on a newly deployed virtual machine (VM).
6262

6363
PowerShell:
64+
6465
```powershell
6566
New-AzVm -ResourceGroupName ${RGNAME} `
6667
-Name ${VMNAME} `
@@ -71,6 +72,7 @@ New-AzVm -ResourceGroupName ${RGNAME} `
7172
-Verbose
7273
```
7374
Azure CLI:
75+
7476
```bash
7577
az vm create \
7678
-n ${VMNAME} \
@@ -83,9 +85,10 @@ az vm create \
8385
-o table
8486
```
8587
### Attach disks to the VM
86-
Repeat the following commands for `$N` number of new disks you want to attach to the VM.
88+
Repeat the following commands for `$N` number of new disks that you want to attach to the VM.
89+
90+
PowerShell:
8791

88-
PowerShell
8992
```powershell
9093
$storageType = 'Standard_LRS'
9194
$dataDiskName = ${VMNAME} + '_datadisk0'
@@ -95,7 +98,9 @@ $vm = Get-AzVM -Name ${VMNAME} -ResourceGroupName ${RGNAME}
9598
$vm = Add-AzVMDataDisk -VM $vm -Name $dataDiskName -CreateOption Attach -ManagedDiskId $dataDisk1.Id -Lun 0
9699
Update-AzVM -VM ${VM} -ResourceGroupName ${RGNAME}
97100
```
101+
98102
Azure CLI:
103+
99104
```bash
100105
az vm disk attach \
101106
-g ${RGNAME} \
@@ -105,9 +110,9 @@ az vm disk attach \
105110
--new \
106111
-o table
107112
```
113+
108114
### Verify that the disks are attached to the VM
109115
PowerShell:
110-
111116
```powershell
112117
$VM = Get-AzVM -ResourceGroupName ${RGNAME} -Name ${VMNAME}
113118
$VM.StorageProfile.DataDisks | Select-Object Lun,Name,DiskSizeGB
@@ -154,7 +159,7 @@ for disk in c d e f; do echo mkfs.ext4 -F /dev/sd${disk}; done |bash
154159
```
155160
![Creation of an ext4 file system](./media/disk-encryption/lvm-raid-on-crypt/005-lvm-raid-create-temp-fs.png)
156161

157-
Find the universally unique identifier (UUID) of the file systems that you recently created, create a temporary folder to mount it, add the corresponding entries on /etc/fstab, and mount all the file systems.
162+
Find the universally unique identifier (UUID) of the file systems that you recently created, create a temporary folder, add the corresponding entries on /etc/fstab, and mount all the file systems.
158163

159164
This command also iterates on each disk defined on the "in" part of the "for" cycle:
160165

@@ -172,7 +177,7 @@ lsblk
172177
```
173178
![List of mounted temporary file systems](./media/disk-encryption/lvm-raid-on-crypt/006-lvm-raid-verify-temp-fs.png)
174179

175-
Also very that the disks are configured:
180+
Also verify that the disks are configured:
176181

177182
```bash
178183
cat /etc/fstab
@@ -218,25 +223,25 @@ PowerShell:
218223
```powershell
219224
Get-AzVmDiskEncryptionStatus -ResourceGroupName ${RGNAME} -VMName ${VMNAME}
220225
```
221-
![Encryption status through PowerShell](./media/disk-encryption/lvm-raid-on-crypt/008-lvm-raid-verify-encryption-status-ps.png)
226+
![Encryption status in PowerShell](./media/disk-encryption/lvm-raid-on-crypt/008-lvm-raid-verify-encryption-status-ps.png)
222227

223228
Azure CLI:
224229

225230
```bash
226231
az vm encryption show -n ${VMNAME} -g ${RGNAME} -o table
227232
```
228-
![Encryption status through the Azure CLI](./media/disk-encryption/lvm-raid-on-crypt/009-lvm-raid-verify-encryption-status-cli.png)
233+
![Encryption status in the Azure CLI](./media/disk-encryption/lvm-raid-on-crypt/009-lvm-raid-verify-encryption-status-cli.png)
229234

230235
Portal:
231236

232-
![Encryption status through the portal](./media/disk-encryption/lvm-raid-on-crypt/010-lvm-raid-verify-encryption-status-portal.png)
237+
![Encryption status in the portal](./media/disk-encryption/lvm-raid-on-crypt/010-lvm-raid-verify-encryption-status-portal.png)
233238

234239
OS level:
235240

236241
```bash
237242
lsblk
238243
```
239-
![Encryption status through the OS](./media/disk-encryption/lvm-raid-on-crypt/011-lvm-raid-verify-encryption-status-os.png)
244+
![Encryption status in the OS](./media/disk-encryption/lvm-raid-on-crypt/011-lvm-raid-verify-encryption-status-os.png)
240245

241246
The extension will add the file systems to /var/lib/azure_disk_encryption_config/azure_crypt_mount (an old encryption) or to /etc/crypttab (new encryptions).
242247

@@ -286,10 +291,10 @@ echo "y" | pvcreate /dev/mapper/6712ad6f-65ce-487b-aa52-462f381611a1
286291
echo "y" | pvcreate /dev/mapper/ea607dfd-c396-48d6-bc54-603cf741bc2a
287292
echo "y" | pvcreate /dev/mapper/4159c60a-a546-455b-985f-92865d51158c
288293
```
289-
![Verification that a physical volume was craeted](./media/disk-encryption/lvm-raid-on-crypt/014-lvm-raid-pvcreate.png)
294+
![Verification that a physical volume was created](./media/disk-encryption/lvm-raid-on-crypt/014-lvm-raid-pvcreate.png)
290295

291296
>[!NOTE]
292-
>The /dev/mapper/device names here need to be replaced for your actual values based on the output of lsblk.
297+
>The /dev/mapper/device names here need to be replaced for your actual values based on the output of **lsblk**.
293298
294299
#### Verify the information for physical volumes
295300
```bash
@@ -367,10 +372,10 @@ It's important to make sure that the **nofail** option is added to the mount poi
367372

368373
If you don't use the **nofail** option:
369374

370-
- The OS will never get into the stage where Azure Disk Encryption is started, and the data disks are unlocked and mounted.
375+
- The OS will never get into the stage where Azure Disk Encryption is started and the data disks are unlocked and mounted.
371376
- The encrypted disks will be unlocked at the end of the boot process. The LVM volumes and file systems will be automatically mounted until Azure Disk Encryption unlocks them.
372377

373-
You can test rebooting the VM and validate that the file systems are also automatically getting mounted after boot time. This process might take several minutes, depending on the number and the sizes of file systems.
378+
You can test rebooting the VM and validate that the file systems are also automatically getting mounted after boot time. This process might take several minutes, depending on the number and sizes of file systems.
374379

375380
#### Reboot the VM and verify after reboot
376381

@@ -399,7 +404,7 @@ mdadm --create /dev/md10 \
399404
>[!NOTE]
400405
>The /dev/mapper/device names here need to be replaced with your actual values, based on the output of **lsblk**.
401406
402-
### Check/monitor the RAID creation
407+
### Check/monitor RAID creation
403408
```bash
404409
watch -n1 cat /proc/mdstat
405410
mdadm --examine /dev/mapper/[]
@@ -422,7 +427,7 @@ mount -a; \
422427
done
423428
```
424429

425-
Verify that the new file systems are mounted:
430+
Verify that the new file system is mounted:
426431

427432
```bash
428433
lsblk -fs
@@ -434,10 +439,10 @@ It's important to make sure that the **nofail** option is added to the mount poi
434439

435440
If you don't use the **nofail** option:
436441

437-
- The OS will never get into the stage where Azure Disk Encryption is started, and the data disks are unlocked and mounted.
442+
- The OS will never get into the stage where Azure Disk Encryption is started and the data disks are unlocked and mounted.
438443
- The encrypted disks will be unlocked at the end of the boot process. The RAID volumes and file systems will be automatically mounted until Azure Disk Encryption unlocks them.
439444

440-
You can test rebooting the VM and validate that the file systems are also automatically getting mounted after boot time. This process might take several minutes, depending on the number and the sizes of file systems.
445+
You can test rebooting the VM and validate that the file systems are also automatically getting mounted after boot time. This process might take several minutes, depending on the number and sizes of file systems.
441446

442447
```bash
443448
shutdown -r now

0 commit comments

Comments
 (0)