![]() |
How to add unallocated space to a logical volume? using LVM
Hello folks,
This is how my 2 TB (GPT) hard disk looks like Code:
sda1 1 MiB Bios_boot1. Resize sda2 to be 512 GB bigger with parted or gdisk and then pvresize, lvresize, resize2fs. 2. Create a new partition in the unallocated space, initialize it as a new pv and add it to the vg, then lvresize, resize2fs. What's the best alternative? Are there performance penalties if the 2nd option is used? Thank you very much |
2.
No. |
Quote:
Further the partition table would help in saying the best/easiest path to take. |
syg00 And what if I did the method number one? Why method two is better? because it is simpler? Other people have told me that method is better so I am still in doubt.
deadeyes the disk uses a GUID partition table (GPT) and it's layout is the one I described before. All the partitions/lv are nearly full. thanks |
Quote:
Method 2 is the easiest one as you don't have to reboot. For method 1 you will have to reboot if your root filesystem is residing on it. Otherwhise you might be able to force your kernel to reread the partition table with for example partprobe, kpartx, ... Note that in RHEL 6 for example you can't force the reread at all. (there is some upstream development going on about this). |
For 1) you have to manually delete the partition and reallocate it.
And get it completely correct or you risk destroying your filesystem. 2) has no such exposure, is achieved in simple steps, and is totally safe. Your data, your choice. |
Quote:
3/5 was a swap partition from an old Ubuntu install, so I deleted that, formatted the ~60GiB of free space, then found a nice redhat GUI tool that let me add the partition to the LVM. Now my question is whether there are any risks with having an LVM that's discontinuous on the disk? My boot partition is now between the two LVM partitions. |
Quote:
You shouldn't have any issues with that. |
| All times are GMT -5. The time now is 11:23 PM. |