LVM before and after Encryption?
so I am trying to setup an encrypted lvm
I ran into the issue where I encrypted the file systems setup the LVM formatted the file system mounted just fine rebooted to test it. after the reboot I was able to open the encrypted file system but wasn't able to mount the lvm because /dev/lvm/volume didn't exist but lvscan did show the volume group and the volume. So my question is which comes first the encryption of the lvm ? should I setup a lvm then encrypt that or setup a encrypted volume then the lvm? I am running Centos 5.5 |
RHEL's (extended to CentOS) default configuration is:
partition -> LUKS encryption -> pv -> vg -> lv -> fs but there isn't necessarily any reason that you can not technically: partition -> pv -> vg -> lv -> LUKS encryption -> fs I'm having difficulty understanding what the exact process you followed is because of the ambiguous use of terms... If you care to clarify or walk through step-by-step the process (with command examples) you followed, I'll attempt to better answer [re-phrased] questions you have. :study: |
Quote:
e.g. I named my luks encrypted LV lukslv (I know, I know, such boundless creativity should be channelled towards writing books or something). I can mount it, to a directory called /lukstest, by typing Code:
mount /dev/mapper/lukslv /lukstest Code:
lukslv /dev/vol1/lv4 none If you have forgotten the name, you can get the name by using blkid. Somewhat confusingly, you want to use the entry whose type is NOT crypto_LUKS Code:
/dev/mapper/vol1-lv4: UUID="0714a501-ba01-4eb1-be77-690427c8eef8" TYPE="crypto_LUKS" |
Issue
so I setup a partition like this
partition -> LUKS encryption -> pv -> vg -> lv -> fs but after do the cryptsetup luksOPen /dev/sdwhatever whatever and do a lvscan I can see the lvm (vg) but /dev/vg/whatever doesn't exist in /dev so I went to this model. partition -> pv -> vg -> lv -> LUKS encryption -> fs so I am just wondering if there is something I would need to do make the file system see the vg after I've mounted the encrpyted drive. |
All times are GMT -5. The time now is 09:32 PM. |