Prepare a single disk or a disk raid:
lvm lvm> pvcreate <physvol> lvm> vgcreate <physvol> // or several physical volumes: <physvol1> <physvol2> <physvol3> lvm> lvcreate <volgroup> <physical> lvm> quit mkfs.ext4 /dev/mapper/<volgroup-logvol> mount /dev/mapper/<volgroup-logvol> <dir>
Auto-mount during boot:
vim /etc/fstab /dev/mapper/<volgroup-logvol> <dir> ext3 noatime,user_xattr 0 0
This example will copy /dev/sde1 mounted on /backup to /dev/sdf1 mounted on /replace and afterwards change mount point, logical volume and volume group names to the source names.
rsync -avxHAWX --info=progress2 /backup/ /new-backup/
rsync -avcn /backup/ /new-backup/
/backup
/new-backup
lvcreate -l<extents> -n testlv testvg mkfs.ext4 /dev/mapper/vg-lv
pvresize /dev/md127
lvresize -l +100%FREE /dev/mapper/<vg name>-<lv name>
lvremove /dev/mapper/<vg name>-<lv name> vgremove <vg name> lvcreate -l 100%FREE -n <lv name> <vg name>
First, check the status with:
# pvs # vgs # lvs