linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Resize a btrfs File System : no enough free space... why ?!?
@ 2016-10-01  8:42 Nicolas Pujol
  2016-10-01 11:04 ` Duncan
  2016-10-01 19:57 ` Chris Murphy
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Pujol @ 2016-10-01  8:42 UTC (permalink / raw)
  To: linux-btrfs

Dears,

I added a news disk to my RAID5 array so I now have 4 * 2Tio disks,
with an +/-6Tio available capacity. On the RAID I have only one LVM
volume to manage all this space :
$ lvdisplay
  --- Logical volume ---
  LV Path                /dev/VG1/Vol3
  LV Name                Vol3
  VG Name                VG1
  LV UUID                dEGmTz-Fj0Z-qbOf-xn67-D5D8-5BNY-EwCsoF
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 1
  LV Size                5,46 TiB
  Current LE             1430795
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

After increased the RAID, then the LVM, I resize the BTRFS :
$ btrfs filesystem resize 1:max /mnt/RAID

Now I have 5,5T available:
# df -h /mnt/RAID
Sys. de fichiers     Taille Utilisé Dispo Uti% Monté sur
/dev/mapper/VG1-Vol3   5,5T    3,5T  1,9T  66% /mnt/RAID

# btrfs fi show
Label: none  uuid: 8dbd4ab0-e3d9-417d-b69b-dfdb51475e7e
    Total devices 1 FS bytes used 43.70GiB
    devid    1 size 100.00GiB used 79.04GiB path /dev/sdc3

Label: none  uuid: b8fd880f-fa7f-4f8b-bf40-1619e4931207
    Total devices 1 FS bytes used 3.46TiB
    devid    1 size 5.46TiB used 3.61TiB path /dev/mapper/VG1-Vol3

# btrfs fi df /mnt/RAID
Data, single: total=3.48TiB, used=3.46TiB
System, DUP: total=8.00MiB, used=416.00KiB
System, single: total=4.00MiB, used=0.00B
Metadata, DUP: total=69.62GiB, used=5.86GiB
Metadata, single: total=8.00MiB, used=0.00B
GlobalReserve, single: total=512.00MiB, used=0.00B

Unfortunately, I want to change the RAID chunk size because it is only
4K so I have to update the size of BTRFS before. Now, array size is
5860537608 so I want to reduce to 5860537344k :
$ btrfs filesystem resize 1:5860537344k /mnt/RAID
Resize '/mnt/RAID' of '1:5860537344k'
ERROR: unable to resize '/mnt/RAID': no enough free space

I tried severals tips but without any success:
# btrfs balance start -v -dusage=0 /mnt/RAID
# btrfs balance start -v -dusage=5 /mnt/RAID
# btrfs filesystem defragment /mnt/RAID

Like I don't understand the error, do you know why I can not resize
the BTRFS partition while 2TB are free?

For information:
# uname -a
Linux PC-NPL 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016
x86_64 GNU/Linux

# btrfs --version
btrfs-progs v4.6.1

# mdadm --detail /dev/md127
/dev/md127:
        Version : 1.2
  Creation Time : Thu Jun 16 21:32:53 2011
     Raid Level : raid5
     Array Size : 5860537608 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 1953512536 (1863.01 GiB 2000.40 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Sat Oct  1 09:45:38 2016
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : parity-last
     Chunk Size : 4K

           Name : PC-NPL.localdomain:0
           UUID : f225928d:d977588a:058808df:cc6c53ca
         Events : 989508

    Number   Major   Minor   RaidDevice State
       1       8       49        0      active sync   /dev/sdd1
       4       8       65        1      active sync   /dev/sde1
       3       8        1        2      active sync   /dev/sda1
       5       8       17        3      active sync   /dev/sdb1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-01 22:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-01  8:42 Resize a btrfs File System : no enough free space... why ?!? Nicolas Pujol
2016-10-01 11:04 ` Duncan
2016-10-01 19:57 ` Chris Murphy
2016-10-01 22:32   ` Nicolas Pujol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).