So, rather than doom myself to total repition, I instead used a non-solution. I added the new drive into the existing volume group, then used it to extend the logical volumes. This was done with the following commands (I’m using lvm2, just FYI)-
fdisk /dev/hd<new disk> (/dev/hdb in my case)
Depending on your specific system the hd portion may be different, so check on that.
In fdisk create a new partition, size it how you want, then set the system id to 8E. This marks the partition as Linux LVM.
Next, create the physical volume-
pvcreate /dev/hd<new disk><new partition> (/dev/hdb1 in my case)
Run pvscan to make sure it shows up.
Now add it to the volume group-
vgextend <volume group> /dev/hd<new disk><new partition>
If you aren’t sure what the name of your volume group is you can use vgscan or vgdisplay.
Next we extend the logical volume size, utilizing our new roomy drive-
lvextend -L+100G /dev/<volume group>/<logical volume name> /dev/hd<new disk><new partition>
Now, the -L indicates you’re going to be using a space indicator, instead of one of the other bizarre options. The + indicates we are adding space (you can also shrink lvs), the rest means 100 gigabytes. The default is megabytes. The last argument tells it to extend this using space from the specified physical volume. There’s also lvresize, but I wasn’t sure if it would have balked in this case or not, so I went this route.
Check the details to see if it worked-
lvdisplay (you should see it listed with the new size)
And you’re done, right? Well… no. Now you have to resize the file system. Since this is the root file system on a production box, I’m taking the time to ask around about whether I should even attempt doing this online or not, and which command is recommended. There’s ext2resize, resize2fs, or ext2online. I’ll post a part III about how this worked out.
So, why do I call this a non-solution? Because the main hard drive is old, and I’d like to get rid of it all together. Once I have this sorted out and get some breathing room I’ll make some backups of key files and stash them on the local backup box.