Thanks Hugo, that makes sense, and maybe leads to a possible way to fix the issue in future versions of btrfs-convert or a way to handle it in the balance code.
What I did to find files with extents:
cd /mymedia
find . -type f -print0 | xargs -0 filefrag | grep -v 1\ extent | grep -v 0\ extent | awk -F: '{print $1}' > /tmp/extent
cat /tmp/extent | while read file; do mv -v "$file" /dev/shm; f2=`basename "$file"`; mv -v "/dev/shm/$f2" "$file"; done
I no longer care that even after doing this I still have a file with multiple extents, I just don't want them inside those block groups with >1GB extents. (BTW my terminology may be all off here, I just know that in my syslog btrfs tries to relocate two particular "block groups" and gets 2 enospc errors for them.)
But since I'm still getting the errors the files I care about probably aren't in this list so I'll do it for all the files on the system (since I can't find out what files are in those block groups).
-----Original Message-----
From: Hugo Mills [mailto:hugo@xxxxxxxxxxxxx]
Sent: Friday, March 07, 2014 3:02 AM
To: Mike Russo
Cc: linux-btrfs@xxxxxxxxxxxxxxx
Subject: Re: ENOSPC errors during raid1 rebalance
The defrag operation, by its nature, _doesn't_ preserve extents, and thus can act to break up the large extents, making it possible to balance the chunks that the offending extents live on.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- If the first-ever performance is the première, is the ---
last-ever performance the derrière?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html