Re: Encrypted Volume on SoftRaid5 got currupt at powerloss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonas Meurer <jonas@...> writes:


> You can find the relevant bug report at http://bugs.debian.org/432150
> 
> Now from what i read in your mails, it seems like you have some
> experience with salvation/reconstruction of the luks header.
> 
> could you elaborate on the methods you use, maybe in a way that
> could be automated in a script?
> 
> thanks in advance,
>  jonas
> 
> 


Hi Jonas,

as someone mentioned strace in your upper thread i tried a standard output
myself. Maybe this gets a bit mor light in th dark:

execve("/sbin/cryptsetup", ["/sbin/cryptsetup", "luksOpen",
"/dev/mapper/vg-crypted_raid", "raid", "-d", "/mnt/key.md0.orig"], [/* 17 vars
*/]) = 0
uname({sys="Linux", node="server", ...}) = 0
brk(0)                                  = 0x80a1000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f08000
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=21795, ...}) = 0
mmap2(NULL, 21795, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f02000
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\0\0\22\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=26444, ...}) = 0
mmap2(NULL, 29484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7efa000
mmap2(0xb7f01000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f01000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdevmapper.so.1.02", 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\000"..., 512) =512
fstat64(3, {st_mode=S_IFREG|0644, st_size=65332, ...}) = 0
mmap2(NULL, 68344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7ee9000
mmap2(0xb7ef8000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0xb7ef8000
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\0p\v\0\000"..., 512)=512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9128, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7ee8000
mmap2(NULL, 12064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7ee5000
mmap2(0xb7ee7000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7ee7000
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\240O\1"..., 512) =512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1253680, ...}) = 0
mmap2(NULL, 1259676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7db1000
mmap2(0xb7edb000, 28672, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12a) = 0xb7edb000
mmap2(0xb7ee2000, 10396, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ee2000
close(3)                                = 0
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\0P8\0\000"..., 512) =512
fstat64(3, {st_mode=S_IFREG|0644, st_size=79368, ...}) = 0
mmap2(NULL, 84884, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7d9c000
mmap2(0xb7daf000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12) = 0xb7daf000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libsepol.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\0200\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=219824, ...}) = 0
mmap2(NULL, 265152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7d5b000
mmap2(0xb7d91000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35) = 0xb7d91000
mmap2(0xb7d92000, 39872, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d92000
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\20\f\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9592, ...}) = 0
mmap2(NULL, 12404, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7d57000
mmap2(0xb7d59000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7d59000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7d56000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7d55000
mprotect(0xb7edb000, 20480, PROT_READ)  = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d556c0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
munmap(0xb7f02000, 21795)               = 0
access("/etc/selinux/", F_OK)           = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x80a1000
brk(0x80c2000)                          = 0x80c2000
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) =
0xb7f07000
read(3, "rootfs / rootfs rw 0 0\nnone /sys"..., 1024) = 511
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xb7f07000, 4096)                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1440080, ...}) = 0
mmap2(NULL, 1440080, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7bf5000
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) =
0xb7f07000
read(3, "Character devices:\n  1 mem\n  2 p"..., 1024) = 427
close(3)                                = 0
munmap(0xb7f07000, 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) =
0xb7f07000
read(3, "200 tun\n175 agpgart\n 62 device-m"..., 1024) = 68
close(3)                                = 0
munmap(0xb7f07000, 4096)                = 0
stat64("/dev/mapper/control", {st_mode=S_IFCHR|0660, st_rdev=makedev(10, 62),
...}) = 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) =
0xb7f07000
read(4, "Character devices:\n  1 mem\n  2 p"..., 1024) = 427
read(4, "", 1024)                       = 0
close(4)                                = 0
munmap(0xb7f07000, 4096)                = 0
ioctl(3, DM_VERSION, 0x80a1df8)         = 0
ioctl(3, DM_TABLE_STATUS, 0x80a1df8)    = -1 ENXIO (No such device or address)
open("/dev/mapper/vg-crypted_raid", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, BLKROGET, 0xbfa7f830)          = 0
ioctl(4, BLKGETSIZE64, 0xbfa7f828)      = 0
close(4)                                = 0
open("/mnt/key.md0.orig", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfa7f498) = -1 ENOTTY (Inappropriate
ioctl for device)
stat64("/mnt/key.md0.orig", {st_mode=S_IFREG|0600, st_size=1024, ...}) = 0

<<<<<<<<<<<<<<......1kb my secret Key..........>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
close(4)                                = 0
ioctl(4,SNDCTL_TMR_TIMEBASE or TCGETS,0xbfa7f498) = -1 EBADF(Badfiledescriptor)
open("/dev/mapper/vg-crypted_raid", O_RDONLY|O_SYNC|O_DIRECT|O_LARGEFILE) = 4
ioctl(4, BLKSSZGET, 0xbfa7f770)         = 0
read(4, "LUKS\272\276\0\1aes\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512)=512
read(4, "\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\6"..., 512)= 512
close(4)                                = 0
getpid()                                = 6743
open("/dev/mapper/vg-crypted_raid", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, BLKSSZGET, 0xbfa7f6a0)         = 0
close(4)                                = 0
brk(0x80e6000)                          = 0x80e6000
ioctl(3, DM_DEV_CREATE, 0x80c1a90)      = 0
brk(0x80e2000)                          = 0x80e2000
ioctl(3, DM_TABLE_LOAD, 0x80c1a90)      = 0
ioctl(3, DM_DEV_SUSPEND, 0x80c1a90)     = 0
close(3)                                = 0
stat64("/dev/mapper/temporary-cryptsetup-6743", 0xbfa7f5a0) = -1 ENOENT (Nosuch
file or directory)
umask(0)                                = 022
mknod("/dev/mapper/temporary-cryptsetup-6743", S_IFBLK|0660, makedev(254,13))=0
umask(022)                              = 0
chown32("/dev/mapper/temporary-cryptsetup-6743", 0, 6) = 0
open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 302
close(3)                                = 0
open("/dev/mapper/temporary-cryptsetup-6743",
O_RDONLY|O_SYNC|O_DIRECT|O_LARGEFILE) = 3
ioctl(3, BLKSSZGET, 0xbfa7f670)         = 0
read(3, "\236N\204b0\237D=]\324\263\2364\210>{\345M\2661\351\301"..., 512)=512
<<<<<<<<<<<.......... a bunch more HD Data (?) .......>>>>>>>>>>>>>>>>>
read(3, "\0\346\342\370G\242\32dpL\220\337v\375?{)\361\222\363\333"...,512)=512
close(3)                                = 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) =
0xb7f07000
read(3, "Character devices:\n  1 mem\n  2 p"..., 1024) = 427
close(3)                                = 0
munmap(0xb7f07000, 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) =
0xb7f07000
read(3, "200 tun\n175 agpgart\n 62 device-m"..., 1024) = 68
close(3)                                = 0
munmap(0xb7f07000, 4096)                = 0
stat64("/dev/mapper/control", {st_mode=S_IFCHR|0660, st_rdev=makedev(10, 62),
...}) = 0
open("/dev/mapper/control", O_RDWR|O_LARGEFILE) = 3
ioctl(3, DM_DEV_REMOVE, 0x80c1a90)      = 0
close(3)                                = 0
stat64("/dev/mapper/temporary-cryptsetup-6743", {st_mode=S_IFBLK|0660,
st_rdev=makedev(254, 13), ...}) = 0
unlink("/dev/mapper/temporary-cryptsetup-6743") = 0
brk(0x80c3000)                          = 0x80c3000
brk(0x80c2000)                          = 0x80c2000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2582, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f07000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2582
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7f07000, 4096)                = 0
open("/usr/share/locale/de_DE/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/de/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2796, ...}) = 0
mmap2(NULL, 2796, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f07000
close(3)                                = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=21568, ...}) = 0
mmap2(NULL, 21568, PROT_READ, MAP_SHARED, 3, 0) = 0xb7bef000
close(3)                                = 0
open("/usr/lib/gconv/ISO8859-15.so", 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\200\4\0"..., 512)=512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9436, ...}) = 0
mmap2(NULL, 12324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7beb000
mmap2(0xb7bed000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7bed000
close(3)                                = 0
open("/usr/lib/gconv/ISO8859-1.so", 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\200\4\0"..., 512)=512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9436, ...}) = 0
mmap2(NULL, 8228, PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_DENYWRITE,3,0)=0xb7f04000
mmap2(0xb7f05000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f05000
close(3)                                = 0
write(2, "Aufruf fehlgeschlagen", 21Aufruf fehlgeschlagen)   = 21
write(2, ".\n", 2.
)                      = 2
exit_group(1)                           = ?
Process 6743 detached



greetings,

DP




---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux