How can I create one logical volume over two disks using LVM?

You should have a look at this detailed answer.

Here's a summary of it:

  1. Create a physical volume on the first hard drive, and another physical volume on the second hard drive.
  2. Create a new volume group, assigning both physical volumes to it.
  3. Create a new logical volume in that volume group.
  4. Create a new ext3 filesystem in that logical volume.

The diagram I copied from this answer visualises this (but with three filesystems, rather than just one):

LVM schema

As you can see, creating an ext3 filesystem is the last step, not the first. If you have an existing ext3 partition that isn't in LVM, you can't migrate it to LVM. You'll have to backup the partition, delete the partition, setup LVM, and then copy the files back.


Don't do it, unless you've got another 2 3TB disks to use in a 4-disk array in RAID10.

Simply combining the two as a single large partition without any means of back-up of the data, is not a good idea. The data will be interleaved across both disks, and if any part of either disk goes bad, you could end up losing all 6TB of data (assuming you had that much data), rather than only half at most.

It'll be much safer to use both as separate partitions, rather than a very large array partition.


One easy way to use LVM is :

  1. create physical volumes with the "pvcreate" command:

    • pvcreate /dev/sdc
    • pvcreate /dev/sdd
    • pvcreate /dev/sde
    • ...
  2. use system-config-lvm which is a GUI tool available in the Ubuntu Software Center

the new LVM partition might be owned by root but it's easy to set it back to your user with:

sudo chown -R username:username /path/to/your/lvm

On Debian, using lvm2:

  1. Install lvm2 using sudo apt install lvm2 and start it using /etc/init.d/lvm2 start

  2. List all the volumes using lsblk

  3. Create physical volumes

     /sbin/pvcreate <volume from prev list>
    
  4. Then to list the volumes use /sbin/lvmdiskscan

  5. Create a volume group (vg) /sbin/vgcreate <name> /dev/vdb

  6. Format the volume group /sbin/mkfs.ext4 /dev/mapper/Vol_group

  7. Change fstab if you want to map this vg to some filesystem

     /dev/mapper/vg /var/lib/folder ext4 rw,user 
    
  8. Mount the volume using mount -a