$ parted /dev/vda GNU Parted 3.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vda: 7516MB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 2147MB 2146MB primary xfs
$ parted /dev/vda GNU Parted 3.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? Fix/Ignore/Cancel? Fix Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 10485760 blocks) or continue with the current setting? Fix/Ignore? Fix Model: Virtio Block Device (virtblk) Disk /dev/vda: 7516MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:
Number Start End Size File system Name Flags 1 1049kB 2146MB 2145MB xfs 1
$ parted /dev/vda GNU Parted 3.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vda: 64.4GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 3146kB 2097kB primary 2 3146kB 213MB 210MB primary xfs boot 3 213MB 42.9GB 42.7GB primary lvm (parted) resizepart 3 End? [42.9GB]? 100% (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vda: 64.4GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 3146kB 2097kB primary 2 3146kB 213MB 210MB primary xfs boot 3 213MB 64.0GB 63.8GB primary lvm
(parted) quit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ pvdisplay --- Physical volume --- PV Name /dev/vda3 VG Name centos7 PV Size 39.80 GiB / not usable 0 Allocatable yes (but full) PE Size 4.00 MiB Total PE 10189 Free PE 0 Allocated PE 10189 PV UUID VVXMV7-zVhi-NSVz-frrY-YKFg-BoJH-ir33p3 $ pvresize /dev/vda3 Physical volume "/dev/vda3" changed 1 physical volume(s) resized / 0 physical volume(s) not resized