On Sun, Jun 02, 2013 at 05:17:11PM +0100, Tim Eggleston wrote:
> Hi list,
> 
> I have a 4-device RAID10 array of 2TB drives on btrfs. It works
> great. I recently added an additional 4 drives to the array. There
> is only about 2TB in use across the whole array (which should have
> an effective capacity of about 8TB). However I have noticed that
> when I issue btrfs filesystem df against the mountpoint, in the
> "total" field, I get the same value as the "used" field:
> 
> root@mckinley:/# btrfs fi df /mnt/shares/btrfsvol0
> Data, RAID10: total=2.06TB, used=2.06TB
> System, RAID10: total=64.00MB, used=188.00KB
> System: total=4.00MB, used=0.00
> Metadata, RAID10: total=3.00GB, used=2.29GB
> 
> Here's my btrfs filesystem show:
> 
> root@mckinley:/# btrfs fi show
> Label: 'btrfsvol0'  uuid: 1a735971-3ad7-4046-b25b-e834a74f2fbb
>       Total devices 8 FS bytes used 2.06TB
>       devid    7 size 1.82TB used 527.77GB path /dev/sdk1
>       devid    8 size 1.82TB used 527.77GB path /dev/sdg1
>       devid    6 size 1.82TB used 527.77GB path /dev/sdi1
>       devid    5 size 1.82TB used 527.77GB path /dev/sde1
>       devid    4 size 1.82TB used 527.77GB path /dev/sdj1
>       devid    2 size 1.82TB used 527.77GB path /dev/sdf1
>       devid    1 size 1.82TB used 527.77GB path /dev/sdh1
>       devid    3 size 1.82TB used 527.77GB path /dev/sdc1

   You have 8*527.77 GB = 4222.16 GB of raw space allocated for all
purposes. Since RAID-10 takes twice the raw bytes to store data, that
gives you 2111.08 GB of usable space so far.

   From the df output, 2.06 TB ~= 2109.44 GB is allocated as data, and
all of that space is used. 3.00 GB is allocated as metadata, and most
of that is used. That adds up (within rounding errors) to the 2111.08
GB above.

   Additional space will be allocated from the available unallocated
space as the FS needs it.

> This is running the Ubuntu build of kernel 3.9.4 and btrfs-progs
> from git (v0.20-rc1-324-g650e656).
> 
> Am I being an idiot and missing something here? I must admit that I
> still find the df output a bit cryptic (entirely my failure to
> understand, nothing else), but on another system with only a single
> device the "total" field returns the capacity of the device.

   That's probably already fully-allocated, so used=size in btrfs fi
show. If it's a single device, then you're probably not using any
replication, so the raw storage is equal to the possible storage.

   HTH,
   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
            --- I can resist everything except temptation ---            

Attachment: signature.asc
Description: Digital signature

Reply via email to