On Thu, May 5, 2011 at 3:40 PM, <cac...@quantum-sci.com> wrote: > On Thursday 5 May, 2011 13:40:25 cwillu wrote: >> Could you include the information I asked for previously? (Kernel >> version, output of btrfs fi df and btrfs fi show) > > Kernel 2.6.37-2 > # btrfs fi df /home > Data, RAID0: total=2.61TB, used=2.47TB > Data: total=8.00MB, used=8.00MB > System, RAID1: total=8.00MB, used=196.00KB > System: total=4.00MB, used=0.00 > Metadata, RAID1: total=6.88GB, used=4.64GB > Metadata: total=8.00MB, used=0.00 > # df /dev/sdb > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/sdb 3907029168 2659716272 1242565920 69% /home > # df /dev/sdc > Filesystem 1K-blocks Used Available Use% Mounted on > udev 1895384 268 1895116 1% /dev > (this doesn't make any sense) > # btrfs fi show > failed to read /dev/sdg > failed to read /dev/sdf > failed to read /dev/sde > failed to read /dev/sdd > failed to read /dev/sr0 > Label: none uuid: 85537aa8-30dc-4f87-ac55-6c8344304184 > Total devices 2 FS bytes used 2.47TB > devid 1 size 1.82TB used 1.31TB path /dev/sdb > devid 2 size 1.82TB used 1.31TB path /dev/sdc > Btrfs Btrfs v0.19 > > >> Defrag is not the same as balancing, and neither is quite the same as >> the balancing of the internal b-trees that make up the filesystem. > > I know they're not the same. But I am asking: > > I thought balancing was supposed to be automatic in BTRFS? > > Is defrag not automatic?
Fair enough. Btrfs works mostly like ext in this sense: the way it reads and writes data generally avoids fragmentation. There are some issues in this area still, but they're not the cause of no-space problems typically, rather they tend to cause performance loss. A "balance" operation is more about balancing the space use of the large allocations btrfs makes from its pool of free disk-space to one of the block groups that holds data or metadata. "mkdir" failing while you still have lots of disk space free would typically mean something along the lines of: all the free disk space has been allocated to either the metadata or data block groups, and the metadata block groups are full. This sort of behaviour has mostly gone away in the last couple releases, although it would take a balance operation (as you performed) to get everything working right. How old was the filesystem? It might just have been lingering problems from an older kernel, which would be cleared up entirely by the balance you just ran. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html