Re: btrfs filesystem show takes a long time

2018-09-20 Thread Stefan K
Hi,

> You may try to run the show command under strace to see where it blocks.
any recommendations for strace options?


On Friday, September 14, 2018 1:25:30 PM CEST David Sterba wrote:
> Hi,
> 
> thanks for the report, I've forwarded it to the issue tracker
> https://github.com/kdave/btrfs-progs/issues/148
> 
> The show command uses the information provided by blkid, that presumably
> caches that. The default behaviour of 'fi show' is to skip mount checks,
> so the delays are likely caused by blkid, but that's not the only
> possible reason.
> 
> You may try to run the show command under strace to see where it blocks.
> 



Re: btrfs problems

2018-09-17 Thread Stefan K
> If your primary concern is to make the fs as stable as possible, then
> keep snapshots to a minimal amount, avoid any functionality you won't
> use, like qgroup, routinely balance, RAID5/6.
> 
> And keep the necessary btrfs specific operations to minimal, like
> subvolume/snapshot (and don't keep too many snapshots, say over 20),
> shrink, send/receive.

hehe, that sound like "hey use btrfs, its cool, but please - don't use any 
btrfs specific feature" ;)

best
Stefan


btrfs filesystem show takes a long time

2018-09-14 Thread Stefan K
Dear Maintainer,

the command btrfs fi show takes too much time:

time btrfs fi show  
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid2 size 927.79GiB used 4.03GiB path /dev/sdar2

real12m59.763s
user0m0.008s
sys 0m0.044s


time btrfs fi show
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid2 size 927.79GiB used 4.03GiB path /dev/sdar2

real6m22.498s
user0m0.012s
sys 0m0.024s


time btrfs fi show
Label: none  uuid: 513dc574-e8bc-4336-b181-00d1e9782c1c
Total devices 2 FS bytes used 2.34GiB
devid1 size 927.79GiB used 4.03GiB path /dev/sdv2
devid2 size 927.79GiB used 4.03GiB path /dev/sdar2

real6m19.796s
user0m0.012s
sys 0m0.024s


Maybe its related to that I've some harddisk in my system:
ls /dev/disk/by-path/ |grep -v part |wc -l
44

This is also a known Debian Bug #891717

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-5-amd64 (SMP w/20 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages btrfs-progs depends on:
ii  e2fslibs1.43.4-2
ii  libblkid1   2.29.2-1
ii  libc6   2.24-11+deb9u1
ii  libcomerr2  1.43.4-2
ii  liblzo2-2   2.08-1.2+b2
ii  libuuid12.29.2-1
ii  zlib1g  1:1.2.8.dfsg-5


Re: List of known BTRFS Raid 5/6 Bugs?

2018-09-11 Thread Stefan K
wow, holy shit, thanks for this extended answer!

> The first thing to point out here again is that it's not btrfs-specific.  
so that mean that every RAID implemantation (with parity) has such Bug? I'm 
looking a bit, it looks like that ZFS doesn't have a write hole. And it _only_ 
happens when the server has a ungraceful shutdown, caused by poweroutage? So 
that mean if I running btrfs raid5/6 and I've no poweroutages I've no problems?

>  it's possible to specify data as raid5/6 and metadata as raid1
does some have this in production? ZFS btw have 2 copies of metadata by 
default, maybe it would also be an option or btrfs?
in this case you think 'btrfs fi balance start -mconvert=raid1 -dconvert=raid5 
/path ' is safe at the moment?

> That means small files and modifications to existing files, the ends of large 
> files, and much of the 
> metadata, will be written twice, first to the log, then to the final 
> location. 
that sounds that the performance will go down? So far as I can see btrfs can't 
beat ext4 or btrfs nor zfs and then they will made it even slower?

thanks in advanced!

best regards
Stefan



On Saturday, September 8, 2018 8:40:50 AM CEST Duncan wrote:
> Stefan K posted on Fri, 07 Sep 2018 15:58:36 +0200 as excerpted:
> 
> > sorry for disturb this discussion,
> > 
> > are there any plans/dates to fix the raid5/6 issue? Is somebody working
> > on this issue? Cause this is for me one of the most important things for
> > a fileserver, with a raid1 config I loose to much diskspace.
> 
> There's a more technically complete discussion of this in at least two 
> earlier threads you can find on the list archive, if you're interested, 
> but here's the basics (well, extended basics...) from a btrfs-using-
> sysadmin perspective.
> 
> "The raid5/6 issue" can refer to at least three conceptually separate 
> issues, with different states of solution maturity:
> 
> 1) Now generally historic bugs in btrfs scrub, etc, that are fixed (thus 
> the historic) in current kernels and tools.  Unfortunately these will 
> still affect for some time many users of longer-term stale^H^Hble distros 
> who don't update using other sources for some time, as because the raid56 
> feature wasn't yet stable at the lock-in time for whatever versions they 
> stabilized on, they're not likely to get the fixes as it's new-feature 
> material.
> 
> If you're using a current kernel and tools, however, this issue is 
> fixed.  You can look on the wiki for the specific versions, but with the 
> 4.18 kernel current latest stable, it or 4.17, and similar tools versions 
> since the version numbers are synced, are the two latest release series, 
> with the two latest release series being best supported and considered 
> "current" on this list.
> 
> Also see...
> 
> 2) General feature maturity:  While raid56 mode should be /reasonably/ 
> stable now, it remains one of the newer features and simply hasn't yet 
> had the testing of time that tends to flush out the smaller and corner-
> case bugs, that more mature features such as raid1 have now had the 
> benefit of.
> 
> There's nothing to do for this but test, report any bugs you find, and 
> wait for the maturity that time brings.
> 
> Of course this is one of several reasons we so strongly emphasize and 
> recommend "current" on this list, because even for reasonably stable and 
> mature features such as raid1, btrfs itself remains new enough that they 
> still occasionally get latent bugs found and fixed, and while /some/ of 
> those fixes get backported to LTS kernels (with even less chance for 
> distros to backport tools fixes), not all of them do and even when they 
> do, current still gets the fixes first.
> 
> 3) The remaining issue is the infamous parity-raid write-hole that 
> affects all parity-raid implementations (not just btrfs) unless they take 
> specific steps to work around the issue.
> 
> The first thing to point out here again is that it's not btrfs-specific.  
> Between that and the fact that it *ONLY* affects parity-raid operating in 
> degraded mode *WITH* an ungraceful-shutdown recovery situation, it could 
> be argued not to be a btrfs issue at all, but rather one inherent to 
> parity-raid mode and considered an acceptable risk to those choosing 
> parity-raid because it's only a factor when operating degraded, if an 
> ungraceful shutdown does occur.
> 
> But btrfs' COW nature along with a couple technical implementation 
> factors (the read-modify-write cycle for incomplete stripe widths and how 
> that risks existing metadata when new metadata is written) does amplify 
> the risk somewhat compared to that seen with the same write-hole issue in 
> various other parity-raid implementations 

Re: List of known BTRFS Raid 5/6 Bugs?

2018-09-07 Thread Stefan K
sorry for disturb this discussion,

are there any plans/dates to fix the raid5/6 issue? Is somebody working on this 
issue? Cause this is for me one of the most important things for a fileserver, 
with a raid1 config I loose to much diskspace.

best regards
Stefan