您的位置:首页 > 运维架构

partition encryption in LVM

2014-09-01 13:29 239 查看
Tested the partition encryption of LVM in RHEL6

1, vgs -report information about volume group

2, lvs-report the information about logical volumes

3, create the logic volume, size 100M

 lvcreate -n lv_lockbox -L 100M vgsrv

4, format the logic volume just created

mkfs.ext4 /dev/vgsrv/lv_lockbox

5, create the mount point

mkdir /mnt/lockbox

6, for security reasons, dump random data to the logic volume created

cat  /dev/urandom > /dev/vgsrv/lv_lockbox

7, create the encryption partition based on step 4, here needs to input the passphrase.

cryptsetup luksFormat /dev/vgsrv/lv_lockbox

8, luksOpen the logic volume to lockbox, here needs to input the passphrase setup earlier.

cryptsetup luksOpen /dev/vgsrv/lv_lockbox lockbox

9, create file system based on the luksOpen lockbox

mkfs.ext4 /dev/mapper/lockbox

10, mount the lockbox to /mnt/lockbox

mount /dev/mapper/lockbox /mnt/lockbox/

11, copy files to /mnt/lockbox for testing,

cp /etc/services /mnt/lockbox

12, grep http /mnt/lockbox/services
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息