Problem with extending volume in CentOS 7 Linux OS and vSphere.

Problem with extending volume in CentOS 7 Linux OS and vSphere. I'm not really familiar with Linux, but starting to learn.

I have a CentOS 7 which is used to collect logs from network device. It has 1.5TB space, and I need to expand to 3TB to host another network device log. I save all logs to /home/NW/device_name.

The problem is when I added 1.5TB from vSphere, pvs command shows only 512GB with /dev/sda4. Is it because CentOS7 supports  only 2TB?

1. I want to do in the correct way. First I need to delete the incorrect partition /dev/sda4 and then decrease the disk size from vSphere back from 3TB to 1.5TB.
2. Then I like to follow the correct way to expand /home LV. This time, I also like to change the additional space size, 1TB only, not 1.5TB.

Thank you in advance.

cent1.png
cent1-2.png
cent1-3.png
Sungpill HanAsked:
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.

arnoldCommented:
the extending on the VM volume, does not as you note adjust the existing partitions.


Please post pvdisplay and lvmdiskscan

Need to see whether sda3,4,5 is reflected in pvdisplay.
Your setup should include swap space

You would likely need to create an extended partition, sda5 for the free unallocated.
You can do what you need, in the future it might better to allocate another vdisk versus increasing the storage size of the existing one.
0
Seth SimmonsSr. Systems AdministratorCommented:
Is it because CentOS7 supports  only 2TB?

your disk type is dos which implies MBR thus hitting the 2tb limit regardless of operating system
disk needs to be gpt if more than 2tb
0
Sungpill HanAuthor Commented:
Thank you for the comments.
Here is the screenshot of pvdisplay andlvmdiskscan.

So, if I want to extgend the /home which is currently at MBR, what are the steps I need to do? Is it possible to covert from MBR to GPT and extend?



cent1-4.png
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Sungpill HanAuthor Commented:
And If I change my mind, I need to remove the /dev/sda4 and shrink the added 1.5TB at vSphere. How can I do that?
0
Sungpill HanAuthor Commented:
I removed /dev/sda4 by doing following commands. pvs command shows that /dev/sda4 is gone, but fdisk -l still shows /dev/sda4??

# vgreduce cl /dev/sda4
  Removed "/dev/sda4" from volume group "cl"

# pvremove /dev/sda4


  Labels on physical volume "/dev/sda4" successfully wiped

 cent1-5.png
0
arnoldCommented:
pvremove removes the device from the LVm system, it does not release the /dev/sda4 space on the disk nor does it retask its space.

Think of it this way, a person gave you a scredriver that you carried with you. A time was reached that non of you interactions required a screwdriver. So you removed the screwdriver from your bag.
While you are no longer carrying the screwdriver, the person who gave you the screwdrive has not regain access to it or use of it.

you reached the maximum number of primary partitions, but as I noted you could create an sda5 partition of type 85  (Linux extended) that will cover the remaining space.then within the extended space, create a new partition that will take the entire space and use 8e type (Linux  LVM)
then use pvcreate /dev/sda6
and you can then add /dev/sda6 to the volume group, then use vgextend to grow the volume group. then use lvextend or lvresize to adjust the size of your logical volumes. and then use resizefs to update the filessytem of the change....

the liunx/unix system provides for ovelays, i.e. accessign drives by path versus as an individual drive letter.

The unix/linux filesystem is hierarchical
/  can include everything
/var/log can be pulled and use a separate device while not having an impact on access..

Presumably you are from a window platform, look at diskmgmt.msc and see that you can add a disk in a path
i.e. c:\data will actually be the second HD of size 500GB?
Right click on any partition and you should see an option, "change drive letter and paths"
1

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
Sungpill HanAuthor Commented:
Thank you very much
0
Sungpill HanAuthor Commented:
Thank you very much
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.