Skip to content

Commit 5305f61

Browse files
[Doc-A-THon] Added missing command
Added missing command for suse Updated the code block
1 parent 11bae8c commit 5305f61

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

articles/virtual-machines/linux/attach-disk-portal.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
6565

6666
The output is similar to the following example:
6767

68-
```bash
68+
```output
6969
sda 0:0:0:0 30G
7070
├─sda1 29.9G /
7171
├─sda14 4M
@@ -85,7 +85,7 @@ In the image, you can see that there are 3 data disks: 4 GB on LUN 0, 16GB at LU
8585

8686
Here's what that might look like using `lsblk`:
8787

88-
```bash
88+
```output
8989
sda 0:0:0:0 30G
9090
├─sda1 29.9G /
9191
├─sda14 4M
@@ -143,7 +143,7 @@ sudo blkid
143143

144144
The output looks similar to the following example:
145145

146-
```bash
146+
```output
147147
/dev/sda1: LABEL="cloudimg-rootfs" UUID="11111111-1b1b-1c1c-1d1d-1e1e1e1e1e1e" TYPE="ext4" PARTUUID="1a1b1c1d-11aa-1234-1a1a1a1a1a1a"
148148
/dev/sda15: LABEL="UEFI" UUID="BCD7-96A6" TYPE="vfat" PARTUUID="1e1g1cg1h-11aa-1234-1u1u1a1a1u1u"
149149
/dev/sdb1: UUID="22222222-2b2b-2c2c-2d2d-2e2e2e2e2e2e" TYPE="ext4" TYPE="ext4" PARTUUID="1a2b3c4d-01"
@@ -156,7 +156,7 @@ The output looks similar to the following example:
156156
157157
Next, open the **/etc/fstab** file in a text editor. Add a line to the end of the file, using the UUID value for the `/dev/sdc1` device that was created in the previous steps, and the mountpoint of `/datadrive`. Using the example from this article, the new line would look like the following:
158158

159-
```bash
159+
```config
160160
UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /datadrive xfs defaults,nofail 1 2
161161
```
162162

@@ -178,7 +178,7 @@ lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
178178

179179
The output will look something like this:
180180

181-
```bash
181+
```output
182182
sda 0:0:0:0 30G
183183
├─sda1 29.9G /
184184
├─sda14 4M
@@ -199,7 +199,7 @@ There are two ways to enable TRIM support in your Linux VM. As usual, consult yo
199199

200200
* Use the `discard` mount option in */etc/fstab*, for example:
201201

202-
```bash
202+
```config
203203
UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /datadrive xfs defaults,discard 1 2
204204
```
205205
* In some cases, the `discard` option may have performance implications. Alternatively, you can run the `fstrim` command manually from the command line, or add it to your crontab to run regularly:
@@ -221,6 +221,7 @@ sudo fstrim /datadrive
221221
# [SUSE](#tab/suse)
222222

223223
```bash
224+
sudo zypper install util-linux
224225
sudo fstrim /datadrive
225226
```
226227
---

0 commit comments

Comments
 (0)