You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-restore-files-from-vm.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,12 +235,12 @@ Once the script is run, the LVM partitions are mounted in the physical volume(s)
235
235
To list the volume group names:
236
236
237
237
```bash
238
-
pvs -o +vguuid
238
+
sudo pvs -o +vguuid
239
239
```
240
240
241
241
This command will list all physical volumes (including the ones present before running the script), their corresponding volume group names, and the volume group's unique user IDs (UUIDs). A sample output of the command is shown below.
@@ -260,7 +260,7 @@ The first column (PV) shows the physical volume, the subsequent columns show the
260
260
261
261
There are scenarios where volume group names can have 2 UUIDs after running the script. It means that the volume group names in the machine where the script is executed and in the backed-up VM are the same. Then we need to rename the backed-up VMs volume groups. Take a look at the example below.
@@ -281,8 +281,8 @@ The script output would have shown /dev/sdg, /dev/sdh, /dev/sdm2 as attached. So
281
281
Now we need to rename VG names for script-based volumes, for example: /dev/sdg, /dev/sdh, /dev/sdm2. To rename the volume group, use the following command
282
282
283
283
```bash
284
-
vgimportclone -n rootvg_new /dev/sdm2
285
-
vgimportclone -n APPVg_2 /dev/sdg /dev/sdh
284
+
sudo vgimportclone -n rootvg_new /dev/sdm2
285
+
sudo vgimportclone -n APPVg_2 /dev/sdg /dev/sdh
286
286
```
287
287
288
288
Now we have all VG names with unique IDs.
@@ -292,23 +292,21 @@ Now we have all VG names with unique IDs.
292
292
Make sure that the Volume groups corresponding to script's volumes are active. The following command is used to display active volume groups. Check whether the script's related volume groups are present in this list.
293
293
294
294
```bash
295
-
vgdisplay -a
295
+
sudo vgdisplay -a
296
296
```
297
297
298
298
Otherwise, activate the volume group by using the following command.
299
299
300
300
```bash
301
-
#!/bin/bash
302
-
vgchange –a y <volume-group-name>
301
+
sudo vgchange –a y <volume-group-name>
303
302
```
304
303
305
304
##### Listing logical volumes within Volume groups
306
305
307
306
Once we get the unique, active list of VGs related to the script, then the logical volumes present in those volume groups can be listed using the following command.
308
307
309
308
```bash
310
-
#!/bin/bash
311
-
lvdisplay <volume-group-name>
309
+
sudo lvdisplay <volume-group-name>
312
310
```
313
311
314
312
This command displays the path of each logical volume as 'LV Path'.
@@ -318,8 +316,7 @@ This command displays the path of each logical volume as 'LV Path'.
318
316
To mount the logical volumes to the path of your choice:
319
317
320
318
```bash
321
-
#!/bin/bash
322
-
mount <LV path from the lvdisplay cmd results></mountpath>
319
+
sudo mount <LV path from the lvdisplay cmd results></mountpath>
323
320
```
324
321
325
322
> [!WARNING]
@@ -330,17 +327,15 @@ mount <LV path from the lvdisplay cmd results> </mountpath>
330
327
The following command displays details about all raid disks:
331
328
332
329
```bash
333
-
#!/bin/bash
334
-
mdadm –detail –scan
330
+
sudo mdadm –detail –scan
335
331
```
336
332
337
333
The relevant RAID disk is displayed as `/dev/mdm/<RAID array name in the protected VM>`
338
334
339
335
Use the mount command if the RAID disk has physical volumes:
340
336
341
337
```bash
342
-
#!/bin/bash
343
-
mount [RAID Disk Path] [/mountpath]
338
+
sudo mount [RAID Disk Path] [/mountpath]
344
339
```
345
340
346
341
If the RAID disk has another LVM configured in it, then use the preceding procedure for LVM partitions but use the volume name in place of the RAID Disk name.
0 commit comments