Error: device-mapper: create ioctl on veracrypt1 failed: Device or resource busy
Open source disk encryption with strong security for the Paranoid
Brought to you by:
idrassi
Hello,
I am trying to use Veracypt to understand how it works.
So to do some tests I created a Dockerfile from UBUNTU18.04 with the version 1.24 of veracrypt in command line.
I download the package on the official veracrypt website.
I create a veracrypt group and set rights for user.
I try to create a volume in interactive mode and it works.
But when I try to mount it with the command presented in veracrypt --help:
veracrypt myvolumename.hc /media/veracrypt1
** I TRY WITH AND WITHOUT THE .HC AFTER MY VOLUME NAME**
I got this error:
Error: device-mapper: create ioctl on veracrypt1 failed: Device or resource busy
Command failed
So i try in non interactive mode to check if there is/are some differences with this command:
sudo veracrypt -t -c --volume-type=normal /dev/sd1 --encryption=aes --hash=sha-512 --filesystem=ext4 -p yoursecurepassword --pim=0 -k "" --random-source=/dev/urandom --size=10000000
And got this response:
veracrypt@d85696acae55:~$ sudo veracrypt -t -c --volume-type=normal /dev/sd1 --encryption=aes --hash=sha-512 --filesystem=ext4 -p yoursecurepassword --pim=0 -k "" --random-source=/dev/urandom --size=10000000
Done: 100.000% Speed: 4.6 MiB/s Left: 0 s
Error: device-mapper: create ioctl on veracrypt1 failed: Device or resource busy
Command failed
I can change the /dev/sd1 by an other location noting change.
Can you help me?
Thanks
I had this problem today and what helped was to run:
cryptsetup close veracrypt1
(veracrypt1 being the mountpoint name and maybe need to prefix with "sudo" if not in root terminal session)