Skip to main content

Posts

Showing posts from October, 2012

Mount a encrypt hard disk in CentOS 6.3

 Encrypt Hard Disk mount in Linux System (CentOS 6.3)
Attach the hard disk to the linux system
check the name of the attached hard disk

#ls /dev/sd*
/dev/sda   /dev/sda1 /dev/sdb  /dev/sdb1

choose you encrypt volume and give a name to encrypt partition
# cryptsetup -v luksOpen /dev/sdb1 mydisk
Enter passphrase for /dev/sdg2:
Key slot 0 unlocked.
Command successful.


check the name exist in the path
 #ls /dev/mapper/

mount the named hard disk
# mount /dev/mapper/mydisk /mnt

check mount partition
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_localhost-lv_root
                       50G  6.7G   41G  15% /
tmpfs                  24G     0   24G   0% /dev/shm
/dev/sda1             485M   64M  396M  14% /boot
/dev/mapper/vg_localhost-lv_home
                      1.0T  654G  319G  68% /home
/dev/mapper/mydisk   591G  236G  326G  42% /mnt


umount the encrypt disk
# umount /mnt
# cryptsetup -v luksClose /dev/mapper/mydisk
Command successful.