First off sorry for the long post:
TL-DR: Is it possible/easy to merge partitions in an LVM volume group if they are on the same physical disk and contiguous?
I am probably being pedantic here and not using Linux LVM the way it is intended, but when I installed my OS (Fedora Workstation, currently F29) I didn’t really understand LVM as well as I should. I knew what I wanted to do but ended up with a storage set up I am not very happy with.
My Linux install currently uses two disks, an SSD for the /boot/ /root etc and a 2TB SSHD that I use for /var/ /tmp/ /swap/ and /home.
The original plan was to allocated fixed space for /var /tmp and /swap on the SSHD and have /home use the rest of the space. That was the plan but I think somewhere along the line I decided since I was using LVM that it would be a good idea to leave some un-allocated space on the SSHD to use later when I needed.
So I think what I ended up doing was creating a single partition on the SSHD just big enough for /var /tmp & /swap and then 250GB for /home and this one partition became my
"fedora-sshd" volume group where I set up the various logical volumes.
Jump forward a year or so later and that 250GB /home was pretty much full, so I decided to use some of that un-allocated space. I thought I could just resize the partition, which I believe is possible but I was afraid of loosing data so in the end I just created a another 512GB partition, added it to the
"fedora-sshd" volume group and extended the /home logical volume.
Jump forward another year and I am in the same situation (I’ve been creating a few more VMs which are taking up space).
The SSHD now has 2 partitions on it and about 1TB of un-allocated space (the original one and the one I used to extend the
"fedora-sshd" volume group.
In hindsight, I should have just used the entire SSHD as the “fedora-sshd” volume group and created the /var /tmp /swap and /home logical volumes in it.
My question is, is there an easy way to merge the two existing partitions and the un-allocated space and use the entire SSHD as my
"fedora-sshd" volume group or should I just do the same again and create a new partition and add it to the volume group?
I’m probably just being pedantic, after all the purpose of using LVM is to group storage from different storage devices but it just seems a little redundant if the storage is just on one physical disk anyway.
Perhaps another option, if I am going to have to create a new partition would be to create a new
"fedora-sshd-vm" volume group for my VMs and move them there to free up space in
"fedora-sshd" for /home and allow me to expand the VM volume group with an additional disk if I even need it … hmmm
Any advise would be appreciated (even if it’s “just create the new partition and forget about it” )