LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   redhat 7 lvm resize on same disk (https://www.linuxquestions.org/questions/linux-newbie-8/redhat-7-lvm-resize-on-same-disk-4175669616/)

PoleStar 02-14-2020 03:35 PM

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

syg00 02-14-2020 04:15 PM

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

JeremyBoden 02-14-2020 04:36 PM

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).

PoleStar 02-14-2020 05:49 PM

1 Attachment(s)
Here I took screen shots since I have ilo access to the machine.

Disk /dev/sda is acually over 2 TB.

PoleStar 02-14-2020 06:35 PM

1 Attachment(s)
now the old and beautiful centos 6 installer.

syg00 02-14-2020 09:35 PM

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.

PoleStar 02-15-2020 10:44 AM

1 Attachment(s)
here is output from lsblk -f

PoleStar 02-15-2020 11:13 AM

1 Attachment(s)
I resized pv with pvresize --setpysicalvolumesize 1900gb
now is see this warning.

rknichols 02-15-2020 04:18 PM

Quote:

Originally Posted by PoleStar (Post 6090409)
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.


All times are GMT -5. The time now is 06:23 PM.