Re: [PATCH 3/3] btrfs-progs: Add command to check if balance op is req

2016-10-30 Thread Qu Wenruo
On 10/28/2016 11:20 PM, David Sterba wrote: On Wed, Oct 19, 2016 at 10:08:23AM -0700, Divya Indi wrote: On 10/17/2016 06:42 PM, Qu Wenruo wrote: At 10/18/2016 08:35 AM, Divya Indi wrote: Add new subcommand to btrfs inspect-internal btrfs inspect-internal balance_check Checks whether 'btrfs

Btrfs root partition forced readonly during boot

2016-10-30 Thread Thomas Bauffe
Hello! I seem to have run into trouble with btrfs filesystem on my OpenSuse Tumbleweed installation. The root filesystem (sdb3) which is in btrfs is mounted readonly during boot. The filesystem is on a WD hard drive. I did an extended check on the drive using WD's Data Lifeguard Diagnostic tool w

Re: Deletion of snapshots with few changes (and quota enabled) consumes 2GB+ of memory

2016-10-30 Thread Simon Arlott
On 01/10/16 21:44, Simon Arlott wrote: > I've got 32 snapshots in a 21GB subvolume with 3189 directories and > 2077439 files. The 24 hour diff between snapshots is only about 5MB. > The hourly diff between snapshots is about 160-320KB. > > When I start deleting some of the hourly snapshots, the me

btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
I have a filesystem on top of md raid5 that got a few problems due to the underlying block layer (bad data cable). The filesystem mounts fine, but had a few issues Scrub runs (I didn't let it finish, it takes a _long_ time) But check --repair won't even run at all: myth:~# btrfs --version btrfs-pr

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Qu Wenruo
At 10/31/2016 02:34 AM, Marc MERLIN wrote: I have a filesystem on top of md raid5 that got a few problems due to the underlying block layer (bad data cable). The filesystem mounts fine, but had a few issues Scrub runs (I didn't let it finish, it takes a _long_ time) But check --repair won't eve

Re: [PATCH 3/5] writeback: add counters for metadata usage

2016-10-30 Thread Jan Kara
On Tue 25-10-16 14:41:42, Josef Bacik wrote: > Btrfs has no bounds except memory on the amount of dirty memory that we have > in > use for metadata. Historically we have used a special inode so we could take > advantage of the balance_dirty_pages throttling that comes with using > pagecache. > H

Re: [PATCH 2/5] writeback: convert WB_WRITTEN/WB_DIRITED counters to bytes

2016-10-30 Thread Jan Kara
On Tue 25-10-16 14:41:41, Josef Bacik wrote: > diff --git a/mm/page-writeback.c b/mm/page-writeback.c > index 121a6e3..e09b3ad 100644 > --- a/mm/page-writeback.c > +++ b/mm/page-writeback.c > @@ -596,11 +596,11 @@ static void wb_domain_writeout_inc(struct wb_domain > *dom, > * Increment @wb's wr

btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Janos Toth F.
I stopped using Btrfs RAID-5 after encountering this problem two times (once due to a failing SATA cable, once due to a random kernel problem which caused the SATA or the block device driver to reset/crash). As much as I can tell, the main problem is that after a de- and a subsequent re-attach (on

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
On Mon, Oct 31, 2016 at 09:02:50AM +0800, Qu Wenruo wrote: > Your chunk root is corrupted, and since chunk tree provides the > underlying disk layout, even for single device, so if we failed to read > it, then it will never be able to be mounted. That's the thing though, I can mount the filesys

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
On Sun, Oct 30, 2016 at 07:06:16PM -0700, Marc MERLIN wrote: > On Mon, Oct 31, 2016 at 09:02:50AM +0800, Qu Wenruo wrote: > > Your chunk root is corrupted, and since chunk tree provides the > > underlying disk layout, even for single device, so if we failed to read > > it, then it will never be a

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Qu Wenruo
At 10/31/2016 10:06 AM, Marc MERLIN wrote: On Mon, Oct 31, 2016 at 09:02:50AM +0800, Qu Wenruo wrote: Your chunk root is corrupted, and since chunk tree provides the underlying disk layout, even for single device, so if we failed to read it, then it will never be able to be mounted. That's t

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
On Mon, Oct 31, 2016 at 01:27:56PM +0800, Qu Wenruo wrote: > Would you please dump the following bytes? > That's the chunk root tree block on your disk. > > offset: 13500329066496 length: 16384 > offset: 13500330213376 length: 16384 Sorry for asking, am I doing this wrong? myth:~# dd if=/dev/map

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Qu Wenruo
At 10/31/2016 01:47 PM, Marc MERLIN wrote: On Mon, Oct 31, 2016 at 01:27:56PM +0800, Qu Wenruo wrote: Would you please dump the following bytes? That's the chunk root tree block on your disk. offset: 13500329066496 length: 16384 offset: 13500330213376 length: 16384 Sorry for asking, am I do

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
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

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Qu Wenruo
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 re

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-10-30 Thread Marc MERLIN
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 > >>>s