apt-get install cryptsetup
sudo mkswap -f /dev/sda6 sudo swapon /dev/sda6
/dev/hda6 none swap sw,pri=1 0 0
echo "volume password" | sudo cryptsetup luksOpen /dev/mapper/vg-lv my_encrypted_volume mount /dev/mapper/my_encrypted_volume /mount/point
sudo umount /media/my_device sudo cryptsetup luksClose my_encrypted_volume
lsblk
sudo cryptsetup luksFormat /dev/mapper/<vg name>-<lv name>
sudo cryptsetup luksOpen /dev/mapper/<vg name>-<lv name> <vg name>-<lv name>_crypt sudo mkfs.ext4 /dev/mapper/<vg name>-<lv name>_crypt
sudo mount /dev/mapper/<vg name>-<lv name>_crypt /mountpoint
rsync -av --progress --exclude '/home/user/VirtualBox VMs' /home/user /mountpoint/
rsync -avxHAWX --info=progress2 /backup/ /new-backup/
rsync -avcn /backup/ /new-backup/
These steps have to be taken to increase a Raid Disk Array with the following configuration: RAID → LVM → LUKS → ext4.
sudo umount /backup
cryptsetup luksClose vg_backup-lv_backup_crypt
pvresize /dev/md3
lvresize -l+100%FREE /dev/vg_backup/lv_backup
cryptsetup luksOpen /dev/mapper/vg_backup-lv_backup vg_backup-lv_backup_crypt
e2fsck -f /dev/mapper/vg_backup-lv_backup_crypt
resize2fs /dev/mapper/vg_backup-lv_backup_crypt
mount /dev/mapper/vg_backup-lv_backup_crypt /backup
cryptsetup resize vg_backup-lv_backup_crypt
.