#!/bin/sh

#LV_NAME1=/dev/sdd1
LV_NAME1=53d827ad-9c21-4312-ab46-f76f5ce57d03
LUKS_MNT1=luks-53d827ad-9c21-4312-ab46-f76f5ce57d03
UNLOCK_MNT1=/media/luks-53d827ad-9c21-4312-ab46-f76f5ce57d03
#
#
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


