* [dm-crypt] Command failed: Can not access device on luksOpen
@ 2009-08-27 21:39 Paul Bradley
2009-08-28 13:44 ` Milan Broz
0 siblings, 1 reply; 7+ messages in thread
From: Paul Bradley @ 2009-08-27 21:39 UTC (permalink / raw)
To: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 15929 bytes --]
Following a power failure and reboot luksOpen is failing for an encrypted
device:
~$ sudo cryptsetup luksOpen /dev/satadisks_vg/backup_lv cryptbackup
Command failed: Can not access device
However isLuks is OK:
~$ sudo cryptsetup isLuks /dev/satadisks_vg/backup_lv &&echo yes
yes
here's a luksDump
LUKS header information for /dev/satadisks_vg/backup_lv
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 2056
MK bits: 256
MK digest: 49 06 b3 77 eb 4f 0b 95 9d 70 b1 df 3f e8 03 84 54 9c 4a b4
MK salt: <removed>
MK iterations: 10
UUID: <removed>
Key Slot 0: ENABLED
Iterations: 113745
Salt: <removed>
Key material offset: 8
AF stripes: 4000
Key Slot 1: ENABLED
Iterations: 114130
Salt: <removed>
Key material offset: 264
AF stripes: 4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
and a strace of the luksOpen attempt:
~$ sudo sh -c 'strace cryptsetup luksOpen /dev/satadisks_vg/backup_lv
cryptbackup'
execve("/sbin/cryptsetup", ["cryptsetup", "luksOpen",
"/dev/satadisks_vg/backup_lv", "cryptbackup"], [/* 15 vars */]) = 0
brk(0) = 0x96c4000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb8047000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=19256, ...}) = 0
mmap2(NULL, 19256, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8042000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libpopt.so.0", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\26\0\0004\0\0\0\30"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=34640, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb8041000
mmap2(NULL, 37452, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb8037000
mmap2(0xb803f000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb803f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libdevmapper.so.1.02.1", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260,\0\0004\0\0\0X"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=91792, ...}) = 0
mmap2(NULL, 94628, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb801f000
mmap2(0xb8034000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb8034000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libuuid.so.1", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\20\0\0004\0\0\0\250"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13872, ...}) = 0
mmap2(NULL, 16584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb801a000
mmap2(0xb801d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb801d000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libgcrypt.so.11", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340E\0\0004\0\0\0\214"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=423876, ...}) = 0
mmap2(NULL, 427460, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7fb1000
mmap2(0xb8017000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x65) = 0xb8017000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libgpg-error.so.0", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\6\0\0004\0\0\0\344"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=11468, ...}) = 0
mmap2(NULL, 14352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7fad000
mmap2(0xb7fb0000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7fb0000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320h\1\0004\0\0\0\344"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1442180, ...}) = 0
mmap2(NULL, 1451632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e4a000
mprotect(0xb7fa6000, 4096, PROT_NONE) = 0
mmap2(0xb7fa7000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15c) = 0xb7fa7000
mmap2(0xb7faa000, 9840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7faa000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7e49000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libselinux.so.1", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pA\0\0004\0\0\0t"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=99972, ...}) = 0
mmap2(NULL, 105276, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e2f000
mmap2(0xb7e47000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17) = 0xb7e47000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0
\n\0\0004\0\0\0D"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9676, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e2b000
mmap2(0xb7e2d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7e2d000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7e2a000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e2a970, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "\331\31\250\244"..., 4) = 4
close(3) = 0
mprotect(0xb7e2d000, 4096, PROT_READ) = 0
mprotect(0xb7e47000, 4096, PROT_READ) = 0
mprotect(0xb7fa7000, 8192, PROT_READ) = 0
mprotect(0xb8017000, 4096, PROT_READ) = 0
mprotect(0xb801d000, 4096, PROT_READ) = 0
mprotect(0xb8034000, 4096, PROT_READ) = 0
mprotect(0xb803f000, 4096, PROT_READ) = 0
mprotect(0x8055000, 4096, PROT_READ) = 0
mprotect(0xb8065000, 4096, PROT_READ) = 0
munmap(0xb8042000, 19256) = 0
brk(0) = 0x96c4000
brk(0x96e5000) = 0x96e5000
open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file
or directory)
statfs64("/selinux", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096,
f_blocks=4511431, f_bfree=4034205, f_bavail=3805034, f_files=1146880,
f_ffree=1053066, f_fsid={841576095, 1211167476}, f_namelen=255,
f_frsize=4096}) = 0
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb8046000
read(3, "rootfs / rootfs rw 0 0\nnone /sys "..., 1024) = 817
read(3, ""..., 1024) = 0
close(3) = 0
munmap(0xb8046000, 4096) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb8046000
read(3, "# Locale name alias data base.\n# "..., 4096) = 2570
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0xb8046000, 4096) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_IDENTIFICATION", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
mmap2(NULL, 366, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8046000
close(3) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0
mmap2(NULL, 26048, PROT_READ, MAP_SHARED, 3, 0) = 0xb7e23000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MEASUREMENT", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
mmap2(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8045000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_TELEPHONE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
mmap2(NULL, 56, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8044000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_ADDRESS", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap2(NULL, 127, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8043000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_NAME", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0
mmap2(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8042000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_PAPER", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
mmap2(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7e22000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MESSAGES", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3) = 0
open("/usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=52, ...}) = 0
mmap2(NULL, 52, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7e21000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MONETARY", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=290, ...}) = 0
mmap2(NULL, 290, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7e20000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_COLLATE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=962094, ...}) = 0
mmap2(NULL, 962094, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d35000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_TIME", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2470, ...}) = 0
mmap2(NULL, 2470, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d34000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_NUMERIC", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0
mmap2(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d33000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_CTYPE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=256316, ...}) = 0
mmap2(NULL, 256316, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7cf4000
close(3) = 0
mlockall(MCL_CURRENT|MCL_FUTURE) = 0
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7cf3000
read(3, "Character devices:\n 1 mem\n 4 /d"..., 1024) = 514
close(3) = 0
munmap(0xb7cf3000, 4096) = 0
open("/proc/misc", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7cf3000
read(3, "130 watchdog\n175 agpgart\n 58 netw"..., 1024) = 172
close(3) = 0
munmap(0xb7cf3000, 4096) = 0
stat64("/dev/mapper/control", {st_mode=S_IFCHR|0660, st_rdev=makedev(10,
61), ...}) = 0
open("/dev/mapper/control", O_RDWR|O_LARGEFILE) = 3
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7cf3000
read(4, "Character devices:\n 1 mem\n 4 /d"..., 1024) = 514
read(4, ""..., 1024) = 0
close(4) = 0
munmap(0xb7cf3000, 4096) = 0
ioctl(3, DM_VERSION, 0x96caa10) = 0
ioctl(3, DM_TABLE_STATUS, 0x96caa10) = -1 ENXIO (No such device or
address)
open("/dev/satadisks_vg/backup_lv",
O_RDONLY|O_EXCL|O_SYNC|O_DIRECT|O_LARGEFILE) = -1 EBUSY (Device or resource
busy)
close(3) = 0
open("/usr/share/locale/en_GB.UTF-8/LC_MESSAGES/cryptsetup.mo", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/share/locale/en_GB.utf8/LC_MESSAGES/cryptsetup.mo", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/share/locale/en_GB/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/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)
open("/usr/share/locale-langpack/en_GB.UTF-8/LC_MESSAGES/cryptsetup.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB.utf8/LC_MESSAGES/cryptsetup.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/cryptsetup.mo", O_RDONLY)
= 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=512, ...}) = 0
mmap2(NULL, 512, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7cf3000
close(3) = 0
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/cryptsetup.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/cryptsetup.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/cryptsetup.mo", O_RDONLY) =
-1 ENOENT (No such file or directory)
write(2, "Command failed"..., 14Command failed) = 14
write(2, ": Can not access device\n"..., 24: Can not access device
) = 24
exit_group(-15) = ?
Lots of data on here, so any help very gratefully appreciated.
Paul
[-- Attachment #2: Type: text/html, Size: 18259 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
2009-08-27 21:39 [dm-crypt] Command failed: Can not access device on luksOpen Paul Bradley
@ 2009-08-28 13:44 ` Milan Broz
[not found] ` <f70f2e870908290846t18149b70g26c8466c98349dff@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Milan Broz @ 2009-08-28 13:44 UTC (permalink / raw)
To: Paul Bradley; +Cc: dm-crypt
Paul Bradley wrote:
>
> Following a power failure and reboot luksOpen is failing for an
> encrypted device:
>
> ~$ sudo cryptsetup luksOpen /dev/satadisks_vg/backup_lv cryptbackup
> Command failed: Can not access device
> open("/dev/satadisks_vg/backup_lv",
> O_RDONLY|O_EXCL|O_SYNC|O_DIRECT|O_LARGEFILE) = -1 EBUSY (Device or
> resource busy)
This means that device exclusive open failed.
Check "dmsetup info" for open count for this device - should be 0.
Milan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
[not found] ` <f70f2e870908290846t18149b70g26c8466c98349dff@mail.gmail.com>
@ 2009-08-29 15:46 ` Paul Bradley
2009-08-29 16:45 ` Heinz Diehl
0 siblings, 1 reply; 7+ messages in thread
From: Paul Bradley @ 2009-08-29 15:46 UTC (permalink / raw)
To: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
Thanks for the reply, never knew about dmsetup before.
Here's the output:
# dmsetup info satadisks_vg-backup_lv
Name: satadisks_vg-backup_lv
State: ACTIVE
Read Ahead: 1024
Tables present: LIVE
Open count: 1
Event number: 0
Major, minor: 252, 3
Number of targets: 1
UUID: LVM-<REMOVED>
Since the device shouldn't be open by anything (I've even rebooted the box
to ensure no stale locks) how do I go about finding out what has it locked,
and how do I safely remove that lock?
thanks
Paul
On Fri, Aug 28, 2009 at 2:44 PM, Milan Broz <mbroz@redhat.com> wrote:
> Paul Bradley wrote:
> >
> > Following a power failure and reboot luksOpen is failing for an
> > encrypted device:
> >
> > ~$ sudo cryptsetup luksOpen /dev/satadisks_vg/backup_lv cryptbackup
> > Command failed: Can not access device
>
> > open("/dev/satadisks_vg/backup_lv",
> > O_RDONLY|O_EXCL|O_SYNC|O_DIRECT|O_LARGEFILE) = -1 EBUSY (Device or
> > resource busy)
>
> This means that device exclusive open failed.
>
> Check "dmsetup info" for open count for this device - should be 0.
>
> Milan
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1772 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
2009-08-29 15:46 ` Paul Bradley
@ 2009-08-29 16:45 ` Heinz Diehl
2009-08-29 23:25 ` Paul Bradley
0 siblings, 1 reply; 7+ messages in thread
From: Heinz Diehl @ 2009-08-29 16:45 UTC (permalink / raw)
To: dm-crypt
At Sat, 29 Aug 2009 16:46:33 +0100,
Paul Bradley wrote:
> Since the device shouldn't be open by anything (I've even rebooted the box to ensure no stale locks) how do I go about
> finding out what has it locked, and how do I safely remove that lock?
Have you checked /dev/mapper/ for the devicename?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
2009-08-29 16:45 ` Heinz Diehl
@ 2009-08-29 23:25 ` Paul Bradley
2009-08-30 7:44 ` Heinz Diehl
0 siblings, 1 reply; 7+ messages in thread
From: Paul Bradley @ 2009-08-29 23:25 UTC (permalink / raw)
To: Heinz Diehl, dm-crypt
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
Yes I've checked /dev/mapper, there is no device there. It would normally be
mounted as cryptbackup.
I have satadisks_vg-backup_lv in /dev/mapper, but that is the "lower level"
LV mapping on top of which the cryptdisk is built, not the plaintext
mapping.
Incidentally, there are also some files in /dev/mapper which I've never seen
before called temporary-cryptsetup-xxxx (xxxx being a 4 digit number), there
are 4 of these files. Perhaps these are a symptom of the problem, as I have
never seen them before.
thanks.
Paul
On Sat, Aug 29, 2009 at 5:45 PM, Heinz Diehl <htd@fancy-poultry.org> wrote:
> At Sat, 29 Aug 2009 16:46:33 +0100,
> Paul Bradley wrote:
>
> > Since the device shouldn't be open by anything (I've even rebooted the
> box to ensure no stale locks) how do I go about
> > finding out what has it locked, and how do I safely remove that lock?
>
> Have you checked /dev/mapper/ for the devicename?
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
[-- Attachment #2: Type: text/html, Size: 1562 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
2009-08-29 23:25 ` Paul Bradley
@ 2009-08-30 7:44 ` Heinz Diehl
2009-09-01 15:41 ` Paul Bradley
0 siblings, 1 reply; 7+ messages in thread
From: Heinz Diehl @ 2009-08-30 7:44 UTC (permalink / raw)
To: dm-crypt
At Sun, 30 Aug 2009 00:25:57 +0100,
Paul Bradley wrote:
> Incidentally, there are also some files in /dev/mapper which I've never seen before called temporary-cryptsetup-xxxx
> (xxxx being a 4 digit number), there are 4 of these files. Perhaps these are a symptom of the problem, as I have never
> seen them before.
I would suggest to delete them, reboot and try again. Alternatively, you could
try to close them via the "cryptsetup luksClose" command.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-crypt] Command failed: Can not access device on luksOpen
2009-08-30 7:44 ` Heinz Diehl
@ 2009-09-01 15:41 ` Paul Bradley
0 siblings, 0 replies; 7+ messages in thread
From: Paul Bradley @ 2009-09-01 15:41 UTC (permalink / raw)
To: Heinz Diehl, dm-crypt
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Thanks - I've luksClose'd them and now can mount everything OK.
Very relieved to have my data back.
thanks again
Paul
On Sun, Aug 30, 2009 at 8:44 AM, Heinz Diehl <htd@fancy-poultry.org> wrote:
> At Sun, 30 Aug 2009 00:25:57 +0100,
> Paul Bradley wrote:
>
> > Incidentally, there are also some files in /dev/mapper which I've never
> seen before called temporary-cryptsetup-xxxx
> > (xxxx being a 4 digit number), there are 4 of these files. Perhaps these
> are a symptom of the problem, as I have never
> > seen them before.
>
> I would suggest to delete them, reboot and try again. Alternatively, you
> could
> try to close them via the "cryptsetup luksClose" command.
>
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
[-- Attachment #2: Type: text/html, Size: 1364 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-09-01 15:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27 21:39 [dm-crypt] Command failed: Can not access device on luksOpen Paul Bradley
2009-08-28 13:44 ` Milan Broz
[not found] ` <f70f2e870908290846t18149b70g26c8466c98349dff@mail.gmail.com>
2009-08-29 15:46 ` Paul Bradley
2009-08-29 16:45 ` Heinz Diehl
2009-08-29 23:25 ` Paul Bradley
2009-08-30 7:44 ` Heinz Diehl
2009-09-01 15:41 ` Paul Bradley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.