Skip to content

Commit a0874ab

Browse files
Merge pull request #233811 from msaenzbosupport/patch-10
[Doc-A-THon] Updating Code Block for output.
2 parents 1cc91ae + 8d5119d commit a0874ab

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

articles/virtual-machines/linux/detach-disk.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dmesg | grep SCSI
4141

4242
The output is similar to the following example:
4343

44-
```bash
44+
```output
4545
[ 0.294784] SCSI subsystem initialized
4646
[ 0.573458] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
4747
[ 7.110271] sd 2:0:0:0: [sda] Attached SCSI disk
@@ -57,7 +57,7 @@ sudo -i blkid
5757

5858
The output looks similar to the following example:
5959

60-
```bash
60+
```output
6161
/dev/sda1: UUID="11111111-1b1b-1c1c-1d1d-1e1e1e1e1e1e" TYPE="ext4"
6262
/dev/sdb1: UUID="22222222-2b2b-2c2c-2d2d-2e2e2e2e2e2e" TYPE="ext4"
6363
/dev/sdc1: UUID="33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e" TYPE="ext4"
@@ -71,7 +71,7 @@ Edit the */etc/fstab* file to remove references to the disk.
7171
7272
Open the **/etc/fstab** file in a text editor and remove the line containing the UUID of your disk. Using the example values in this article, the line would look like the following:
7373

74-
```bash
74+
```config
7575
UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /datadrive ext4 defaults,nofail 1 2
7676
```
7777

@@ -89,10 +89,7 @@ sudo umount /dev/sdc1 /datadrive
8989
This example detaches the *myDataDisk* disk from VM named *myVM* in *myResourceGroup*.
9090

9191
```azurecli
92-
az vm disk detach \
93-
-g myResourceGroup \
94-
--vm-name myVm \
95-
-n myDataDisk
92+
az vm disk detach -g myResourceGroup --vm-name myVm -n myDataDisk
9693
```
9794

9895
The disk stays in storage but is no longer attached to a virtual machine.
@@ -116,4 +113,4 @@ The disk stays in storage but is no longer attached to a virtual machine. The di
116113
## Next steps
117114
If you want to reuse the data disk, you can just [attach it to another VM](add-disk.md).
118115

119-
If you want to delete the disk, so that you no longer incur storage costs, see [Find and delete unattached Azure managed and unmanaged disks - Azure portal](../disks-find-unattached-portal.md).
116+
If you want to delete the disk, so that you no longer incur storage costs, see [Find and delete unattached Azure managed and unmanaged disks - Azure portal](../disks-find-unattached-portal.md).

0 commit comments

Comments
 (0)