partition encryption in LVM

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值