Re: Force recalculation of a data block checksum

2016-07-23 Thread Chris Murphy
On Sat, Jul 23, 2016 at 10:32 PM, Tomasz Melcer wrote: > On 24.07.2016 04:16, Chris Murphy wrote: >> >> On Sat, Jul 23, 2016 at 8:03 PM, Tomasz Melcer wrote: >>> >>> How can I ask btrfs to recompute the checksum of a data block as it is >>> stored on the

Re: Force recalculation of a data block checksum

2016-07-23 Thread Andrei Borzenkov
24.07.2016 07:32, Tomasz Melcer пишет: > On 24.07.2016 04:16, Chris Murphy wrote: >> On Sat, Jul 23, 2016 at 8:03 PM, Tomasz Melcer wrote: >>> How can I ask btrfs to recompute the checksum of a data block as it is >>> stored on the drive? >> >> Since btrfs-progs 3.17 'btrfs

Re: Force recalculation of a data block checksum

2016-07-23 Thread Tomasz Melcer
On 24.07.2016 04:16, Chris Murphy wrote: On Sat, Jul 23, 2016 at 8:03 PM, Tomasz Melcer wrote: How can I ask btrfs to recompute the checksum of a data block as it is stored on the drive? Since btrfs-progs 3.17 'btrfs check --init-csum-tree' will create a whole new csum

Re: Force recalculation of a data block checksum

2016-07-23 Thread Chris Murphy
The negative of --init-csum-tree is that it's going to work on all data extents. It's going to take a while. It's probably faster to extract the suspect file with restore onto another file system and check its integrity by other means (compare to backup, database integrity check, etc). -- Chris

Re: Force recalculation of a data block checksum

2016-07-23 Thread Duncan
Tomasz Melcer posted on Sun, 24 Jul 2016 04:03:08 +0200 as excerpted: > How can I ask btrfs to recompute the checksum of a data block as it is > stored on the drive? I don't see any command doing an operation like > that, and I couldn't find anything on the topic on the internet. There's no

Re: Force recalculation of a data block checksum

2016-07-23 Thread Chris Murphy
On Sat, Jul 23, 2016 at 8:03 PM, Tomasz Melcer wrote: > Hi, > > I've got a USB-connected HDD with a btrfs partition. The partition contains > a 1TB file, a disk image. The first `btrfs scrub` after writing that file > found 3 logical bad blocks that developed somewhere in the

Force recalculation of a data block checksum

2016-07-23 Thread Tomasz Melcer
Hi, I've got a USB-connected HDD with a btrfs partition. The partition contains a 1TB file, a disk image. The first `btrfs scrub` after writing that file found 3 logical bad blocks that developed somewhere in the middle of that file (logs below). The full area of the btrfs partition can be

Re: Chances to recover with bad partition table?

2016-07-23 Thread Chris Murphy
On Sat, Jul 23, 2016 at 7:46 PM, Chris Murphy wrote: > Something like this: > [root@f24s ~]# dd if=/dev/sda | hexdump -C | egrep '5f 42 48 52 66 53 5f' > 00110040 5f 42 48 52 66 53 5f 4d 8d 4f 04 00 00 00 00 00 |_BHRfS_M.O..| Ha so originally I was planning on

Re: Chances to recover with bad partition table?

2016-07-23 Thread Chris Murphy
On Sat, Jul 23, 2016 at 2:37 AM, Hendrik Friedel wrote: > Hello, > > this morning I had to face an unusual prompt on my machine. > > I found that the partition table of /dev/sda had vanished. > > I restored it with testdisk. It found one partition, but I am quite sure >

Re: qcow2 becomes 37P in size while qemu crashes

2016-07-23 Thread Chris Murphy
Kindof a rudimentary way of making a debug tree smaller, by filtering by inode... [root@f24m images]# btrfs-debug-tree -t 583 /dev/sda5 | grep -A 50 -B 50 994163 > inode994163_39PBfile.txt 381K gzip file https://drive.google.com/open?id=0B_2Asp8DGjJ9Rk1qMG54MUNDWkE But I'm going to rm this file

Re: qcow2 becomes 37P in size while qemu crashes

2016-07-23 Thread Chris Murphy
Using btrfs-debug-tree, I'm finding something a bit odd about some of the items in this 39P file. Seems normal item 71 key (994163 EXTENT_DATA 43689967616) itemoff 12467 itemsize 53 extent data disk byte 617349906432 nr 80805888 extent data offset 0 nr 80805888 ram 80805888

Re: Chances to recover with bad partition table?

2016-07-23 Thread Duncan
Hendrik Friedel posted on Sat, 23 Jul 2016 13:15:50 +0200 as excerpted: > this morning I had to face an unusual prompt on my machine. > > I found that the partition table of /dev/sda had vanished. > > I restored it with testdisk. It found one partition, but I am quite sure > there was a /boot

Re: Btrfs/RAID5 became unmountable after SATA cable fault

2016-07-23 Thread Janos Toth F.
It seems like I accidentally managed to break my Btrfs/RAID5 filesystem, yet again, in a similar fashion. This time around, I ran into some random libata driver issue (?) instead of a faulty hardware part but the end result is quiet similar. I issued the command (replacing X with valid letters

Chances to recover with bad partition table?

2016-07-23 Thread Hendrik Friedel
Hello, this morning I had to face an unusual prompt on my machine. I found that the partition table of /dev/sda had vanished. I restored it with testdisk. It found one partition, but I am quite sure there was a /boot partition in front of that which was not found. Now, running btrfsck

Chances to recover with bad partition table?

2016-07-23 Thread Hendrik Friedel
Hello, this morning I had to face an unusual prompt on my machine. I found that the partition table of /dev/sda had vanished. I restored it with testdisk. It found one partition, but I am quite sure there was a /boot partition in front of that which was not found. Now, running btrfsck