All of lore.kernel.org
 help / color / mirror / Atom feed
* Usage of new added disk not updated while doing a balance
@ 2015-08-11 11:08 Juan Orti Alcaine
  2015-08-11 13:20 ` Austin S Hemmelgarn
  0 siblings, 1 reply; 3+ messages in thread
From: Juan Orti Alcaine @ 2015-08-11 11:08 UTC (permalink / raw)
  To: Btrfs

Hello,

I have added a new disk to my filesystem and I'm doing a balance right
now, but I'm a bit worried that the disk usage does not get updated as
it should. I remember from earlier versions that you could see the
disk usage being balanced across all disks.

These are the commands I've run:
# btrfs device add /dev/sdb2 /mnt/btrfs_raid1
# btrfs fi balance /mnt/btrfs_raid1

I see the unallocated space of sdc2 and sdd2 increasing, but for sdb2
(the new disk), it doesn't change. sdb2 doesn't even appear in the
btrfs usage command for data, metadata and system.

Is this normal? It's very strange the disk not showing up in the usage report.

# btrfs --version
btrfs-progs v4.1

# uname -a
Linux xenon 4.1.3-201.fc22.x86_64 #1 SMP Wed Jul 29 19:50:22 UTC 2015
x86_64 x86_64 x86_64 GNU/Linux

# btrfs fi usage /mnt/btrfs_raid1
Overall:
    Device size:                   5.44TiB
    Device allocated:              2.74TiB
    Device unallocated:            2.70TiB
    Device missing:                  0.00B
    Used:                          2.61TiB
    Free (estimated):              1.42TiB      (min: 1.42TiB)
    Data ratio:                       2.00
    Metadata ratio:                   2.00
    Global reserve:              512.00MiB      (used: 16.00KiB)

Data,RAID1: Size:1.36TiB, Used:1.30TiB
   /dev/sdc2       1.36TiB
   /dev/sdd2       1.36TiB

Metadata,RAID1: Size:10.00GiB, Used:8.11GiB
   /dev/sdc2      10.00GiB
   /dev/sdd2      10.00GiB

System,RAID1: Size:32.00MiB, Used:224.00KiB
   /dev/sdc2      32.00MiB
   /dev/sdd2      32.00MiB

Unallocated:
   /dev/sdb2       1.81TiB
   /dev/sdc2     454.48GiB
   /dev/sdd2     454.48GiB

# btrfs fi df /mnt/btrfs_raid1
Data, RAID1: total=1.36TiB, used=1.30TiB
System, RAID1: total=32.00MiB, used=224.00KiB
Metadata, RAID1: total=10.00GiB, used=8.13GiB
GlobalReserve, single: total=512.00MiB, used=18.83MiB

# btrfs fi show /mnt/btrfs_raid1
Label: 'btrfs_raid1'  uuid: 03eeb44b-de69-4f1f-9261-70bd7a5c6de0
        Total devices 3 FS bytes used 1.30TiB
        devid    1 size 1.81TiB used 1.37TiB path /dev/sdc2
        devid    2 size 1.81TiB used 1.37TiB path /dev/sdd2
        devid    3 size 1.81TiB used 0.00B path /dev/sdb2

btrfs-progs v4.1

And the kernel log:
ago 11 11:54:45 xenon kernel: BTRFS info (device sdd2): disk added /dev/sdb2
ago 11 11:56:18 xenon kernel: BTRFS info (device sdd2): relocating
block group 1715902349312 flags 17
ago 11 11:56:36 xenon kernel: BTRFS info (device sdd2): found 12127 extents
ago 11 12:09:52 xenon kernel: BTRFS info (device sdd2): found 12127 extents
ago 11 12:09:56 xenon kernel: BTRFS info (device sdd2): relocating
block group 1714828607488 flags 17
ago 11 12:10:11 xenon kernel: BTRFS info (device sdd2): found 1076 extents
ago 11 12:11:24 xenon kernel: BTRFS info (device sdd2): found 1076 extents
ago 11 12:11:25 xenon kernel: BTRFS info (device sdd2): relocating
block group 1713754865664 flags 17
ago 11 12:11:37 xenon kernel: BTRFS info (device sdd2): found 8 extents
ago 11 12:11:50 xenon kernel: BTRFS info (device sdd2): found 8 extents
ago 11 12:11:50 xenon kernel: BTRFS info (device sdd2): relocating
block group 1712681123840 flags 17
ago 11 12:12:16 xenon kernel: BTRFS info (device sdd2): found 1432 extents
ago 11 12:13:17 xenon kernel: BTRFS info (device sdd2): found 1432 extents
[...]

-- 
Juan Orti
https://miceliux.com

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

* Re: Usage of new added disk not updated while doing a balance
  2015-08-11 11:08 Usage of new added disk not updated while doing a balance Juan Orti Alcaine
@ 2015-08-11 13:20 ` Austin S Hemmelgarn
  2015-08-11 14:20   ` Juan Orti Alcaine
  0 siblings, 1 reply; 3+ messages in thread
From: Austin S Hemmelgarn @ 2015-08-11 13:20 UTC (permalink / raw)
  To: Juan Orti Alcaine, Btrfs

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

On 2015-08-11 07:08, Juan Orti Alcaine wrote:
> Hello,
>
> I have added a new disk to my filesystem and I'm doing a balance right
> now, but I'm a bit worried that the disk usage does not get updated as
> it should. I remember from earlier versions that you could see the
> disk usage being balanced across all disks.
>
> These are the commands I've run:
> # btrfs device add /dev/sdb2 /mnt/btrfs_raid1
> # btrfs fi balance /mnt/btrfs_raid1
>
> I see the unallocated space of sdc2 and sdd2 increasing, but for sdb2
> (the new disk), it doesn't change. sdb2 doesn't even appear in the
> btrfs usage command for data, metadata and system.
>
> Is this normal? It's very strange the disk not showing up in the usage report.
How much slack space was allocated by BTRFS before running the balance 
(ie, how big a difference was there between the allocated and used 
space), and did the balance run to completion?  If you had a lot of 
mostly empty chunks and stopped the balance part way through, then this 
is what I would expect to happen (balance back-fills partial chunks 
before it starts allocating new ones).

If that is not the case however, then this is very much _not_ normal, 
and is almost certainly a bug, in which case you should make sure any 
important data on the filesystem is backed up before doing anything 
further with it (including unmounting it or rebooting the system).


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

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

* Re: Usage of new added disk not updated while doing a balance
  2015-08-11 13:20 ` Austin S Hemmelgarn
@ 2015-08-11 14:20   ` Juan Orti Alcaine
  0 siblings, 0 replies; 3+ messages in thread
From: Juan Orti Alcaine @ 2015-08-11 14:20 UTC (permalink / raw)
  To: Austin S Hemmelgarn; +Cc: Btrfs

2015-08-11 15:20 GMT+02:00 Austin S Hemmelgarn <ahferroin7@gmail.com>:
> How much slack space was allocated by BTRFS before running the balance (ie,
> how big a difference was there between the allocated and used space), and
> did the balance run to completion?  If you had a lot of mostly empty chunks
> and stopped the balance part way through, then this is what I would expect
> to happen (balance back-fills partial chunks before it starts allocating new
> ones).
>
> If that is not the case however, then this is very much _not_ normal, and is
> almost certainly a bug, in which case you should make sure any important
> data on the filesystem is backed up before doing anything further with it
> (including unmounting it or rebooting the system).
>

I don't have the usage numbers before running the balance, but I have
around 1000 readonly snapshots, so maybe that's a factor.

It keeps running and using both CPU and IO, so I'll wait to see what happens.

Thank you.

-- 
Juan Orti
https://miceliux.com

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

end of thread, other threads:[~2015-08-11 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 11:08 Usage of new added disk not updated while doing a balance Juan Orti Alcaine
2015-08-11 13:20 ` Austin S Hemmelgarn
2015-08-11 14:20   ` Juan Orti Alcaine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.