Skip to content

Commit b114a7c

Browse files
committed
updaed the required changes
1 parent 796bb67 commit b114a7c

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

articles/virtual-machines/linux/resize-os-disk-gpt-partition.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Resize an OS Disk with a GPT Partition | Microsoft Docs
2+
title: Resize an OS disk with a GPT partition | Microsoft Docs
33
description: This article provides instructions on resizing an OS Disk with GPT Partition.
44
services: virtual-machines-linux
55
documentationcenter: ''
@@ -33,23 +33,23 @@ Use the **parted** command to identify if the disk partition has been created wi
3333
In the following output, the **Partition Table** shows a value of **msdos**, identifying an **MBR** Partition.
3434

3535
```
36-
[root@rhel6 ~]# parted -l /dev/sda
36+
[user@myvm ~]# parted -l /dev/sda
3737
Model: Msft Virtual Disk (scsi)
3838
Disk /dev/sda: 107GB
3939
Sector size (logical/physical): 512B/512B
4040
Partition Table: msdos
4141
Number Start End Size Type File system Flags
4242
1 1049kB 525MB 524MB primary ext4 boot
4343
2 525MB 34.4GB 33.8GB primary ext4
44-
[root@rhel6 ~]#
44+
[user@myvm ~]#
4545
```
4646

4747
### GPT partition
4848

4949
In the following output, the **Partition Table** shows a value of **gpt**, identifying a GPT partition.
5050

5151
```
52-
[root@rhel7lvm ~]# parted -l /dev/sda
52+
[user@myvm ~]# parted -l /dev/sda
5353
Model: Msft Virtual Disk (scsi)
5454
Disk /dev/sda: 68.7GB
5555
Sector size (logical/physical): 512B/512B
@@ -84,7 +84,7 @@ To increase the size of the OS Disk in Ubuntu 16.x and 18.x:
8484
As shown in the following example, the OS Disk has been resized from the portal to 100 GB, as the **/dev/sda1** file system mounted on **/** now displays 97 GB.
8585

8686
```
87-
root@ubuntu:~# df -Th
87+
user@myvm:~# df -Th
8888
Filesystem Type Size Used Avail Use% Mounted on
8989
udev devtmpfs 314M 0 314M 0% /dev
9090
tmpfs tmpfs 65M 2.3M 63M 4% /run
@@ -95,7 +95,7 @@ tmpfs tmpfs 324M 0 324M 0% /sys/fs/cgroup
9595
/dev/sda15 vfat 105M 3.6M 101M 4% /boot/efi
9696
/dev/sdb1 ext4 20G 44M 19G 1% /mnt
9797
tmpfs tmpfs 65M 0 65M 0% /run/user/1000
98-
root@ubuntu1604:~#
98+
user@myvm:~#
9999
```
100100

101101
### SUSE 12 SP4,SUSE SLES 12 for SAP, SUSE SLES 15, and SUSE SLES 15 for SAP
@@ -129,15 +129,16 @@ When the VM has restarted, perform the following steps:
129129
The following output shows that the **/dev/sda4** partition has been resized to 98.5 GB.
130130

131131
```
132-
susesels15serialconsole:~ # lsblk
132+
user@myvm:~ # lsblk
133133
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
134134
sda 8:0 0 100G 0 disk
135135
├─sda1 8:1 0 2M 0 part
136136
├─sda2 8:2 0 512M 0 part /boot/efi
137137
└─sda4 8:4 0 98.5G 0 part /
138138
sdb 8:16 0 20G 0 disk
139139
└─sdb1 8:17 0 20G 0 part /mnt/resource
140-
140+
```
141+
141142
1. Identify the type of file system on the OSDisk using the following command:
142143
143144
`blkid`
@@ -147,7 +148,7 @@ When the VM has restarted, perform the following steps:
147148
```
148149
#blkid
149150
150-
susesels15serialconsole:~ # blkid
151+
user@myvm:~ # blkid
151152
/dev/sda1: PARTLABEL="p.legacy" PARTUUID="0122fd4c-0069-4a45-bfd4-98b97ccb6e8c"
152153
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="EFI" LABEL="EFI" UUID="00A9-D170" TYPE="vfat" PARTLABEL="p.UEFI" PARTUUID="abac3cd8-949b-4e83-81b1-9636493388c7"
153154
/dev/sda3: LABEL="BOOT" UUID="aa2492db-f9ed-4f5a-822a-1233c06d57cc" TYPE="xfs" PARTLABEL="p.lxboot" PARTUUID="dfb36c61-b15f-4505-8e06-552cf1589cf7"
@@ -164,7 +165,7 @@ When the VM has restarted, perform the following steps:
164165
Example output:
165166
166167
```
167-
susesels15serialconsole:~ # xfs_growfs /
168+
user@myvm:~ # xfs_growfs /
168169
meta-data=/dev/sda4 isize=512 agcount=4, agsize=1867583 blks
169170
= sectsz=512 attr=2, projid32bit=1
170171
= crc=1 finobt=1 spinodes=0 rmapbt=0
@@ -189,7 +190,7 @@ When the VM has restarted, perform the following steps:
189190
Example output:
190191
191192
```
192-
susesels15serialconsole:~ # df -Th
193+
user@myvm:~ # df -Th
193194
Filesystem Type Size Used Avail Use% Mounted on
194195
devtmpfs devtmpfs 306M 4.0K 306M 1% /dev
195196
tmpfs tmpfs 320M 0 320M 0% /dev/shm
@@ -200,10 +201,10 @@ When the VM has restarted, perform the following steps:
200201
/dev/sda2 vfat 512M 1.1M 511M 1% /boot/efi
201202
/dev/sdb1 ext4 20G 45M 19G 1% /mnt/resource
202203
tmpfs tmpfs 64M 0 64M 0% /run/user/1000
203-
susesels15serialconsole:~ #
204+
user@myvm:~ #
204205
```
205206
206-
As shown in the proceeding example, we can see the file system size for the OSDisk has been increased.
207+
As shown in the preceding example, we can see the file system size for the OSDisk has been increased.
207208
208209
### RHEL 7.x with LVM
209210
@@ -236,7 +237,7 @@ When the VM has restarted, perform the following steps:
236237
The following output shows that the **/dev/sda4** partition has been resized to 99 GB.
237238
238239
```
239-
[root@rhel7lvm ~]# lsblk
240+
[user@myvm ~]# lsblk
240241
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
241242
fd0 2:0 1 4K 0 disk
242243
sda 8:0 0 100G 0 disk
@@ -261,11 +262,11 @@ When the VM has restarted, perform the following steps:
261262
The following output shows that the PV has been resized to 99.02 GB.
262263
263264
```
264-
[root@rhel7lvm ~]# pvresize /dev/sda4
265+
[user@myvm ~]# pvresize /dev/sda4
265266
Physical volume "/dev/sda4" changed
266267
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
267268
268-
[root@rhel7lvm ~]# pvs
269+
[user@myvm ~]# pvs
269270
PV VG Fmt Attr PSize PFree
270271
/dev/sda4 rootvg lvm2 a-- <99.02g <74.02g
271272
```
@@ -277,7 +278,7 @@ When the VM has restarted, perform the following steps:
277278
Example output:
278279
279280
```
280-
[root@rhel7lvm ~]# lvresize -r -L +10G /dev/mapper/rootvg-rootlv
281+
[user@myvm ~]# lvresize -r -L +10G /dev/mapper/rootvg-rootlv
281282
Size of logical volume rootvg/rootlv changed from 2.00 GiB (512 extents) to 12.00 GiB (3072 extents).
282283
Logical volume rootvg/rootlv successfully resized.
283284
meta-data=/dev/mapper/rootvg-rootlv isize=512 agcount=4, agsize=131072 blks
@@ -299,10 +300,10 @@ When the VM has restarted, perform the following steps:
299300
Example output:
300301
301302
```
302-
[root@rhel7lvm ~]# df -Th /
303+
[user@myvm ~]# df -Th /
303304
Filesystem Type Size Used Avail Use% Mounted on
304305
/dev/mapper/rootvg-rootlv xfs 12G 71M 12G 1% /
305-
[root@rhel7lvm ~]#
306+
[user@myvm ~]#
306307
```
307308
308309
> [!NOTE]

articles/virtual-machines/linux/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@
653653
href: disks-shared-enable.md
654654
- name: Upload a vhd to a disk - CLI
655655
href: disks-upload-vhd-to-managed-disk-cli.md
656-
- name: Resize OS Disk with a GPT Partition
656+
- name: Resize OS disk with a GPT partition
657657
href: resize-os-disk-gpt-partition.md
658658
- name: Resize a disk
659659
href: expand-disks.md

0 commit comments

Comments
 (0)