You are not logged in.

#1 2015-08-16 08:43:29

lynix
Member
From: Karlsruhe, Germany
Registered: 2008-04-23
Posts: 230

[solved] BTRFS: volume full despite 5 TB of unallocated space

In my self-built NAS I have a BTRFS volume consisting of four LUKS-encrypted disks:

NAME               MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda                  8:0    0  4.6T  0 disk  
└─sda1               8:1    0  4.6T  0 part  
  └─archive4-plain 254:7    0  4.6T  0 crypt 
sdb                  8:16   0  4.6T  0 disk  
└─sdb1               8:17   0  4.6T  0 part  
  └─archive3-plain 254:4    0  4.6T  0 crypt 
sdc                  8:32   0  1.8T  0 disk  
└─sdc1               8:33   0  1.8T  0 part  
  └─archive2-plain 254:5    0  1.8T  0 crypt 
sdd                  8:48   0  1.8T  0 disk  
└─sdd1               8:49   0  1.8T  0 part  
  └─archive1-plain 254:6    0  1.8T  0 crypt /mnt/archive

The BTRFS volume is configured in RAID1 mode, so with these two 5 TB and two 2 TB disks I should have around 7 TB of usable space (confirmed by the online calculator).

The problem is that the filesystems on the 5 TB volumes seems to occupy only 2 TB:

[lynix@nas ~]$ sudo btrfs fi show /mnt/archive
Label: 'archive'  uuid: 3818eedb-5379-4c40-9d3d-bd91f60d9094
	Total devices 4 FS bytes used 3.45TiB
	devid    1 size 1.82TiB used 1.61TiB path /dev/mapper/archive1-plain
	devid    2 size 1.82TiB used 1.61TiB path /dev/mapper/archive2-plain
	devid    4 size 2.00TiB used 1.84TiB path /dev/mapper/archive4-plain
	devid    5 size 2.00TiB used 1.84TiB path /dev/mapper/archive3-plain

Yesterday the volume ran full, and even after a (very long) balancing run there is lots of space reported to be unallocated:

[lynix@nas ~]$ sudo btrfs fi usage -T /mnt/archive
Overall:
    Device size:		   7.64TiB
    Device allocated:		   6.90TiB
    Device unallocated:		 753.96GiB
    Device missing:		     0.00B
    Used:			   6.90TiB
    Free (estimated):		 377.96GiB	(min: 377.96GiB)
    Data ratio:			      2.00
    Metadata ratio:		      2.00
    Global reserve:		 512.00MiB	(used: 5.54MiB)

                                     Data    Metadata System               
                           single    RAID1   RAID1    RAID1     Unallocated
                                                                           
/dev/dm-4                          - 1.84TiB  3.00GiB  32.00MiB     2.71TiB
/dev/dm-5                          - 1.61TiB  3.00GiB         -   215.01GiB
/dev/dm-7                          - 1.84TiB  3.00GiB  32.00MiB     2.71TiB
/dev/mapper/archive1-plain         - 1.61TiB  3.00GiB         -   215.01GiB
                           ========= ======= ======== ========= ===========
Total                      512.00MiB 3.45TiB  6.00GiB  32.00MiB     5.83TiB
Used                         5.54MiB 3.44TiB  4.37GiB 548.00KiB

How can I claim these 5.83TiB of unallocated space?

Last edited by lynix (2015-08-16 08:50:38)

Offline

#2 2015-08-16 08:50:20

lynix
Member
From: Karlsruhe, Germany
Registered: 2008-04-23
Posts: 230

Re: [solved] BTRFS: volume full despite 5 TB of unallocated space

Shame on me, found the solution:

$ btrfs fi resize 4:max /mnt/archive
$ btrfs fi resize 5:max /mnt/archive

I had issued this before, but without the devid parameters. Just read that this defaults to 1 rather than to resize all devices hmm

Offline

Board footer

Powered by FluxBB