I'm testing LUKS encryption and have encountered a problem as I am testing. I created a new disk, encrypted the disk with a key, unlocked the disk and created and mounted a filesystem. This worked correctly, however I wanted to reverse this process and have found that I cannot wipe the disk. I have unmounted the file system, unlocked the disk and there are no share files.
Below is the error in OMV:
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev --rereadpt '/dev/sdb' 2>&1' with exit code '1': blockdev: ioctl error on BLKRRPART: Device or resource busy
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev --rereadpt '/dev/sdb' 2>&1' with exit code '1': blockdev: ioctl error on BLKRRPART: Device or resource busy in /usr/share/openmediavault/engined/rpc/diskmgmt.inc:312
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(622): Engined\Rpc\DiskMgmt->Engined\Rpc\{closure}()
#1 /usr/share/openmediavault/engined/rpc/diskmgmt.inc(244): OMV\Rpc\ServiceAbstract->execBgProc()
#2 [internal function]: Engined\Rpc\DiskMgmt->wipe()
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
#5 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call()
#6 {main}
Here is an output from CLI with the mounted device SDA:
root@nas:~# lsblk -fs
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sdb
sdc1 vfat FAT32 B9D9-5472 510.8M 0% /boot/efi
└─sdc
sdc2 ext4 1.0 0ad064a7-67ca-4b6c-8958-7633afa05d3a 209G 3% /
└─sdc
sdc3 swap 1 78e2d1c9-ce75-4bb8-8a81-69ea7fe163ec [SWAP]
└─sdc
sda-crypt ext4 1.0 0058fb07-d917-47a8-b12f-f51012ed45e7 3.6T 0% /srv/dev-disk-by-uuid-0058fb07-d917-47a8-b12f-f51012ed45e7
└─sda crypto_LUKS 2 sdaluks 764c478e-f8fd-4f82-9526-5d4c308c3753
Here is the unmounted device SDA:
root@nas:~# lsblk -fs
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda1 vfat FAT32 B9D9-5472 510.8M 0% /boot/efi
└─sda
sda2 ext4 1.0 0ad064a7-67ca-4b6c-8958-7633afa05d3a 209G 3% /
└─sda
sda3 swap 1 78e2d1c9-ce75-4bb8-8a81-69ea7fe163ec [SWAP]
└─sda
sdc
sdb-crypt ext4 1.0 0058fb07-d917-47a8-b12f-f51012ed45e7
└─sdb
There doesn't appear to be an option in the CLI to remove LUKS encryption so I can reset the disk. I suspect this is the reason why I cannot wipe it from the GUI, although I could probably wipe the disk from CLI, however I prefer to follow the right procedure in the GUI to avoid any issues later with the config in the OMV system.
Assistance here would be appreciated.