LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2020, 04:35 PM   #1
PoleStar
Member
 
Registered: Jul 2010
Posts: 207

Rep: Reputation: 2
redhat 7 lvm resize on same disk


Hello,
I have 1 TB space on the computer.
I installed RHEL7 on about 100 GB using

Code:
/dev/sda1   /boot 1GB
LVM:(named "sys")
sys-root  /     50GB
sys-opt   /opt  10GB
sys-home  /home 10GB
sys-var   /var  10GB
...
now when i do
vgs or pvs i see vgs size as close to 100 GB
I do not see rest of 900GB available in vg("sys")

While I was making partitions during installation process..I did not see any options were I could create

lvm(named "sys") of size 1000GB and then on that lvm... i add my sys-root.. sys-home etc etc..

I remember back in redhat 5/6 days you could do that with installer.

Is there a way to increase my pv/vg size to actual disk size ?
Or i have reinstall OS again.. even if do reinstall where is the option to make lvm expanded on whole disk.

Thank you

Last edited by PoleStar; 02-14-2020 at 04:37 PM.
 
Old 02-14-2020, 05:15 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,499

Rep: Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101
Don't tell us what you see, post (in full) what the commands return.
LVM, even back to its original incarnation, was designed to facilitate growing components. There should be no reason to have to re-install.
Code:
lsblk -f
 
1 members found this post helpful.
Old 02-14-2020, 05:36 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,655

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
LVM provides Logical Volumes (LV's) - you can dynamically expand or reduce them.

It's a good idea to leave some unallocated space - which is what you appear to have done.
Note that if you want to grow or reduce a LV you must grow/reduce the file system defined on them after/before (as appropriate).
 
1 members found this post helpful.
Old 02-14-2020, 06:49 PM   #4
PoleStar
Member
 
Registered: Jul 2010
Posts: 207

Original Poster
Rep: Reputation: 2
Here I took screen shots since I have ilo access to the machine.

Disk /dev/sda is acually over 2 TB.
Attached Thumbnails
Click image for larger version

Name:	LQ_vg_problem.png
Views:	13
Size:	33.5 KB
ID:	32551  

Last edited by PoleStar; 02-14-2020 at 06:50 PM.
 
Old 02-14-2020, 07:35 PM   #5
PoleStar
Member
 
Registered: Jul 2010
Posts: 207

Original Poster
Rep: Reputation: 2
now the old and beautiful centos 6 installer.
Attached Thumbnails
Click image for larger version

Name:	LQ_vg_problem2.png
Views:	8
Size:	74.9 KB
ID:	32552  
 
Old 02-14-2020, 10:35 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,499

Rep: Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101Reputation: 3101
Simply resize the pv, if you don't give it a size it will occupy the entire disk. When resizing the lv(s), use "-r" to automatically resize the filesystem for common filesystems. Had you supplied the data I asked for we could be sure.
Redhat has an excellent LVM admin guide.
 
1 members found this post helpful.
Old 02-15-2020, 11:44 AM   #7
PoleStar
Member
 
Registered: Jul 2010
Posts: 207

Original Poster
Rep: Reputation: 2
here is output from lsblk -f
Attached Thumbnails
Click image for larger version

Name:	LQ_vg_problem3.png
Views:	5
Size:	34.4 KB
ID:	32559  
 
Old 02-15-2020, 12:13 PM   #8
PoleStar
Member
 
Registered: Jul 2010
Posts: 207

Original Poster
Rep: Reputation: 2
I resized pv with pvresize --setpysicalvolumesize 1900gb
now is see this warning.
Attached Thumbnails
Click image for larger version

Name:	LQ_vg_problem4.png
Views:	5
Size:	9.6 KB
ID:	32563  
 
Old 02-15-2020, 05:18 PM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,362

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Quote:
Originally Posted by PoleStar View Post
I resized pv with pvresize --setpysicalvolumesize 1900gb
now is see this warning.
You have that PV confined to a partition that is just 264GB. You can't make the PV larger than that (at least not without error) without resizing the partition. Hopefully you have not yet assigned any of that added space to any LVs. You need to use a partitioning tool to enlarge partition 3, perhaps to the full size of the disk. Then you can run pvresize with no --setpysicalvolumesize option to make the size match the partition size.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resize a disk with lvm genderbender Linux - Software 7 07-17-2012 05:00 PM
[SOLVED] Same disk name to point to same physical disk on all nodes procfs Linux - Newbie 3 09-23-2011 02:23 PM
Mounting LVM Disk to non-LVM disk gak_92 Linux - Hardware 1 08-07-2009 04:34 AM
LVM Resize - After logical resize, FS size does not match physical size. spectra Linux - Software 6 11-01-2006 12:28 PM
How to do this: move image1, resize image1, move image2, resize image2, etc xmrkite Linux - Software 14 10-05-2006 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration