I created a separate partition on a CentOS install (VirtualBox), and am attempting to encrypt it using cryptsetup
and LUKS
.
I'm using the following commands to get this set up:
cryptsetup luksOpen /dev/mapper/VolGroup-db00 db_fips (no error, all clear)
mkfs -t ext4 /dev/mapper/db_fips (no error, all clear)
e2fsck -f /dev/mapper/db_fips
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/db_fips: 11/131072 files (0.0% non-contiguous), 17196/523776 blocks
Ok, the volume is created.
So next I reboot.
After logging in, the /dev/mapper/db_fips volume is gone.
[root@dhcp ~]# ll /dev/mapper/db_fips/
ls: cannot access /dev/mapper/db_fips/: No such file or directory
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
LogVol01 VolGroup -wi-ao---- 1.46g
LogVol02 VolGroup -wi-ao---- 500.00m
LogVol03 VolGroup -wi-ao---- 1000.00m
LogVol04 VolGroup -wi-ao---- 500.00m
LogVol05 VolGroup -wi-ao---- 300.00m
LogVol06 VolGroup -wi-ao---- 3.00g
db00 VolGroup -wi-a----- 2.00g
Why is the db_fips
volume I just created gone?
/dev/mapper/VolGroup-db00
still exists, and shows to be encrypted (?)
blkid /dev/mapper/VolGroup-db00
/dev/mapper/VolGroup-db00: UUID="some uuid" TYPE="crypto_LUKS"
If /dev/mapper/VolGroup-db00
is what I actually encrypted, why did I need to issue cryptsetup /dev/mapper/VolGroup-db00 luksOpen db_fips
, and why is that no longer available?
/dev/mapper/db_fips/
has one / too many. Also did you ever luksOpen or enter your passphrase after reboot? An encrypted volume has to be opened first.cryptsetup luksOpen /dev/VolGroup/db00 db_fips
just now after reboot and was prompted for password, and am now able to see the volume. Will this have to be manually entered on every reboot? What if I encrypt a system volume (such as /var/log/)?