LoginSignup
1
0

More than 5 years have passed since last update.

CentOS7 ファイルシステムの暗号化

Posted at

・SSMインストール
yum install -y system-storage-manager
・ストレージデバイスの設定状況確認

[root@localhost ~]# ssm list
-------------------------------------------------------------
Device         Free      Used      Total  Pool    Mount point
-------------------------------------------------------------
/dev/sda                        50.00 GB          PARTITIONED
/dev/sda1                      500.00 MB          /boot
/dev/sda2  44.00 MB  49.46 GB   49.51 GB  centos
-------------------------------------------------------------
---------------------------------------------------
Pool    Type  Devices      Free      Used     Total
---------------------------------------------------
centos  lvm   1        44.00 MB  49.46 GB  49.51 GB
---------------------------------------------------
-------------------------------------------------------------------------------------
Volume            Pool    Volume size  FS     FS size       Free  Type    Mount point
-------------------------------------------------------------------------------------
/dev/centos/root  centos     45.59 GB  xfs   45.57 GB   37.21 GB  linear  /
/dev/centos/swap  centos      3.88 GB                             linear
/dev/sda1                   500.00 MB  xfs  496.67 MB  207.93 MB  part    /boot
-------------------------------------------------------------------------------------

・暗号化されたLVMボリュームの作成
ssm create --fstype xfs -p pool001 -e luks /dev/sda5 /mnt
「-e luks」オプションを付与すると、暗号化されたボリュームが作成される

暗号化された論理ボリュームはパスフレーズが付与されているため、マウントされないようにロックをかけることができる
・ロック
cryptsetup luksClose /dev/mapper/encrypted001
・解除
cryptsetup luksOpen /dev/mapper/encrypted001

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0