On Thu, Oct 31, 2013 at 10:51:28AM -0400, Frank Holton wrote: > So I just noticed this while running some tests and am not sure if > this is the expected behavior but it doesn't seem right to me. > > If you run a balance on an empty filesystem, it removes all of the > data chunks. Writing files to the fs results in a new data chunk being > allocated of type single completely ignoring what the filesystem was > created with. It's known about, certainly. I'm not sure if anyone's planning on doing anything about it. I thought I'd seen a patch recently that might have done something about it, but I can't see anything obvious in the list archives for the last week or so. I think it's generally considered a minor, if weird, side-effect that few people are likely to hit. > ./btrfs version > Btrfs v0.20-rc1-548-g4597c6d-dirty (newest btrfs-progs-integration) > > Tested on kernels 3.11 and 3.12rc6 > > Results of df after sudo mkfs.btrfs -m raid1 -d raid0 -L test > /dev/loop0 /dev/loop1 > Data, RAID0: total=2.00GiB, used=0.00 > Data, single: total=8.00MiB, used=0.00 > System, RAID1: total=8.00MiB, used=4.00KiB > System, single: total=4.00MiB, used=0.00 > Metadata, RAID1: total=1.00GiB, used=24.00KiB > Metadata, single: total=8.00MiB, used=0.00 > > After sudo btrfs balance start /test/ > System, RAID1: total=32.00MiB, used=4.00KiB > System, single: total=4.00MiB, used=0.00 > Metadata, RAID1: total=256.00MiB, used=24.00KiB > > And after writing new files to the fs > Data, single: total=1.00GiB, used=10.31MiB > System, RAID1: total=32.00MiB, used=4.00KiB > System, single: total=4.00MiB, used=0.00 > Metadata, RAID1: total=256.00MiB, used=40.00KiB > > Now it has reverted to single for data raid type. Also is btrfs.mkfs > supposed to make all of those single chunks? Not sure about "supposed to" -- it certainly has always done so. It's an artefact of the way that mkfs works, I think -- as I understand it, it creates a really basic FS structure with minimal metadata in it, and lets the kernel fill in the rest on the first mount. They're generally small and harmless, and go away after the first balance. 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 --- "You got very nice eyes, Deedee. Never noticed them --- before. They real?"
Attachment:
signature.asc
Description: Digital signature
