Hi everyone,
I'm having problems with closing luks device. When i run luksClose on mapped device i get following error:
[code]Command failed with code 19: No such device[/code]
So, i'm getting feeling that closing doesn’t going well... I can still see device listed in /dev/mapper, Reopening device leads to (expected) error:
[code]Cannot use device /dev/storage/OwnCloud_Data which is in use (already mapped or mounted). Command failed with code 16: Cannot use device /dev/storage/OwnCloud_Data which is in use (already mapped or mounted).[/code]
(Device is not mounted by the way, unmonuting device goes without problems) Only thing that helps me is rebooting the system. Any ideas how to approach this problem? thnx in advance.
PS i'm running CentOS6.5 with (latest) kernel 2.6.32-431.5.1, cryptsetup 1.2.0-7.
On Sun, 2014-03-16 at 18:11 +0100, centos@maziashvili.org wrote:
I'm having problems with closing luks device.
I use this routine in /root/bin/.cu
#! /bin/bash cryptsetup luksClose $1 umount /dev/mapper/$1
the mounting command is /root/bin/.cm
#! /bin/bash cryptsetup luksOpen /dev/$1 $2 mkdir /ax/$2 mount /dev/mapper/$2 /ax/$2
On Sunday 16 March 2014 17:49:27 Always Learning wrote:
On Sun, 2014-03-16 at 18:11 +0100, centos@maziashvili.org wrote:
I'm having problems with closing luks device.
I use this routine in /root/bin/.cu
#! /bin/bash cryptsetup luksClose $1 umount /dev/mapper/$1
First close then unmount? Isn't it supposed to be other way around - first unmount device then luksClose it? I've never tried it in this order.
-- Nikolai
On Sun, 2014-03-16 at 19:21 +0100, Nikolai Maziashvili wrote:
On Sunday 16 March 2014 17:49:27 Always Learning wrote:
#! /bin/bash cryptsetup luksClose $1 umount /dev/mapper/$1
First close then unmount? Isn't it supposed to be other way around - first unmount device then luksClose it? I've never tried it in this order.
I'll reverse them and see what happens. Thanks for your observation.