cryptsetup on lvm on Ubuntu Feisty

I wanted to encrypt my Documents. My home folder is on a logical volume. So I made some space by removing another logical volume and creating a new one, which gets encrypted by cryptsetup. Here are the commands:

  • lvdisplay Display all logical volumes on the system
  • lvremove defaultvolumegroup/data Remove the logical volume "data" from the volume group "defaultvolumegroup"
  • lvcreate -L 53.66G --name data defaultvolumegroup Create the logical volume "data" with a size of 53.66 GB in the volume group "defaultvolumegroup"
  • cryptsetup create cryptodata /dev/mapper/defaultvolumegroup-data Create the encrypted device "/dev/mapper/cryptodata"
  • mkfs.ext3 /dev/mapper/cryptodata Format the device with the ext3 file system
  • mount /dev/mapper/cryptodata /home/jeltsch/data Mount the device