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
Writing superblocks and filesystem accounting information: done
192
-
193
-
mkdir: created directory '/datadisk01'
194
-
mount: /dev/sdc1 mounted on /datadisk01.
195
-
```
196
-
197
-
In oder to update the /etc/fstab file, you can use the following command, and mount the LUN1 using it's unique identifier (UUID) together with the discard mount option:
198
144
199
-
```bash
145
+
# In oder to update the /etc/fstab file, you can use the following command, and mount the LUN1 using it's unique identifier (UUID) together with the discard mount option:
200
146
ssh $MY_VM_USERNAME@$FQDN -- \
201
147
'echo UUID=$(sudo blkid -s UUID -o value /dev/disk/azure/scsi1/lun0-part1) /datadisk01 xfs defaults,discard 0 0 | sudo tee -a /etc/fstab'
If you want to add a new, empty data disk on your VM, use the [az vm disk attach](/cli/azure/vm/disk) command with the `--new` parameter. If your VM is in an Availability Zone, the disk is automatically created in the same zone as the VM. For more information, see [Overview of Availability Zones](../../availability-zones/az-overview.md). The following example creates a disk named *$LUN2_NAME* that is 50 Gb in size:
@@ -223,54 +162,21 @@ az vm disk attach \
223
162
--caching None \
224
163
--lun 1 \
225
164
--size-gb 50
226
-
```
227
165
228
-
In this second possible scenario the LUN1 is going to be our data disk, the following example shows how to format and mount the data disk.
166
+
#In this second possible scenario the LUN1 is going to be our data disk, the following example shows how to format and mount the data disk.
Writing superblocks and filesystem accounting information: done
255
173
256
-
mkdir: created directory '/datadisk02'
257
-
mount: /dev/sdd1 mounted on /datadisk02.
258
-
```
259
-
260
-
In oder to update the /etc/fstab file, you can use the following command, and mount the LUN1 using it's unique identifier (UUID) together with the discard mount option:
174
+
# In oder to update the /etc/fstab file, you can use the following command, and mount the LUN1 using it's unique identifier (UUID) together with the discard mount option:
261
175
262
-
```bash
263
176
ssh $MY_VM_USERNAME@$FQDN -- \
264
177
'echo "UUID=$(sudo blkid -s UUID -o value /dev/disk/azure/scsi1/lun1-part1) /datadisk02 xfs defaults,discard 0 0" | sudo tee -a /etc/fstab'
Lastly the third scenario is to attach an existing disk to a VM. You can use the [az vm disk attach](/cli/azure/vm/disk) command with the `--disk` parameter to attach an existing disk to a VM. The following example attaches an existing disk named *myDataDisk* to a VM named *myVM*:
0 commit comments