You are not logged in.
Pages: 1
I've added a device to my existing Btrfs file system recently, but it doesn't report the new device as having even allocated any space for the data. Take a look:
Before I started:
# btrfs fi show /
Label: 'LINUX' uuid: f0b4d012-91d8-43bd-90b5-e398a012ccff
Total devices 1 FS bytes used 126.72GiB
devid 1 size 272.40GiB used 128.03GiB path /dev/sda3
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 273.4G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 272.4G 0 part /pool
sdb 8:16 0 68.3G 0 disk
So now I want to add /dev/sdb:
# btrfs device add /dev/sdb /
# btrfs balance start --full-balance /
< an hour or so later ... >
# btrfs fi usage /
Overall:
Device size: 340.73GiB
Device allocated: 128.03GiB
Device unallocated: 212.70GiB
Device missing: 0.00B
Used: 126.68GiB
Free (estimated): 213.10GiB (min: 213.10GiB)
Data ratio: 1.00
Metadata ratio: 1.00
Global reserve: 338.14MiB (used: 0.00B)
Data,single: Size:126.00GiB, Used:125.60GiB
/dev/sda3 126.00GiB
Metadata,single: Size:2.00GiB, Used:1.08GiB
/dev/sda3 2.00GiB
System,single: Size:32.00MiB, Used:16.00KiB
/dev/sda3 32.00MiB
Unallocated:
/dev/sda3 144.37GiB
/dev/sdb 68.33GiB
Huh, I thought that was supposed to do it, lets try this:
# btrfs balance start -dconvert=single -mconvert=raid1 /
< an hour or so later ... >
# btrfs fi show /
Label: 'LINUX' uuid: f0b4d012-91d8-43bd-90b5-e398a012ccff
Total devices 2 FS bytes used 126.72GiB
devid 1 size 272.40GiB used 128.03GiB path /dev/sda3
devid 2 size 68.33GiB used 2.03GiB path /dev/sdb
# btrfs fi usage /
Overall:
Device size: 340.73GiB
Device allocated: 130.06GiB
Device unallocated: 210.67GiB
Device missing: 0.00B
Used: 127.80GiB
Free (estimated): 211.03GiB (min: 105.69GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 338.47MiB (used: 0.00B)
Data,single: Size:126.00GiB, Used:125.64GiB
/dev/sda3 126.00GiB
Metadata,RAID1: Size:2.00GiB, Used:1.08GiB
/dev/sda3 2.00GiB
/dev/sdb 2.00GiB
System,RAID1: Size:32.00MiB, Used:16.00KiB
/dev/sda3 32.00MiB
/dev/sdb 32.00MiB
Unallocated:
/dev/sda3 144.37GiB
/dev/sdb 66.30GiB
What the heck?
Kernel said anything during balance? Just a whole lot of this:
Feb 13 21:55:06 localhost kernel: BTRFS info (device sda3): found 7541 extents
Feb 13 21:55:06 localhost kernel: BTRFS info (device sda3): relocating block group 621927202816 f
Feb 13 21:55:18 localhost kernel: BTRFS info (device sda3): found 7020 extents
Feb 13 21:55:28 localhost kernel: BTRFS info (device sda3): found 7020 extents
Feb 13 21:55:28 localhost kernel: BTRFS info (device sda3): relocating block group 620853460992 f
Feb 13 21:55:39 localhost kernel: BTRFS info (device sda3): found 2540 extents
Feb 13 21:55:48 localhost kernel: BTRFS info (device sda3): found 2540 extents
Feb 13 21:55:48 localhost kernel: BTRFS info (device sda3): relocating block group 619779719168 f
Feb 13 21:55:58 localhost kernel: BTRFS info (device sda3): found 3971 extents
Offline
All your output is as expected, what's the problem?
Last edited by Slithery (2017-02-14 12:03:48)
Offline
All the data is still one one device:
Data,single: Size:126.00GiB, Used:125.64GiB
/dev/sda3 126.00GiB
Offline
And? You haven't told it to do otherwise.
The way you have it set up at the moment it's just pooling all of the available space into one volume (as can be seen by the Device Size output).
What are you wanting to happen?
Offline
I was under the impression that it would distribute data between the two devices proportional to their size. Will it not allocate for data on sdb until the unallocated space on sda3 dips below 66.30GiB (the unallocated space on sdb)? I'm kind of in favor of the former behavior, as it would balance the disk load between the two devices. I'm not entirely sure what the consequences of using raid0 for data between these two different devices, but I'm not terribly fond of the potential problems that come to mind.
Offline
Pages: 1