If you are going with LVM you really do not need mdadm.  On the other hand
if you build a mirror with mdadm you do not need LVM for just the mirror
disk, the device the mdadm provides is good enough to create a file
system.  For a file system I highly recommend XFS, it is way more robust
and way faster than ext4, the Linux kernel has supported it for years.

The basic steps to LVM are as follows:
Create a whole disk partition on each disk.
Use pvcreate to label each disk
Use vgcreate to create volume group(s) with selected PV's
Use lvcreate to create the volumes that will have the file systems on
them.  This is where the magic happens since you can use LVM (lvcreate) to
do software raid across your disks, there are many tunable parameters for
RAID0, or RAID1.  RAID10 is one case where you would need to create the
RAID1 in mdadm and then stripe the mirrors in LVM.
LVM will create disk devices in /dev/vgname/lvname on which you can run
mkfs-xfs for your mountable file system.
One other consideration with LVM, your disks do not all need to be the same
size.  Once the disks are in the VG you can create lots of LV of various
sizes and attributes.

This is where I wish I had written that book a few years ago.



On Wed, Jan 5, 2022 at 1:51 PM Rich Shepard <[email protected]>
wrote:

> On Wed, 5 Jan 2022, Russell Senior wrote:
>
> > Search engine of your choice should be able to find you a decent guide.
>
> The guide I have start with bare disks. I didn't take notes on what I did
> to
> get them to their current status.
>
> Since none has data on it I'll start from scratch.
>
> Thanks,
>
> Rich
>

Reply via email to