All of lore.kernel.org
 help / color / mirror / Atom feed
* Moved partition via dd
@ 2013-06-08 12:47 André Schlichting
  2013-06-08 22:20 ` Chris Murphy
  0 siblings, 1 reply; 8+ messages in thread
From: André Schlichting @ 2013-06-08 12:47 UTC (permalink / raw)
  To: linux-btrfs

I did the following experiment and tried to move a dm-cryped btrfs 
partition to the left on an external 3TB drive.

The old partition had the sector boundaries: 245547520 - 732566527

I deleted this one and created a new one with boundaries: 33024 - 732566640

Now I moved the data
   > sudo dd conv=notrunc bs=4096 iflag=fullblock if=/dev/sdc2 
skip=$((245547520-33024)) seek=0 of=/dev/sdc2

Afterwards I could succesfully open the dm-crypt container
   > cryptsetup luksOpen /dev/sdc2 data-ext

The idea was now to mount the btrfs filesystem and resize it to fill up 
the whole new partition. But the mounting of the btrfs filesystem failed 
with following errors
   > mount /dev/mapper/data-ext /mnt/data-ext/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/data-ext,
          missing codepage or helper program, or other error

          In some cases useful info is found in syslog - try
          dmesg | tail or so.

   > dmesg | tail
[51666.228722] device label data-ext devid 1 transid 2088 
/dev/mapper/data-ext
[51666.230327] btrfs: disk space caching is enabled
[51666.256347] btrfs bad tree block start 13587293097915834379 959572647936
[51666.256854] btrfs bad tree block start 15898041577671574353 959572647936
[51666.256863] Failed to read block groups: -5
[51666.262707] btrfs: open_ctree failed

   > btrfs --version
Btrfs v0.20-rc1-253-g7854c8b

   > btrfsck /dev/mapper/data-ext
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=15898041577671574353
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=13587293097915834379
read block failed check_tree_block
Check tree block failed, want=615210135552, have=9470612182821228052
Check tree block failed, want=615210135552, have=9470612182821228052
Check tree block failed, want=615210135552, have=11515627140616528497
Check tree block failed, want=615210135552, have=11515627140616528497
Check tree block failed, want=615210135552, have=11515627140616528497
read block failed check_tree_block
Checking filesystem on /dev/mapper/data-ext
UUID: eba8eac6-836f-4664-b8b7-e2a405772e5a
checking extents

   > dmesg | tail

[51738.639126] btrfsck[15851]: segfault at 1d3 ip 0000000000413ed0 sp 
00007fff52494e40 error 4 in btrfsck[400000+4d000]

   > btrfs-debug-tree /dev/mapper/data-ext > debug-tree.log 2> 
debug-tree.err

I ran also from the Problem-FAQ
   > btrfs-zero-log /dev/mapper/data-ext
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=15898041577671574353
Check tree block failed, want=959572647936, have=13587293097915834379
Check tree block failed, want=959572647936, have=13587293097915834379
read block failed check_tree_block
Check tree block failed, want=615210135552, have=9470612182821228052
Check tree block failed, want=615210135552, have=9470612182821228052
Check tree block failed, want=615210135552, have=11515627140616528497
Check tree block failed, want=615210135552, have=11515627140616528497
Check tree block failed, want=615210135552, have=11515627140616528497
read block failed check_tree_block

   > dmesg | tail
[52362.222122] btrfs-zero-log[16113]: segfault at 1d3 ip 
0000000000401e11 sp 00007fff2f214060 error 4 in btrfs-zero-log[400000+2b000]
[52362.367331] device label data-ext devid 1 transid 2088 /dev/dm-4






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-09 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 12:47 Moved partition via dd André Schlichting
2013-06-08 22:20 ` Chris Murphy
2013-06-08 22:42   ` André Schlichting
2013-06-08 22:57     ` Chris Murphy
2013-06-09 10:44       ` André Schlichting
2013-06-09 11:11         ` Hugo Mills
2013-06-09 17:05           ` André Schlichting
2013-06-09 20:09         ` Chris Murphy

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.