Bug 1566396 - [RHEL-7.5][cryptsetup] the option of "isLuks" doesn't work to cryptsetup
Summary: [RHEL-7.5][cryptsetup] the option of "isLuks" doesn't work to cryptsetup
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cryptsetup
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-12 08:53 UTC by xhe@redhat.com
Modified: 2018-04-12 09:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-12 09:19:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description xhe@redhat.com 2018-04-12 08:53:01 UTC
Description of problem:
[RHEL-7.5][cryptsetup] the option of "isLuks" doesn't work to cryptsetup

Version-Release number of selected component (if applicable):
cryptsetup-1.7.4-4.el7.x86_64

How reproducible:
often

Steps to Reproduce:
1. create luks format on device /dev/loop1
2. run "cryptsetup isLuks /dev/loop1"

Actual results:
******************* snip **********************
# lsblk
NAME                                        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                           8:0    1 465.8G  0 disk  
├─sda1                                        8:1    1     1G  0 part  /boot
└─sda2                                        8:2    1 464.8G  0 part  
  ├─rhel_storageqe--52-root                 253:0    0    50G  0 lvm   /
  ├─rhel_storageqe--52-swap                 253:1    0   3.9G  0 lvm   [SWAP]
  └─rhel_storageqe--52-home                 253:2    0 410.9G  0 lvm   /home
sr0                                          11:0    1  1024M  0 rom   
loop0                                         7:0    0  1000M  0 loop  
└─luks-4b7653e3-7b64-4ced-94de-3dd95e329d5b 253:3    0   998M  0 crypt 
loop2                                         7:2    0  1000M  0 loop  
└─luks-b9022751-b2ba-41d8-8806-66677ff6a97a 253:4    0   998M  0 crypt 
# cryptsetup isLuks /dev/loop0 --> no info returned
# 
# cryptsetup isLuks /dev/loop1 --> no info returned
# 
# cryptsetup isLuks /dev/loop2 --> no info returned
# 

# strace cryptsetup isLuks /dev/loop0
execve("/usr/sbin/cryptsetup", ["cryptsetup", "isLuks", "/dev/loop0"], [/* 39 vars */]) = 0
brk(NULL)                               = 0x106d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea36000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=44171, ...}) = 0
mmap(NULL, 44171, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4e7ea2b000
close(3)                                = 0
open("/lib64/libcryptsetup.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200L\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=166760, ...}) = 0
mmap(NULL, 2259336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7e5ee000
mprotect(0x7f4e7e614000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7e813000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f4e7e813000
close(3)                                = 0
open("/lib64/libpopt.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\34\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=41456, ...}) = 0
mmap(NULL, 2135088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7e3e4000
mprotect(0x7f4e7e3ed000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7e5ec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f4e7e5ec000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea2a000
open("/lib64/libpwquality.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=23912, ...}) = 0
mmap(NULL, 2118208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7e1de000
mprotect(0x7f4e7e1e3000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7e3e2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f4e7e3e2000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340$\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2151832, ...}) = 0
mmap(NULL, 3981792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7de11000
mprotect(0x7f4e7dfd4000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7e1d3000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c2000) = 0x7f4e7e1d3000
mmap(0x7f4e7e1d9000, 16864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7e1d9000
close(3)                                = 0
open("/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\24\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=20112, ...}) = 0
mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7dc0c000
mprotect(0x7f4e7dc10000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7de0f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f4e7de0f000
close(3)                                = 0
open("/lib64/libdevmapper.so.1.02", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\266\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=356120, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea29000
mmap(NULL, 2449808, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7d9b5000
mprotect(0x7f4e7da06000, 2097152, PROT_NONE) = 0
mmap(0x7f4e7dc06000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x51000) = 0x7f4e7dc06000
mmap(0x7f4e7dc0b000, 400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7dc0b000
close(3)                                = 0
open("/lib64/libgcrypt.so.11", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0u\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=535064, ...}) = 0
mmap(NULL, 2621648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7d734000
mprotect(0x7f4e7d7b1000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7d9b0000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7c000) = 0x7f4e7d9b0000
mmap(0x7f4e7d9b4000, 208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7d9b4000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19288, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7d530000
mprotect(0x7f4e7d532000, 2097152, PROT_NONE) = 0
mmap(0x7f4e7d732000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f4e7d732000
close(3)                                = 0
open("/lib64/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\n\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19384, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea28000
mmap(NULL, 2113656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7d32b000
mprotect(0x7f4e7d32f000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7d52e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f4e7d52e000
close(3)                                = 0
open("/lib64/libcrack.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240;\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=44600, ...}) = 0
mmap(NULL, 2138640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7d120000
mprotect(0x7f4e7d129000, 2097152, PROT_NONE) = 0
mmap(0x7f4e7d329000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f4e7d329000
close(3)                                = 0
open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320i\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=155784, ...}) = 0
mmap(NULL, 2255184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7cef9000
mprotect(0x7f4e7cf1d000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7d11c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x7f4e7d11c000
mmap(0x7f4e7d11e000, 6480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7d11e000
close(3)                                = 0
open("/lib64/libsepol.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@a\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=660200, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea27000
mmap(NULL, 2744240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7cc5b000
mprotect(0x7f4e7ccf7000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7cef6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9b000) = 0x7f4e7cef6000
mmap(0x7f4e7cef8000, 4016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7cef8000
close(3)                                = 0
open("/lib64/libudev.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 :\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=91256, ...}) = 0
mmap(NULL, 2185456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7ca45000
mprotect(0x7f4e7ca5a000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7cc59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f4e7cc59000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=142184, ...}) = 0
mmap(NULL, 2208904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7c829000
mprotect(0x7f4e7c840000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7ca3f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f4e7ca3f000
mmap(0x7f4e7ca41000, 13448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ca41000
close(3)                                = 0
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20S\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1137024, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea26000
mmap(NULL, 3150120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7c527000
mprotect(0x7f4e7c628000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7c827000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7f4e7c827000
close(3)                                = 0
open("/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=90632, ...}) = 0
mmap(NULL, 2183688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7c311000
mprotect(0x7f4e7c326000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7c525000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f4e7c525000
close(3)                                = 0
open("/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\25\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=402384, ...}) = 0
mmap(NULL, 2494984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7c0af000
mprotect(0x7f4e7c10f000, 2097152, PROT_NONE) = 0
mmap(0x7f4e7c30f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x60000) = 0x7f4e7c30f000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea25000
open("/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=43776, ...}) = 0
mmap(NULL, 2128920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7bea7000
mprotect(0x7f4e7beae000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7c0ad000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f4e7c0ad000
close(3)                                = 0
open("/lib64/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=20032, ...}) = 0
mmap(NULL, 2114112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7bca2000
mprotect(0x7f4e7bca6000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7bea5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f4e7bea5000
close(3)                                = 0
open("/lib64/libdw.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \230\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=297376, ...}) = 0
mmap(NULL, 2386064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7ba5b000
mprotect(0x7f4e7ba9f000, 2097152, PROT_NONE) = 0
mmap(0x7f4e7bc9f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x44000) = 0x7f4e7bc9f000
close(3)                                = 0
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88776, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea24000
mmap(NULL, 2184192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7b845000
mprotect(0x7f4e7b85a000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7ba59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f4e7ba59000
close(3)                                = 0
open("/lib64/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\23\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19896, ...}) = 0
mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7b640000
mprotect(0x7f4e7b644000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7b843000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f4e7b843000
close(3)                                = 0
open("/usr/lib64/elfutils/tls/x86_64/libelf.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/elfutils/tls/x86_64", 0x7ffc4fa00db0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/elfutils/tls/libelf.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/elfutils/tls", 0x7ffc4fa00db0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/elfutils/x86_64/libelf.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/elfutils/x86_64", 0x7ffc4fa00db0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/elfutils/libelf.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/elfutils", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib64/libelf.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220/\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=100000, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea23000
mmap(NULL, 2191808, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7b428000
mprotect(0x7f4e7b43f000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7b63e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f4e7b63e000
close(3)                                = 0
open("/usr/lib64/elfutils/liblzma.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2000\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=157400, ...}) = 0
mmap(NULL, 2249352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7b202000
mprotect(0x7f4e7b227000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7b426000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f4e7b426000
close(3)                                = 0
open("/usr/lib64/elfutils/libbz2.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libbz2.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\27\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=68192, ...}) = 0
mmap(NULL, 2162024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4e7aff2000
mprotect(0x7f4e7b001000, 2093056, PROT_NONE) = 0
mmap(0x7f4e7b200000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f4e7b200000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea22000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea21000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea20000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea1e000
arch_prctl(ARCH_SET_FS, 0x7f4e7ea1e880) = 0
mprotect(0x7f4e7e1d3000, 16384, PROT_READ) = 0
mprotect(0x7f4e7b200000, 4096, PROT_READ) = 0
mprotect(0x7f4e7ca3f000, 4096, PROT_READ) = 0
mprotect(0x7f4e7b426000, 4096, PROT_READ) = 0
mprotect(0x7f4e7c525000, 4096, PROT_READ) = 0
mprotect(0x7f4e7b63e000, 4096, PROT_READ) = 0
mprotect(0x7f4e7b843000, 4096, PROT_READ) = 0
mprotect(0x7f4e7ba59000, 4096, PROT_READ) = 0
mprotect(0x7f4e7d732000, 4096, PROT_READ) = 0
mprotect(0x7f4e7bc9f000, 8192, PROT_READ) = 0
mprotect(0x7f4e7bea5000, 4096, PROT_READ) = 0
mprotect(0x7f4e7c0ad000, 4096, PROT_READ) = 0
mprotect(0x7f4e7c30f000, 4096, PROT_READ) = 0
mprotect(0x7f4e7c827000, 4096, PROT_READ) = 0
stat("/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned", 0x7ffc4fa01a20) = -1 ENOENT (No such file or directory)
mprotect(0x7f4e7cc59000, 4096, PROT_READ) = 0
mprotect(0x7f4e7cef6000, 4096, PROT_READ) = 0
mprotect(0x7f4e7d11c000, 4096, PROT_READ) = 0
mprotect(0x7f4e7d329000, 4096, PROT_READ) = 0
mprotect(0x7f4e7d52e000, 4096, PROT_READ) = 0
mprotect(0x7f4e7d9b0000, 4096, PROT_READ) = 0
mprotect(0x7f4e7dc06000, 4096, PROT_READ) = 0
mprotect(0x7f4e7de0f000, 4096, PROT_READ) = 0
mprotect(0x7f4e7e3e2000, 4096, PROT_READ) = 0
mprotect(0x7f4e7e5ec000, 4096, PROT_READ) = 0
mprotect(0x7f4e7e813000, 4096, PROT_READ) = 0
mprotect(0x60d000, 4096, PROT_READ)     = 0
mprotect(0x7f4e7ea37000, 4096, PROT_READ) = 0
munmap(0x7f4e7ea2b000, 44171)           = 0
set_tid_address(0x7f4e7ea1eb50)         = 3698
set_robust_list(0x7f4e7ea1eb60, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7f4e7c82f790, [], SA_RESTORER|SA_SIGINFO, 0x7f4e7c838680}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f4e7c82f820, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f4e7c838680}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
stat("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
brk(NULL)                               = 0x106d000
brk(0x108e000)                          = 0x108e000
access("/etc/selinux/config", F_OK)     = 0
access("/etc/system-fips", F_OK)        = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106070960, ...}) = 0
mmap(NULL, 106070960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4e74ac9000
close(3)                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea35000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f4e7ea35000, 4096)            = 0
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGINT, {0x404dd0, [], SA_RESTORER, 0x7f4e7de47280}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x404dd0, [], SA_RESTORER, 0x7f4e7de47280}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [INT TERM], NULL, 8) = 0
open("/dev/loop0", O_RDONLY|O_DIRECT)   = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
ioctl(3, BLKSSZGET, [512])              = 0
fstatfs(3, {f_type=TMPFS_MAGIC, f_bsize=4096, f_blocks=480641, f_bfree=480641, f_bavail=480641, f_files=480641, f_ffree=480211, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID}) = 0
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
close(3)                                = 0
open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 3
open("/dev/random", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 4
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = 5
read(5, "0", 1)                         = 1
close(5)                                = 0
access("/etc/gcrypt/fips_enabled", F_OK) = -1 ENOENT (No such file or directory)
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea35000
read(5, "0\n", 1024)                    = 2
close(5)                                = 0
munmap(0x7f4e7ea35000, 4096)            = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4e7ea32000
getuid()                                = 0
mlock(0x7f4e7ea32000, 16384)            = 0
uname({sysname="Linux", nodename="storageqe-52.rhts.eng.pek2.redhat.com", ...}) = 0
open("/dev/loop0", O_RDONLY|O_SYNC|O_DIRECT) = 5
open("/dev/loop0", O_RDONLY)            = 6
fstat(6, {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
ioctl(6, BLKSSZGET, [512])              = 0
close(6)                                = 0
fstatfs(5, {f_type=TMPFS_MAGIC, f_bsize=4096, f_blocks=480641, f_bfree=480641, f_bavail=480641, f_files=480641, f_ffree=480211, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID}) = 0
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
close(5)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++


Expected results:
"cryptsetup isLuks /dev/loop1" should return a result to tell the /dev/loop1 is luks format or not.

Additional info:

Comment 2 Ondrej Kozina 2018-04-12 09:19:18 UTC
quoting cryptsetup man page, where *literally* is:

> isLuks <device>
>
> Returns  true,  if  <device>  is  a  LUKS device, false otherwise.  Use option
> -v to get human-readable feedback. 'Command successful.'  means the device is a > LUKS device.

Also, same man page:

> RETURN CODES
> Cryptsetup returns 0 on success and a non-zero value on error.


Note You need to log in before you can comment on or make changes to this bug.