using lvm to create vaolume with disk, size, spanned, parition


You need to use LVM (Logical Volume Manager)

First of all , you must be aware that if any of the physical disk fail , the Big 4TB volume will fail too. Backup your data first!

Basically , all you need to do is to partition your data (/dev/sda2 and /dev/sdb1) partition in lvm format then :

  • create two physical volumes (pvcreate /dev/sda2 /dev/sdb1)
  • create one volume group with the two physical volumes (vgcreate VG_DATA /dev/sda2 /dev/sdb1)
  • create one logical volume ( lvcreate -l 100%FREE -n DATA VG_DATA )
  • create the filesystem on your new volume (mkfs.ext3 /dev/VG_DATA/DATA)
  • mount the volume (mount /dev/VG_DATA/DATA /data )

There are dozen of sites with howtos lvm like this one.

Lvm is a lot more than these 4 commands , read the fine manual if you want advanced configuration. I hope it will help you

2018-11-10 10:57:52gstlouis