Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I have two hard drives. The actual drives have been encrypted with TrueCrypt, and then the virtual encrypted devices have been combined into a volume group using LVM. Now TrueCrypt does not automatically mount my drives on startup (because it needs my password), so what happens if my server needs to be restarted? Should I just be able to mount the TrueCrypt volumes from command line and LVM will go on its happy way, or will I lose all my data because LVM will think all my drives have disappeared.

share|improve this question
add comment

3 Answers

If that is the case you can try the vgimport command to search for volume groups on your drives.

share|improve this answer
add comment

LVM data is actually stored on disk (In the encrypted TrueCrypt volume in this case), you might need to execute some commands that make the server pick-up the LVM again after mounting the TrueCrypt disks, but I'm not 100% sure about that.

share|improve this answer
add comment
up vote 0 down vote accepted

So I found out the answer to this a while ago but forgot to update here. To re-recognize LVM devices if they do not exist on startup, run the following commands:

  • Scan for devices: pvscan
  • Re-activate Volume Group: vgchange -a y
  • Re-activate Logical: lvchange -a y <your VG here>

Then everything should be good.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.