I'm managing a virtual cloud server on EC2 for a client which has the requirement of expandable storage. Currently, I have a 1TB EBS drive mounted at /mnt
which I need to expand. Since 1TB is the limit on EBS drive size, I need a way to seamlessly merge multiple drives into one large virtual drive, hence LVM2.
As far as I understand, LVM can accomplish what I need, but I'm not sure as to how to get started. I need to know how to do the following:
- Create a new LVM group "from scratch."
- Add another disk or partition to it.
- Expand the filesystem online if possible.
Resizing the filesystem seems to be pretty straightforward, but I'm not exactly so keen on working with LVM.
How can I setup a LVM array with a single disk (1), and then subsequently add another disk to it, increasing its size (2), and then resize the filesystem on it to fill the disk (3)? I'd like to use ext3 or ext4 if possible.