FedoraThis forum is for the discussion of the Fedora Project.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I use LUKS for full drive encryption, with the exception of my boot drive where I'll create a separate /boot partition and then the balance of the drive in one partition which I'll format with luksFormat. The other drives I encrypt the raw device in other words no partitioning. I then apply LVM2 to the encrypted drives. Currently I use one physical drive for each Volume Group (VG).
I recently had to replace a drive, so when the new drive came I went ahead and ran badblocks on all 5 of my drives.(I do not use RAID, these are set up as JBOD). After badblocks, I like to run dd if=/dev/urandom of=/dev/sd? to write random data to the drives.
As each drive finishes I would then start the process with the boot drive gdisk to create the 3 partitions (used GUID partition structure so 1. was 2MB GPT partition, 2. was my /boot partition and then the rest for encryption. For the LUKS part I would cryptsetup lukFormat /dev/sd? (boot drive was sda3), followed by cryptsetup luksOpen /dev/sd? Name-of-LUKS-Volume (which is the same as my VG name)
After encrypting I would create the Physical Volume (PV) pvcreate /dev/mapper/Name-of-LUKS-Volume. Then I created the VG by vgcreate VG_0? /dev/mapper/VG_0?(As I said LUKS Volume name was the same as Volume Group name). Then my Logical Volume(s) (LV) creating by lvcreate -C y -L ?G VG_0? -n swap0? (5 swaps spread 1/VG) and for the non swap LVs, lvcreate -L ??G VG_0? -n LV-name or lvcreate -l +100%FREE VG_0? -n LV-name when using the rest of available extents in the VG. I then did the formatting of each LV and then mounted them. The LUKS/LVM2 looks like this:
I then edited crypttab and fstab to make sure that the LUKS Volumes would be decrypted and the LVs would be mounted.
After some minor issues I got VG_01 & VG_02 working, but I after doing VG_03 and restoring the data for both LVs when I went to reboot the system hung during the boot. I noticed something to the effect of "Starting Monitoring of LVM2 blah blah blah (Don't remember what else it said. I rebooted safe mode from the install DVD and manually Opened the LUKS volumes and mounted the LVs with no problem so I went to boot from disk and it came up but LV-3 of VG_03 did not mount, all others did. I manually mounted that LV and all was well including after rebooting again. I then had the last 2 drives ready so I repeated the above procedure for both only to have the first reboot after data restore hang again. This time I looked closer and saw that it had done a fsck for all LVs and mounted each one except for the last LV on VG_05 before it hung. I booted into safe mode again, commented out that LV in fstab and rebooted fine. I was then able to manually mount the LV.
I do not see what I'm missing here, so why does it not work?
Sorry it's so long but I was trying to give as much info as possible.