Need help extending from 20TB to 32TB ext.4 partition on CentOS 7

Hello,

I have a VM with a very large disk that I need to make larger.  I tried following some stuff online, but now I am ununsure of the process and want to stop and get help before going further.  The VM in question had a 20TB disk (sdb) which I extended to 32TB and rebooted the system.  Then I did the following:

[root@machinename ~]# fdisk /dev/sdb
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition number (2-128, default 2): p
Partition number (2-128, default 2): 
First sector (34-68719476702, default 41015625728): 
Last sector, +sectors or +size{K,M,G,T,P} (41015625728-68719476702, default 68719476702): 
Created partition 2


Command (m for help): p

Disk /dev/sdb: 35184.4 GB, 35184372088832 bytes, 68719476736 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 434C3ED5-B129-4811-8E4A-B3E63AB708B6


#         Start          End    Size  Type            Name
 1         2048  41015625727   19.1T  Microsoft basic primary
 2  41015625728  68719476702   12.9T  Linux filesyste 

Command (m for help): t
Partition number (1,2, default 2): 2
Partition type (type L to list all types): 8e
Type of partition 2 is unchanged: Linux filesystem

Command (m for help): w
The partition table has been altered!

[root@machinename ~]# partprobe -s
/dev/sda: msdos partitions 1 2 3
/dev/sdb: gpt partitions 1 2
[root@machinename ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b6ceb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    33554431    15727616   8e  Linux LVM
/dev/sda3        33554432   104857599    35651584   8e  Linux LVM
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 35184.4 GB, 35184372088832 bytes, 68719476736 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 434C3ED5-B129-4811-8E4A-B3E63AB708B6


#         Start          End    Size  Type            Name
 1         2048  41015625727   19.1T  Microsoft basic primary
 2  41015625728  68719476702   12.9T  Linux filesyste 

Disk /dev/mapper/centos-root: 50.9 GB, 50885296128 bytes, 99385344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 1719 MB, 1719664640 bytes, 3358720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@machinename ~]# pvcreate /dev/sdb2
  Physical volume "/dev/sdb2" successfully created.

Open in new window


This is where I am currently.  All I really want is for the volume on sdb to show a 32TB partition rather than the 20TB partition it started with.  How can I accomplish this?  I need to do this several more times, so help to fix this one, and help from the beginning if I did something wrong already would be appreciated.  Thanks!
Chad KillionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David Johnson, CDRetiredCommented:
looks like all you need to do now is
resize2fs /dev/vda2

Open in new window

Chad KillionAuthor Commented:
Thanks, but I figured this out on my own hours ago. Had to delete original partition first, make new, then resize. See link I posted above for details If you are interested
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.