Steps to perform on proxmox VE (version 7.3-3):
Step 0: apt-get install cryptsetup
Step 1: fdisk /dev/sdb
Step 2: cryptsetup luksFormat /dev/sdb
Step 3: cryptsetup luksOpen /dev/sdb encrypted_disk
Step 4: mkfs.ext4 /dev/mapper/encrypted_disk
Step 5: mkdir /mnt/encrypted_disk
Step 6: mount /dev/mapper/encrypted_disk /mnt/encrypted_disk
Step 7: rsync avzh /data/ /mnt/encrypted_disk/
Step 8: umount /mnt/encrypted_disk
Step 9: cryptsetup luksClose encrypted_disk
Since this external disk (i.e. /dev/sdb) will be removed physically and I do not see any
reason involving /etc/fstab and/or /etc/crypttab files. when trying to re-use disk, I see
that I needed to repeated steps 3, 6, 7, 8 and 9. Thanks!
Step 0: apt-get install cryptsetup
Step 1: fdisk /dev/sdb
Step 2: cryptsetup luksFormat /dev/sdb
Step 3: cryptsetup luksOpen /dev/sdb encrypted_disk
Step 4: mkfs.ext4 /dev/mapper/encrypted_disk
Step 5: mkdir /mnt/encrypted_disk
Step 6: mount /dev/mapper/encrypted_disk /mnt/encrypted_disk
Step 7: rsync avzh /data/ /mnt/encrypted_disk/
Step 8: umount /mnt/encrypted_disk
Step 9: cryptsetup luksClose encrypted_disk
Since this external disk (i.e. /dev/sdb) will be removed physically and I do not see any
reason involving /etc/fstab and/or /etc/crypttab files. when trying to re-use disk, I see
that I needed to repeated steps 3, 6, 7, 8 and 9. Thanks!
Last edited: