#!/bin/sh

#LV_NAME1=/dev/sdd1
LV_NAME1=0a551422-727b-43ac-bd0b-917193b2db77
LUKS_MNT1=luks-6fc288279795f202021d3d1996b3c2e9
UNLOCK_MNT1=/media/luks-6fc288279795f202021d3d1996b3c2e9
#
#
sudo umount $UNLOCK_MNT1
sudo cryptsetup luksClose $LUKS_MNT1

#
# open device
echo "unlock qnap disk /dev/sde1..."
sudo cryptsetup luksOpen UUID=$LV_NAME1 $LUKS_MNT1 
echo "mounting ..."
sudo mount /dev/mapper/$LUKS_MNT1 $UNLOCK_MNT1
#sudo mount -o rw, remount /dev/mapper/$LUKS_MNT1 $UNLOCK_MNT1


