#!/bin/sh

#LV_NAME1=/dev/sde1
LV_NAME1=01cf1174-2f42-45d2-b206-c146c4f42f49
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


