Re: raid1 has failing disks, but smart is clear

2016-07-07 Thread Corey Coughlin
Hi Duncan, Thanks for the info! I've seen that done in the fstab, but it didn't work for me the last time I tried it on the command line. Worth a shot! -- Corey On 07/07/2016 06:24 PM, Duncan wrote: Corey Coughlin posted on Wed, 06 Jul 2016 23:40:30 -0700 as excerpted: Well

Re: raid1 has failing disks, but smart is clear

2016-07-07 Thread Corey Coughlin
Hi Austin, Thanks for the reply! I'll go inline for more: On 07/07/2016 04:58 AM, Austin S. Hemmelgarn wrote: On 2016-07-06 18:59, Tomasz Kusmierz wrote: On 6 Jul 2016, at 23:14, Corey Coughlin wrote: Hi all, Hoping you all can help, have a strange

kdave/for-next commit 26112f7f472

2016-07-07 Thread Jeff Mahoney
Hi Dave - This commit introduces a bug. I ran across it when running xfstests against my own integrated branch. The problem is that btrfs_calc_reclaim_metadata_size didn't used to be called from recovery, so it was safe to use fs_info->fs_root. With commit 7c83c6a09 (Btrfs: don't bother

Re: [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers

2016-07-07 Thread Jeff Mahoney
On 7/7/16 9:48 PM, Jeff Mahoney wrote: > On 6/24/16 6:14 PM, je...@suse.com wrote: >> From: Jeff Mahoney >> >> One of the common complaints I've heard from new and experienced >> developers alike about the btrfs code is the ubiquity of >> struct btrfs_root. There is one for every

Re: [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers

2016-07-07 Thread Jeff Mahoney
On 6/24/16 6:14 PM, je...@suse.com wrote: > From: Jeff Mahoney > > One of the common complaints I've heard from new and experienced > developers alike about the btrfs code is the ubiquity of > struct btrfs_root. There is one for every tree on disk and it's not > always obvious

Re: [PATCH 05/31] btrfs: tests, require fs_info for root

2016-07-07 Thread Jeff Mahoney
On 6/24/16 6:14 PM, je...@suse.com wrote: > From: Jeff Mahoney > > This allows the upcoming patchset to push nodesize and sectorsize into > fs_info. > > Signed-off-by: Jeff Mahoney > --- > fs/btrfs/ctree.h | 1 + > fs/btrfs/disk-io.c

Re: raid1 has failing disks, but smart is clear

2016-07-07 Thread Duncan
Corey Coughlin posted on Wed, 06 Jul 2016 23:40:30 -0700 as excerpted: > Well yeah, if I was mounting all the disks to different mount points, I > would definitely use UUIDs to get them mounted. But I haven't seen any > way to set up a "mkfs.btrfs" command to use UUID or anything else for >

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 4:38 PM, Andrew E. Mileski wrote: > On 2016-07-07 17:13, Francesco Turco wrote: >> >> >> On 2016-07-07 23:11, Andrew E. Mileski wrote: >>> >>> How large is this USB flash device? >> >> >> 64 GB. >> > > I don't know if there is an official recommended

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Andrew E. Mileski
On 2016-07-07 17:13, Francesco Turco wrote: On 2016-07-07 23:11, Andrew E. Mileski wrote: How large is this USB flash device? 64 GB. I don't know if there is an official recommended minimum size for btrfs, but I would expect 64 GB to be okay. I've personally set my minimum

Re: btrfs module does not load on sparc64

2016-07-07 Thread alexmcwhirter
On 2016-07-07 10:29, Anatoly Pugachev wrote: Hi! Compiled linux kernel (git version 4.7.0-rc6+) using my own kernel config file, enabling : CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y CONFIG_BTRFS_DEBUG=y CONFIG_BTRFS_ASSERT=y and now I can't load btrfs module: # modprobe btrfs modprobe: ERROR: could

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Andrew E. Mileski
On 2016-07-07 09:49, Francesco Turco wrote: I have a USB flash drive with an encrypted Btrfs filesystem where I store daily backups. My problem is that this btrfs filesystem gets corrupted very often, after a few days of usage. Usually I just reformat it and move along, but this time I'd like to

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Francesco Turco
On 2016-07-07 23:11, Andrew E. Mileski wrote: > How large is this USB flash device? 64 GB. -- Website: http://www.fturco.net/ GPG key: 6712 2364 B2FE 30E1 4791 EB82 7BB1 1F53 29DE CD34 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 1:59 PM, Austin S. Hemmelgarn wrote: > D-Bus support needs to be optional, period. Not everybody uses D-Bus (I > have dozens of systems that get by just fine without it, and know hundreds > of other people who do as well), and even people who do

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-07 20:58, Chris Murphy wrote: > I get all kinds of damn strange behaviors in GNOME > with Btrfs multiple device volumes: volume names appearing twice in > the UI, unmounting one causes umount errors with the other. > https://fedoraproject.org/wiki/Changes/Replace_UDisks2_by_Storaged >

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Austin S. Hemmelgarn
On 2016-07-07 14:58, Chris Murphy wrote: On Thu, Jul 7, 2016 at 12:23 PM, Austin S. Hemmelgarn wrote: Here's how I would picture the ideal situation: * A device is processed by udev. It detects that it's part of a BTRFS array, updates blkid and whatever else in

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-07 20:23, Austin S. Hemmelgarn wrote: [...] > FWIW, I've pretty much always been of the opinion that the device discovery > belongs in a mount helper. The auto-discovery from udev (and more > importantly, how the kernel handles being told about a device) is much of the > reason that

Re: A lot warnings in dmesg while running thunderbird

2016-07-07 Thread Chris Mason
On 07/07/2016 06:24 AM, Gabriel C wrote: Hi, while running thunderbird on linux 4.6.3 and 4.7.0-rc6 ( didn't tested other versions ) I trigger the following : I definitely thought we had this fixed in v4.7-rc. Can you easily fsck this filesystem? Something strange is going on. -chris

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Chris Murphy
More Btrfs udev issues, they involve making btrfs multiple device volumes via 'btrfs dev add' which then causes problems at boot time. https://bugzilla.opensuse.org/show_bug.cgi?id=912170 https://bugzilla.suse.com/show_bug.cgi?id=984516 The last part is amusing in that the proposed fix is going

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 12:23 PM, Austin S. Hemmelgarn wrote: > > Here's how I would picture the ideal situation: > * A device is processed by udev. It detects that it's part of a BTRFS > array, updates blkid and whatever else in userspace with this info, and then > stops

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Francesco Turco
On 2016-07-07 20:25, Chris Murphy wrote: > On Thu, Jul 7, 2016 at 8:55 AM, Francesco Turco wrote: >> Perhaps I >> should try to rule out an hardware problem by filling my USB flash drive >> with a large random file and then checking if its SHA-1 checksum >> corresponds to the

Re: rollback to a snapshot and delete old top volume - missing of "@"

2016-07-07 Thread Henk Slager
On Thu, Jul 7, 2016 at 7:40 PM, Chris Murphy wrote: > On Thu, Jul 7, 2016 at 10:01 AM, Henk Slager wrote: > >> What the latest debian likes as naming convention I dont know, but in >> openSuSE @ is a directory in the toplevel volume (ID=5 or ID=0 as >>

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 8:55 AM, Francesco Turco wrote: > I'm not sure. Commands don't fail explicitely when I use ext4, but I > agree with you that I may get corruption silently nonetheless. Use XFS v5 format which is the default in xfsprogs 3.2.3 and later. It at least

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Austin S. Hemmelgarn
On 2016-07-07 12:52, Goffredo Baroncelli wrote: On 2016-07-06 14:48, Austin S. Hemmelgarn wrote: On 2016-07-06 08:39, Andrei Borzenkov wrote: [] To be entirely honest, if it were me, I'd want systemd to fsck off. If the kernel mount(2) call succeeds, then the filesystem was ready enough

errors with linux-next-20160701

2016-07-07 Thread Laszlo Fiat
I have a simple btrfs filesystem on a single device. It worked well so far. Recently I compiled a new kernel linux-next-20160701, with this new kernel I get warnings and errors in the logs. But btrfs scrub completes with 0 errors, and if I boot back to the older linux-next-20160527 kernel, there

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 7:49 AM, Francesco Turco wrote: > $ btrfs filesystem show > /run/media/fturco/5283147c-b7b4-448f-97b0-b235344a56a3 > $ Try it with sudo. I think it's a bug that 'btrfs fi show' returns silently for non-root. It should produce an error that root

Re: rollback to a snapshot and delete old top volume - missing of "@"

2016-07-07 Thread Chris Murphy
On Thu, Jul 7, 2016 at 10:01 AM, Henk Slager wrote: > What the latest debian likes as naming convention I dont know, but in > openSuSE @ is a directory in the toplevel volume (ID=5 or ID=0 as > alias) and that directory contains subvolumes. No, opensuse doesn't use @ at all.

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-06 20:57, Chris Murphy wrote: [...] > > Seems like we need more granularity by btrfs ioctl for device ready, > e.g. some way to indicate: > > 0 all devices ready > 1 devices not ready (don't even try to mount) > 2 minimum devices ready (degraded mount possible) > > > Btrfs multiple

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-06 22:00, Chris Murphy wrote: > On Wed, Jul 6, 2016 at 1:17 PM, Austin S. Hemmelgarn > wrote: > >> In bash or most other POSIX compliant shells, you can run this: >> echo $? >> to get the return code of the previous command. >> >> In your case though, it may be

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-06 14:48, Austin S. Hemmelgarn wrote: > On 2016-07-06 08:39, Andrei Borzenkov wrote: [] > > To be entirely honest, if it were me, I'd want systemd to > fsck off. If the kernel mount(2) call succeeds, then the > filesystem was ready enough to mount, and if it

Re: 64-btrfs.rules and degraded boot

2016-07-07 Thread Goffredo Baroncelli
On 2016-07-05 20:53, Chris Murphy wrote: > I am kinda confused about this "btrfs ready $devnode" portion. Isn't > it "btrfs device ready $devnode" if this is based on user space tools? systemd, implemented this as internal command -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint

Re: Out of space error even though there's 100 GB unused?

2016-07-07 Thread Henk Slager
On Thu, Jul 7, 2016 at 5:17 PM, Stanislaw Kaminski wrote: > Hi Chris, Alex, Hugo, > > Running now: Linux archb3 4.6.2-1-ARCH #1 PREEMPT Mon Jun 13 02:11:34 > MDT 2016 armv5tel GNU/Linux > > Seems to be working fine. I started a defrag, and it seems I'm getting > my space

Re: fstrim problem/bug

2016-07-07 Thread Henk Slager
On Thu, Jul 7, 2016 at 11:46 AM, M G Berberich wrote: > Hello, > > On a filesystem with 40 G free space and 54 G used, ‘fstrim -v’ gave > this result: > > # fstrim -v / > /: 0 B (0 bytes) trimmed > > After running balance it gave a more sensible > > # fstrim

Re: rollback to a snapshot and delete old top volume - missing of "@"

2016-07-07 Thread Henk Slager
On Thu, Jul 7, 2016 at 2:17 PM, Kai Herlemann wrote: > Hi, > > I want to rollback a snapshot and have done this by execute "btrfs sub > set-default / 618". maybe just a typo here, command syntax is: # sudo btrfs sub set-default btrfs subvolume set-default: too few arguments

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Austin S. Hemmelgarn
On 2016-07-07 10:55, Francesco Turco wrote: On 2016-07-07 16:27, Austin S. Hemmelgarn wrote: This seems odd, are you trying to access anything over NFS or some other network filesystem protocol here? If not, then I believe you've found a bug, because I'm pretty certain we shouldn't be

Re: Out of space error even though there's 100 GB unused?

2016-07-07 Thread Stanislaw Kaminski
Hi Chris, Alex, Hugo, Running now: Linux archb3 4.6.2-1-ARCH #1 PREEMPT Mon Jun 13 02:11:34 MDT 2016 armv5tel GNU/Linux Seems to be working fine. I started a defrag, and it seems I'm getting my space back: $ sudo btrfs fi usage /home Overall: Device size: 1.81TiB Device

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Francesco Turco
On 2016-07-07 16:27, Austin S. Hemmelgarn wrote: > This seems odd, are you trying to access anything over NFS or some other > network filesystem protocol here? If not, then I believe you've found a > bug, because I'm pretty certain we shouldn't be returning -ESTALE for > anything. No, I don't

btrfs module does not load on sparc64

2016-07-07 Thread Anatoly Pugachev
Hi! Compiled linux kernel (git version 4.7.0-rc6+) using my own kernel config file, enabling : CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y CONFIG_BTRFS_DEBUG=y CONFIG_BTRFS_ASSERT=y and now I can't load btrfs module: # modprobe btrfs modprobe: ERROR: could not insert 'btrfs': Invalid argument and in

Re: Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Austin S. Hemmelgarn
On 2016-07-07 09:49, Francesco Turco wrote: I have a USB flash drive with an encrypted Btrfs filesystem where I store daily backups. My problem is that this btrfs filesystem gets corrupted very often, after a few days of usage. Usually I just reformat it and move along, but this time I'd like to

Re: [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers

2016-07-07 Thread David Sterba
On Fri, Jun 24, 2016 at 06:14:53PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > One of the common complaints I've heard from new and experienced > developers alike about the btrfs code is the ubiquity of > struct btrfs_root. There is one for every tree on disk and it's

Frequent btrfs corruption on a USB flash drive

2016-07-07 Thread Francesco Turco
I have a USB flash drive with an encrypted Btrfs filesystem where I store daily backups. My problem is that this btrfs filesystem gets corrupted very often, after a few days of usage. Usually I just reformat it and move along, but this time I'd like to understand the root cause of the problem and

Re: [PATCH 1/2] btrfs: fix fsfreeze hang caused by delayed iputs deal

2016-07-07 Thread David Sterba
On Wed, Jul 06, 2016 at 06:20:40PM +0800, Wang Xiaoguang wrote: > > There's opencoding an existing wrapper sb_start_write, please use it > > instead. > OK, I can submit a new version using this wrapper. > Also could you please have a look at my reply to Filipe Manana in > last mail? I suggest

rollback to a snapshot and delete old top volume - missing of "@"

2016-07-07 Thread Kai Herlemann
Hi, I want to rollback a snapshot and have done this by execute "btrfs sub set-default / 618". Now I want to delete the old top volume to save space, but google and manuals didn't helped. I mounted for the following the root volume at /mnt/gparted with subvolid=0, subvol=/ has the same

Re: Unable to mount degraded RAID5

2016-07-07 Thread Gonzalo Gomez-Arrue Azpiazu
Thanks a lot, your will to help out someone you do not know (and who is obviously way over his depth) is inspiring. This is what it says: btrfs rescue super-recover -v /dev/sdc1 All Devices: Device: id = 3, name = /dev/sdd1 Device: id = 1, name = /dev/sdc1 Before Recovering: [All good supers]:

Re: [PATCH v2] Btrfs: error out if generic_bin_search get invalid arguments

2016-07-07 Thread David Sterba
On Thu, Jun 23, 2016 at 04:32:45PM -0700, Liu Bo wrote: > With btrfs-corrupt-block, one can set btree node/leaf's field, if > we assign a negative value to node/leaf, we can get various hangs, > eg. if extent_root's nritems is -2ULL, then we get stuck in > btrfs_read_block_groups() because it has

Re: [PATCH v2] Btrfs: fix read_node_slot to return errors

2016-07-07 Thread David Sterba
On Tue, Jul 05, 2016 at 12:10:14PM -0700, Liu Bo wrote: > We use read_node_slot() to read btree node and it has two cases, > a) slot is out of range, which means 'no such entry' > b) we fail to read the block, due to checksum fails or corrupted >content or not with uptodate flag. > But we're

Re: [PATCH] Btrfs: cleanup BUG_ON in merge_bio

2016-07-07 Thread David Sterba
On Wed, Jun 22, 2016 at 06:31:49PM -0700, Liu Bo wrote: > One can use btrfs-corrupt-block to hit BUG_ON() in merge_bio(), > thus this aims to stop anyone to panic the whole system by using > their btrfs. > > Since the error in merge_bio can only come from __btrfs_map_block() > when chunk tree

Re: raid1 has failing disks, but smart is clear

2016-07-07 Thread Austin S. Hemmelgarn
On 2016-07-06 18:59, Tomasz Kusmierz wrote: On 6 Jul 2016, at 23:14, Corey Coughlin wrote: Hi all, Hoping you all can help, have a strange problem, think I know what's going on, but could use some verification. I set up a raid1 type btrfs filesystem on an

[PATCH v2] btrfs-progs: du: fix to skip not btrfs dir/file

2016-07-07 Thread Wang Shilong
'btrfs file du' is a very useful tool to watch my system file usage information with snapshot aware. when trying to run following commands: [root@localhost btrfs-progs]# btrfs file du / Total Exclusive Set shared Filename ERROR: Failed to lookup root id - Inappropriate ioctl for device

Re: Out of space error even though there's 100 GB unused?

2016-07-07 Thread Stanislaw Kaminski
Too early report, the issue is back. Back to testing 2016-07-07 12:18 GMT+02:00 Stanislaw Kaminski : > Hi all, > I downgraded to 4.4.1-1 - all fine, 4.5.5.-1 - also fine, then got > back to 4.6.3-2 - and it's still fine. Apparently running under > different kernel

A lot warnings in dmesg while running thunderbird

2016-07-07 Thread Gabriel C
Hi, while running thunderbird on linux 4.6.3 and 4.7.0-rc6 ( didn't tested other versions ) I trigger the following : [ 6393.305675] WARNING: CPU: 6 PID: 5870 at fs/btrfs/inode.c:9306 btrfs_destroy_inode+0x22e/0x2a0 [btrfs] [ 6393.305677] Modules linked in: fuse ufs qnx4 hfsplus hfs minix ntfs

Re: [PATCH] btrfs: Fix slab accounting flags

2016-07-07 Thread David Sterba
On Thu, Jun 23, 2016 at 09:17:08PM +0300, Nikolay Borisov wrote: > BTRFS is using a variety of slab caches to satisfy internal needs. > Those slab caches are always allocated with the SLAB_RECLAIM_ACCOUNT, > meaning allocations from the caches are going to be accounted as > SReclaimable. At the

Re: Out of space error even though there's 100 GB unused?

2016-07-07 Thread Stanislaw Kaminski
Hi all, I downgraded to 4.4.1-1 - all fine, 4.5.5.-1 - also fine, then got back to 4.6.3-2 - and it's still fine. Apparently running under different kernel somehow fixed the glitch (as far as I can test...). That leaves me with the other question: before issues, I 1.6 TiB was used, now all the

fstrim problem/bug

2016-07-07 Thread M G Berberich
Hello, On a filesystem with 40 G free space and 54 G used, ‘fstrim -v’ gave this result: # fstrim -v / /: 0 B (0 bytes) trimmed After running balance it gave a more sensible # fstrim -v / /: 37.3 GiB (40007368704 bytes) trimmed As far as I understand, fstrim should report any

Re: [Bug-tar] stat() on btrfs reports the st_blocks with delay (data loss in archivers)

2016-07-07 Thread Pavel Raiskup
On Monday, July 4, 2016 1:35:25 PM CEST Andreas Dilger wrote: > I think in addition to fixing btrfs (because it needs to work with existing > tar/rsync/etc. tools) it makes sense to *also* fix the heuristics of tar to > handle this situation more robustly. What I was rather thinking about is to

Re: raid1 has failing disks, but smart is clear

2016-07-07 Thread Corey Coughlin
Hi Tomasz, Thanks for the response! I should clear some things up, though. On 07/06/2016 03:59 PM, Tomasz Kusmierz wrote: On 6 Jul 2016, at 23:14, Corey Coughlin wrote: Hi all, Hoping you all can help, have a strange problem, think I know what's going