On Thu, Apr 19, 2018 at 04:12:39PM -0700, Drew Bloechl wrote: > On Thu, Apr 19, 2018 at 10:43:57PM +0000, Hugo Mills wrote: > > Given that both data and metadata levels here require paired > > chunks, try adding _two_ temporary devices so that it can allocate a > > new block group. > > Thank you very much, that seems to have done the trick: > > # fallocate -l 4GiB /var/tmp/btrfs-temp-1 > # fallocate -l 4GiB /var/tmp/btrfs-temp-2 > # losetup -f /var/tmp/btrfs-temp-1 > # losetup -f /var/tmp/btrfs-temp-2 > # btrfs device add /dev/loop0 /broken > Performing full device TRIM (4.00GiB) ... > # btrfs device add /dev/loop1 /broken > Performing full device TRIM (4.00GiB) ... > # btrfs balance start -v -dusage=1 /broken > Dumping filters: flags 0x1, state 0x0, force is off > DATA (flags 0x2): balancing, usage=1 Excellent. Don't forget to "btrfs dev delete" the devices after you're finished the balance. You could damage the FS (possibly irreparably) if you destroy the devices without doing so. > I'm guessing that'll take a while to complete, but meanwhile, in another > terminal: > > # btrfs fi show /broken > Label: 'mon_data' uuid: 85e52555-7d6d-4346-8b37-8278447eb590 > Total devices 6 FS bytes used 69.53GiB > devid 1 size 931.51GiB used 731.02GiB path /dev/sda1 > devid 2 size 931.51GiB used 731.02GiB path /dev/sdb1 > devid 3 size 931.51GiB used 730.03GiB path /dev/sdc1 > devid 4 size 931.51GiB used 730.03GiB path /dev/sdd1 > devid 5 size 4.00GiB used 1.00GiB path /dev/loop0 > devid 6 size 4.00GiB used 1.00GiB path /dev/loop1 > > # btrfs fi df /broken > Data, RAID0: total=2.77TiB, used=67.00GiB > System, RAID1: total=8.00MiB, used=192.00KiB > Metadata, RAID1: total=4.00GiB, used=2.49GiB > GlobalReserve, single: total=512.00MiB, used=0.00B > > Do I understand correctly that this could require up to 3 extra devices, > if for instance you arrived in this situation with a RAID6 data profile? > Or is the number even higher for profiles like RAID10? The minimum number of devices for each RAID level is: single, DUP: 1 RAID-0, -1, -5: 2 RAID-6: 3 RAID-10: 4 Hugo. -- Hugo Mills | Gentlemen! You can't fight here! This is the War hugo@... carfax.org.uk | Room! http://carfax.org.uk/ | PGP: E2AB1DE4 | Dr Strangelove
Attachment:
signature.asc
Description: Digital signature
