On Mon, Oct 31, 2016 at 02:32:53PM +0800, Qu Wenruo wrote: > > > At 10/31/2016 02:25 PM, Marc MERLIN wrote: > >On Mon, Oct 31, 2016 at 02:04:10PM +0800, Qu Wenruo wrote: > >>>Sorry for asking, am I doing this wrong? > >>>myth:~# dd if=/dev/mapper/crypt_bcache0 of=/tmp/dump1 bs=512 count=32 > >>>skip=26367830208 > >>>dd: reading `/dev/mapper/crypt_bcache0': Invalid argument > >>>0+0 records in > >>>0+0 records out > >>>0 bytes (0 B) copied, 0.000401393 s, 0.0 kB/s > >> > >>So, the underlying MD RAID5 are complaining about some wrong data, and > >>refuse to read out. > >> > >>It seems that btrfs-progs can't handle read failure? > >>Maybe dm-error could emulate it. > >> > >>And what about the 2nd range? > > > >they both fail the same, but I wasn' tsure if I typed the wrong dd command > >or not. > > Strange, your command seems OK to me. > > Does it has anything to do with your security setup or something like that? > Or is it related to dm-crypt or bcache? > > > But this reminds me, if dd can't read it, maybe btrfs-progs is the same. > > Maybe only kernel can read dm-crypt device while user space tools can't > access dm-crypt devices directly?
It can, it's just the offset seems wrong: myth:~# dd if=/dev/mapper/crypt_bcache0 of=/tmp/dump1 bs=512 count=32 skip=26367830208 dd: reading `/dev/mapper/crypt_bcache0': Invalid argument 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.000421662 s, 0.0 kB/s If I divide by 1000, it works: myth:~# dd if=/dev/mapper/crypt_bcache0 of=/tmp/dump1 bs=512 count=32 skip=26367830 32+0 records in 32+0 records out 16384 bytes (16 kB) copied, 0.139005 s, 118 kB/s so that's why I was asking you if I counted the offset wrong. I took the value you asked and divided by 512, but it seems too big 13500329066496 / 512 = 26367830208 Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html