Skip to content

Commit f1e65f3

Browse files
authored
Update expand-disks.md
More acrolinx
1 parent 14c005f commit f1e65f3

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

articles/virtual-machines/linux/expand-disks.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Filesystem Type Size Used Avail Use% Mounted on
3939
/dev/sde1 ext4 32G 49M 30G 1% /opt/db/log
4040
```
4141

42-
Here we can see, for example, the `/opt/db/data` filesystem is nearly full, and is located on the `/dev/sdd1` partition. The output of `df` shows the device path whether the disk is mounted by the device path or the (preferred) UUID in the fstab. Also take note of the Type column, indicating the format of the filesystem. This is important later.
42+
Here we can see, for example, the `/opt/db/data` filesystem is nearly full, and is located on the `/dev/sdd1` partition. The output of `df` shows the device path whether the disk is mounted using the device path or the (preferred) UUID in the fstab. Also take note of the Type column, indicating the format of the filesystem. The format is important later.
4343

44-
Now locate the LUN that correlates to `/dev/sdd` by examining the contents of `/dev/disk/azure/scsi1`. The output of the following `ls` command shows that the device known as `/dev/sdd` within the Linux OS is located at LUN1 when looking in the Azure portal.
44+
Now locate the LUN that correlates to `/dev/sdd` by examining the contents of `/dev/disk/azure/scsi1`. The output of the following `ls` command shows that the device known as `/dev/sdd` within the Linux OS is located at LUN1 when looking in the Azure portal.
4545

4646
```bash
4747
sudo ls -alF /dev/disk/azure/scsi1/
@@ -117,11 +117,11 @@ In the following samples, replace example parameter names such as *myResourceGro
117117
118118
## Expand a disk partition and filesystem
119119
> [!NOTE]
120-
> While there are many tools that may be used for performing the partition resizing, the tools detailed in the remainder of this document are the same tools used by certain automated processes such as cloud-init. As described here, the `growpart` tool with the `gdisk` package provides universal compatibility with GUID Partition Table (GPT) disks, as older versions of some tools such as `fdisk` did not support GPT.
120+
> While there are many tools that may be used for performing the partition resizing, the tools detailed in the remainder of this document are the same tools used by certain automated processes such as cloud-init. As described here, the `growpart` tool with the `gdisk` package provides universal compatibility with GUID Partition Table (GPT) disks, as older versions of some tools such as `fdisk` did not support GPT.
121121
122122
### Detecting a changed disk size
123123
124-
If a data disk was expanded without downtime using the procedure mentioned previously, the disk size won't be changed until the device is rescanned, which normally only happens during the boot process. This rescan can be called on-demand with the following procedure. In this example, we have found using the methods in this document that the data disk is currently `/dev/sda` and was resized from 256 GiB to 512 GiB.
124+
If a data disk was expanded without downtime using the procedure mentioned previously, the reported disk size doesn't change until the device is rescanned, which normally only happens during the boot process. This rescan can be called on-demand with the following procedure. In this example, we find using the methods in this document that the data disk is currently `/dev/sda` and was resized from 256 GiB to 512 GiB.
125125
126126
1. Identify the currently recognized size on the first line of output from `fdisk -l /dev/sda`
127127
@@ -142,7 +142,7 @@ If a data disk was expanded without downtime using the procedure mentioned previ
142142
/dev/sda1 2048 536870878 536868831 256G 83 Linux
143143
```
144144

145-
1. Insert a `1` character into the rescan file for this device. Note the reference to sda in the example. The disk identifier would change if a different disk device was resized.
145+
1. Insert a `1` character into the rescan file for this device. Note the reference to sda in the example. The disk identifier would change if a different disk device was resized.
146146

147147
```bash
148148
echo 1 | sudo tee /sys/class/block/sda/device/rescan
@@ -167,9 +167,9 @@ If a data disk was expanded without downtime using the procedure mentioned previ
167167
/dev/sda1 2048 536870878 536868831 256G 83 Linux
168168
```
169169

170-
The remainder of this article uses the OS disk for the examples of the procedure for increasing the size of a volume at the OS level. If the expanded disk is a data disk, use the [previous guidance for identifying the data disk device](#identifyDisk), and follow these instructions as a guideline, substituting the data disk device (for example `/dev/sda`), partition numbers, volume names, mount points, and filesystem formats, as necessary.
170+
The remainder of this article uses the OS disk for the examples of the procedure for increasing the size of a volume at the OS level. If the expanded disk is a data disk, use the [previous guidance for identifying the data disk device](#identifyDisk), and follow these instructions as a guideline, substituting the data disk device (for example `/dev/sda`), partition numbers, volume names, mount points, and filesystem formats, as necessary.
171171

172-
All Linux OS guidance should be viewed as generic and may apply on any distribution, but generally matches the conventions of the named marketplace publisher. Reference the Red Hat documents for the package requirements on any distribution based on Red Hat or claiming Red Hat compatibility.
172+
All Linux OS guidance should be viewed as generic and may apply on any distribution, but generally matches the conventions of the named marketplace publisher. Reference the Red Hat documents for the package requirements on any distribution based on Red Hat or claiming Red Hat compatibility.
173173

174174
### Increase the size of the OS disk
175175

@@ -180,7 +180,7 @@ The following instructions apply to endorsed Linux distributions.
180180
181181
# [Ubuntu](#tab/ubuntu)
182182

183-
On Ubuntu 16.x and newer, the root partition of the OS disk and filesystems are automatically expanded to utilize all free contiguous space on the root disk by cloud-init, provided there's a small bit of free space for the resize operation. For this circumstance the sequence is simply
183+
On Ubuntu 16.x and newer, the root partition of the OS disk and filesystems are automatically expanded to utilize all free contiguous space on the root disk by cloud-init, provided there's a small bit of free space for the resize operation. In this case, the sequence is simply
184184

185185
1. Increase the size of the OS disk as detailed previously
186186
1. Restart the VM, and then access the VM using the **root** user account.
@@ -210,15 +210,15 @@ user@ubuntu:~#
210210

211211
To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15, and SUSE SLES 15 for SAP:
212212

213-
1. Follow the procedure above to expand the disk in the Azure infrastructure.
213+
1. Follow the procedure previously described to expand the disk in the Azure infrastructure.
214214

215215
1. Access your VM as the **root** user by using the ```sudo``` command after logging in as another user:
216216

217217
```bash
218218
sudo -i
219219
```
220220

221-
1. Use the following command to install the **growpart** package, which will be used to resize the partition, if it isn't already present:
221+
1. Use the following command to install the **growpart** package, which is used to resize the partition, if it isn't already present:
222222

223223
```bash
224224
zypper install growpart
@@ -343,7 +343,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
343343

344344
# [Red Hat with LVM](#tab/rhellvm)
345345

346-
1. Follow the procedure above to expand the disk in the Azure infrastructure.
346+
1. Follow the procedure previously described to expand the disk in the Azure infrastructure.
347347

348348
1. Access your VM as the **root** user by using the ```sudo``` command after logging in as another user:
349349

@@ -373,7 +373,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
373373
└─rootvg-rootlv xfs 4f3e6f40-61bf-4866-a7ae-5c6a94675193 /
374374
```
375375

376-
1. Check whether there's free space in the LVM volume group (VG) containing the root partition. If there's free space, skip to step 12.
376+
1. Check whether there's free space in the LVM volume group (VG) containing the root partition. If there's free space, skip to step 12.
377377

378378
```bash
379379
vgdisplay rootvg
@@ -404,7 +404,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
404404

405405
In this example, the line **Free PE / Size** shows that there's 38.02 GB free in the volume group, as the disk has already been resized.
406406

407-
1. Install the **cloud-utils-growpart** package to provide the **growpart** command, which is required to increase the size of the OS disk and the gdisk handler for GPT disk layouts This package is preinstalled on most marketplace images
407+
1. Install the **cloud-utils-growpart** package to provide the **growpart** command, which is required to increase the size of the OS disk and the gdisk handler for GPT disk layouts This package is preinstalled on most marketplace images
408408

409409
```bash
410410
dnf install cloud-utils-growpart gdisk
@@ -449,7 +449,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
449449
CHANGED: partition=4 start=2054144 old: size=132161536 end=134215680 new: size=199272414 end=201326558
450450
```
451451

452-
1. Verify that the partition has resized to the expected size by using the `lsblk` command again. Notice that in the example **sda4** has changed from 63G to 95G.
452+
1. Verify that the partition has resized to the expected size by using the `lsblk` command again. Notice that in the example **sda4** changed from 63G to 95G.
453453

454454
```bash
455455
lsblk /dev/sda4
@@ -487,7 +487,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
487487
PV /dev/sda4 VG rootvg lvm2 [<95.02 GiB / <70.02 GiB free]
488488
```
489489

490-
1. Expand the LV by the required amount, which doesn't need to be all the free space in the volume group. In the following example, **/dev/mapper/rootvg-rootlv** is resized from 2 GB to 12 GB (an increase of 10 GB) through the following command. This command will also resize the file system on the LV.
490+
1. Expand the LV by the required amount, which doesn't need to be all the free space in the volume group. In the following example, **/dev/mapper/rootvg-rootlv** is resized from 2 GB to 12 GB (an increase of 10 GB) through the following command. This command also resizes the file system on the LV.
491491

492492
```bash
493493
lvresize -r -L +10G /dev/mapper/rootvg-rootlv
@@ -528,15 +528,15 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
528528
529529
# [Red Hat without LVM](#tab/rhelraw)
530530

531-
1. Follow the procedure above to expand the disk in the Azure infrastructure.
531+
1. Follow the procedure previously described to expand the disk in the Azure infrastructure.
532532

533533
1. Access your VM as the **root** user by using the ```sudo``` command after logging in as another user:
534534

535535
```bash
536536
sudo -i
537537
```
538538

539-
1. When the VM has restarted, perform the following steps:
539+
1. When the VM restarts completely, perform the following steps:
540540

541541
1. Install the **cloud-utils-growpart** package to provide the **growpart** command, which is required to increase the size of the OS disk and the gdisk handler for GPT disk layouts. This package is preinstalled on most marketplace images
542542

@@ -563,7 +563,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
563563
└─sdb1 ext4 923f51ff-acbd-4b91-b01b-c56140920098 /mnt/resource
564564
```
565565

566-
1. For verification, start by listing the partition table of the sda disk with **gdisk**. In this example, we see a 48.0 GiB disk with partition #2 sized 29.0 GiB. The disk was expanded from 30 GB to 48 GB in the Azure portal.
566+
1. For verification, start by listing the partition table of the sda disk with **gdisk**. In this example, we see a 48.0 GiB disk with partition #2 sized 29.0 GiB. The disk was expanded from 30 GB to 48 GB in the Azure portal.
567567

568568
```bash
569569
gdisk -l /dev/sda
@@ -594,7 +594,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
594594
15 10240 1024000 495.0 MiB EF00 EFI System Partition
595595
```
596596

597-
1. Expand the partition for root, in this case sda2 by using the **growpart** command. Using this command expands the partition to use all of the contiguous space on the disk.
597+
1. Expand the partition for root, in this case sda2 by using the **growpart** command. Using this command expands the partition to use all of the contiguous space on the disk.
598598

599599
```bash
600600
growpart /dev/sda 2
@@ -604,7 +604,7 @@ To increase the OS disk size in SUSE 12 SP4, SUSE SLES 12 for SAP, SUSE SLES 15,
604604
CHANGED: partition=2 start=2050048 old: size=60862464 end=62912512 new: size=98613214 end=100663262
605605
```
606606

607-
1. Now print the new partition table with **gdisk** again. Notice that partition 2 has is now sized 47.0 GiB
607+
1. Now print the new partition table with **gdisk** again. Notice that partition 2 has is now sized 47.0 GiB
608608

609609
```bash
610610
gdisk -l /dev/sda

0 commit comments

Comments
 (0)