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
Once connected to your VM, you need to find the disk. In this example, we are using `lsblk` to list the disks.
58
+
Once you connect to your VM, find the disk. In this example, we're using `lsblk` to list the disks.
59
59
60
60
```bash
61
61
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
@@ -73,19 +73,19 @@ sdb 1:0:1:0 14G
73
73
sdc 3:0:0:0 50G
74
74
```
75
75
76
-
Here, `sdc` is the disk that we want, because it is 50G. If you add multiple disks, and aren't sure which disk it is based on size alone, you can go to the VM page in the portal, select **Disks**, and check the LUN number for the disk under **Data disks**. Compare the LUN number from the portal to the last number of the **HTCL** portion of the output, which is the LUN.
76
+
Here, `sdc` is the disk that we want, because it's 50G. If you add multiple disks, and aren't sure which disk it's based on size alone, you can go to the VM page in the portal, select **Disks**, and check the LUN number for the disk under **Data disks**. Compare the LUN number from the portal to the last number of the **HTCL** portion of the output, which is the LUN.
77
77
78
78
79
79
### Format the disk
80
80
81
-
Format the disk with `parted`, if the disk size is 2 tebibytes (TiB) or larger then you must use GPT partitioning, if it is under 2TiB, then you can use either MBR or GPT partitioning.
81
+
Format the disk with `parted`, if the disk size is two tebibytes (TiB) or larger then you must use GPT partitioning, if it is under 2TiB, then you can use either MBR or GPT partitioning.
82
82
83
83
> [!NOTE]
84
84
> It is recommended that you use the latest version `parted` that is available for your distro.
85
85
> If the disk size is 2 tebibytes (TiB) or larger, you must use GPT partitioning. If disk size is under 2 TiB, then you can use either MBR or GPT partitioning.
86
86
87
87
88
-
The following example uses `parted` on `/dev/sdc`, which is where the first data disk will typically be on most VMs. Replace `sdc` with the correct option for your disk. We are also formatting it using the [XFS](https://xfs.wiki.kernel.org/) filesystem.
88
+
The following example uses `parted` on `/dev/sdc`, which is where the first data disk will typically be on most VMs. Replace `sdc` with the correct option for your disk. We're also formatting it using the [XFS](https://xfs.wiki.kernel.org/) filesystem.
@@ -112,7 +112,7 @@ sudo mount /dev/sdc1 /datadrive
112
112
113
113
### Persist the mount
114
114
115
-
To ensure that the drive is remounted automatically after a reboot, it must be added to the */etc/fstab* file. It is also highly recommended that the UUID (Universally Unique Identifier) is used in */etc/fstab* to refer to the drive rather than just the device name (such as, */dev/sdc1*). If the OS detects a disk error during boot, using the UUID avoids the incorrect disk being mounted to a given location. Remaining data disks would then be assigned those same device IDs. To find the UUID of the new drive, use the `blkid` utility:
115
+
To ensure that the drive is remounted automatically after a reboot, it must be added to the */etc/fstab* file. It's also highly recommended that the UUID (Universally Unique Identifier) is used in */etc/fstab* to refer to the drive rather than just the device name (such as, */dev/sdc1*). If the OS detects a disk error during boot, using the UUID avoids the incorrect disk being mounted to a given location. Remaining data disks would then be assigned those same device IDs. To find the UUID of the new drive, use the `blkid` utility:
116
116
117
117
```bash
118
118
sudo blkid
@@ -137,7 +137,7 @@ Next, open the **/etc/fstab** file in a text editor. Add a line to the end of th
When you are done editing the file, save and close the editor.
140
+
When you're done editing the file, save and close the editor.
141
141
142
142
> [!NOTE]
143
143
> Later removing a data disk without editing fstab could cause the VM to fail to boot. Most distributions provide either the *nofail* and/or *nobootwait* fstab options. These options allow a system to boot even if the disk fails to mount at boot time. Consult your distribution's documentation for more information on these parameters.
* To ensure your Linux VM is configured correctly, review the [Optimize your Linux machine performance](/previous-versions/azure/virtual-machines/linux/optimization) recommendations.
191
-
* Expand your storage capacity by adding additional disks and [configure RAID](/previous-versions/azure/virtual-machines/linux/configure-raid) foradditional performance.
191
+
* Expand your storage capacity by adding more disks and [configure RAID](/previous-versions/azure/virtual-machines/linux/configure-raid) forextra performance.
Once connected to your VM, you need to find the disk. In this example, we are using `lsblk` to list the disks.
60
+
Once connected to your VM, you need to find the disk. In this example, we're using `lsblk` to list the disks.
61
61
62
62
```bash
63
63
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
@@ -75,15 +75,15 @@ sdb 1:0:1:0 14G
75
75
sdc 3:0:0:0 4G
76
76
```
77
77
78
-
In this example, the disk that added was `sdc`. It is a LUN 0 and is 4GB.
78
+
In this example, the disk that was added was `sdc`. It's a LUN 0 and is 4GB.
79
79
80
-
For a more complex example, here is what multiple data disks look like in the portal:
80
+
For a more complex example, here's what multiple data disks look like in the portal:
81
81
82
82
:::image type="content" source="./media/attach-disk-portal/find-disk.png" alt-text="Screenshot of multiple disks shown in the portal.":::
83
83
84
84
In the image, you can see that there are 3 data disks: 4 GB on LUN 0, 16GB at LUN 1, and 32G at LUN 2.
85
85
86
-
Here is what that might look like using `lsblk`:
86
+
Here's what that might look like using `lsblk`:
87
87
88
88
```bash
89
89
sda 0:0:0:0 30G
@@ -105,14 +105,14 @@ From the output of `lsblk` you can see that the 4GB disk at LUN 0 is `sdc`, the
105
105
> If you are using an existing disk that contains data, skip to [mounting the disk](#mount-the-disk).
106
106
> The following instructions will delete data on the disk.
107
107
108
-
If you are attaching a new disk, you need to partition the disk.
108
+
If you're attaching a new disk, you need to partition the disk.
109
109
110
110
The `parted` utility can be used to partition and to format a data disk.
111
111
- Use the latest version `parted` that is available for your distro.
112
112
- If the disk size is 2 tebibytes (TiB) or larger, you must use GPT partitioning. If disk size is under 2 TiB, then you can use either MBR or GPT partitioning.
113
113
114
114
115
-
The following example uses `parted` on `/dev/sdc`, which is where the first data disk will typically be on most VMs. Replace `sdc` with the correct option for your disk. We are also formatting it using the [XFS](https://xfs.wiki.kernel.org/) filesystem.
115
+
The following example uses `parted` on `/dev/sdc`, which is where the first data disk will typically be on most VMs. Replace `sdc` with the correct option for your disk. We're also formatting it using the [XFS](https://xfs.wiki.kernel.org/) filesystem.
@@ -136,7 +136,7 @@ Use `mount` to then mount the filesystem. The following example mounts the */dev
136
136
sudo mount /dev/sdc1 /datadrive
137
137
```
138
138
139
-
To ensure that the drive is remounted automatically after a reboot, it must be added to the */etc/fstab* file. It is also highly recommended that the UUID (Universally Unique Identifier) is used in */etc/fstab* to refer to the drive rather than just the device name (such as, */dev/sdc1*). If the OS detects a disk error during boot, using the UUID avoids the incorrect disk being mounted to a given location. Remaining data disks would then be assigned those same device IDs. To find the UUID of the new drive, use the `blkid` utility:
139
+
To ensure that the drive is remounted automatically after a reboot, it must be added to the */etc/fstab* file. It's also highly recommended that the UUID (Universally Unique Identifier) is used in */etc/fstab* to refer to the drive rather than just the device name (such as, */dev/sdc1*). If the OS detects a disk error during boot, using the UUID avoids the incorrect disk being mounted to a given location. Remaining data disks would then be assigned those same device IDs. To find the UUID of the new drive, use the `blkid` utility:
140
140
141
141
```bash
142
142
sudo blkid
@@ -161,7 +161,7 @@ Next, open the **/etc/fstab** file in a text editor. Add a line to the end of th
When you are done editing the file, save and close the editor.
164
+
When you're done editing the file, save and close the editor.
165
165
166
166
> [!NOTE]
167
167
> Later removing a data disk without editing fstab could cause the VM to fail to boot. Most distributions provide either the *nofail* and/or *nobootwait* fstab options. These options allow a system to boot even if the disk fails to mount at boot time. Consult your distribution's documentation for more information on these parameters.
0 commit comments