* Why doesn't btrfs find additional space after (VMware) disk extension?
@ 2021-03-25 15:47 Wulfhorst, Heiner
2021-03-25 15:58 ` Roman Mamedov
0 siblings, 1 reply; 6+ messages in thread
From: Wulfhorst, Heiner @ 2021-03-25 15:47 UTC (permalink / raw)
To: linux-btrfs@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 4152 bytes --]
Hi list,
i am new to btrfs and really need help extending my fs on my openSUSE Leap
15.2 VMware VM.
It has one big btrfs on multiple disks:
# btrfs filesystem show /
Label: none uuid: 26c2b9c2-7ef7-476c-825d-9931b6344c37
Total devices 3 FS bytes used 125.09GiB
devid 1 size 47.51GiB used 47.51GiB path /dev/sdb2
devid 2 size 32.00GiB used 32.00GiB path /dev/sdc
devid 3 size 100.00GiB used 47.52GiB path /dev/sdd
# btrfs subvolume list /
ID 256 gen 32 top level 5 path @
ID 259 gen 6438 top level 256 path @/var
ID 260 gen 6245 top level 256 path @/usr/local
ID 261 gen 6433 top level 256 path @/tmp
ID 262 gen 6313 top level 256 path @/srv
ID 263 gen 6418 top level 256 path @/root
ID 264 gen 34 top level 256 path @/opt
ID 265 gen 34 top level 256 path @/home
ID 266 gen 271 top level 256 path @/boot/grub2/x86_64-efi
ID 267 gen 28 top level 256 path @/boot/grub2/i386-pc
ID 268 gen 6422 top level 256 path @/.snapshots
ID 269 gen 6438 top level 268 path @/.snapshots/1/snapshot
ID 285 gen 6314 top level 259 path @/var/cache
I ran out of space and got disk /dev/sdd resized from 100 to 500 gb.
I ran # echo 1 > /sys/block/sdd/device/rescan
and also rebooted multiple times after resizing.
OS got new size:
# lsblk /dev/sdd
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdd 8:48 0 500G 0 disk
But btrfs won't extend its filesystem:
# btrfs filesystem resize max /
Resize '/' of 'max'
# btrfs filesystem resize +1g /
Resize '/' of '+1g'
ERROR: unable to resize '/': no enough free space
# btrfs filesystem usage /
Overall:
Device size: 179.51GiB
Device allocated: 127.02GiB
Device unallocated: 52.49GiB
Device missing: 0.00B
Used: 125.42GiB
Free (estimated): 52.73GiB (min: 26.49GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 24.03MiB (used: 0.00B)
Data,RAID0: Size:125.01GiB, Used:124.76GiB
/dev/sdb2 46.51GiB
/dev/sdc 31.99GiB
/dev/sdd 46.51GiB
Metadata,RAID1: Size:1.00GiB, Used:333.58MiB
/dev/sdb2 1.00GiB
/dev/sdd 1.00GiB
System,RAID1: Size:8.00MiB, Used:16.00KiB
/dev/sdc 8.00MiB
/dev/sdd 8.00MiB
Unallocated:
/dev/sdb2 1.00MiB
/dev/sdc 1.00MiB
/dev/sdd 52.48GiB
- How can I use the 52 gb shown above as unallocated/free?
- What must I do to be able to use the 400 gb i added to /dev/sdd?
Here is a list of all btrfs commands I have tried/used by now:
btrfs balance start -dusage=0 -musage=0 /
btrfs balance start /
btrfs check
btrfs check --force /dev/sdd
btrfs check --repair
btrfs check --repair --force /dev/sdd
btrfs check --repair /dev/sdd
btrfs check /
btrfs check /dev/sdd
btrfs check /dev/sdd --force
btrfs device add /dev/sdd /
btrfs device scan
btrfs device scan
btrfs device scan -d
btrfs device stats
btrfs device stats /
btrfs device stats /dev/sdd
btrfs device usage
btrfs device usage /
btrfs fi df /
btrfs fi show /dev/sdd
btrfs filesystem df
btrfs filesystem df /
btrfs filesystem df /var
btrfs filesystem resize +10g /
btrfs filesystem resize +1g /
btrfs filesystem resize +5g /
btrfs filesystem resize /
btrfs filesystem resize / 3:max
btrfs filesystem resize / max
btrfs filesystem resize max /
btrfs filesystem resize max /var
btrfs filesystem show /
btrfs filesystem show /dev/sdd
btrfs filesystem usage
btrfs filesystem usage /
btrfs fs label
btrfs fs label /
btrfs fs label /dev/sdd
btrfs fs resize /
btrfs fs resize / max
btrfs fs resize / max|less
btrfs fs resize max /
btrfs subvolume delete /.snapshots/1/snapshot
btrfs subvolume delete /.snapshots/10/snapshot
btrfs subvolume delete /.snapshots/2/snapshot
btrfs subvolume delete /.snapshots/21/snapshot
btrfs subvolume delete /.snapshots/22/snapshot
btrfs subvolume delete /.snapshots/9/snapshot
btrfs subvolume delete @/.snapshots/2/snapshot
btrfs subvolume list
btrfs subvolume list /
btrfs subvolume show
btrfs subvolume show /
btrfs subvolume sync
btrfsck /
btrfsck /dev/sdd
Thanks for any help!
Heiner
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7542 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why doesn't btrfs find additional space after (VMware) disk extension?
2021-03-25 15:47 Why doesn't btrfs find additional space after (VMware) disk extension? Wulfhorst, Heiner
@ 2021-03-25 15:58 ` Roman Mamedov
2021-03-26 8:09 ` AW: " Wulfhorst, Heiner
0 siblings, 1 reply; 6+ messages in thread
From: Roman Mamedov @ 2021-03-25 15:58 UTC (permalink / raw)
To: Wulfhorst, Heiner; +Cc: linux-btrfs@vger.kernel.org
On Thu, 25 Mar 2021 15:47:20 +0000
"Wulfhorst, Heiner" <Heiner.Wulfhorst@claas.com> wrote:
> But btrfs won't extend its filesystem:
> # btrfs filesystem resize max /
> Resize '/' of 'max'
...
> btrfs filesystem resize / 3:max
You got the right lead there, but I believe it's
btrfs filesystem resize 3:max /
--
With respect,
Roman
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Why doesn't btrfs find additional space after (VMware) disk extension?
2021-03-25 15:58 ` Roman Mamedov
@ 2021-03-26 8:09 ` Wulfhorst, Heiner
2021-03-26 8:44 ` Roman Mamedov
0 siblings, 1 reply; 6+ messages in thread
From: Wulfhorst, Heiner @ 2021-03-26 8:09 UTC (permalink / raw)
Cc: linux-btrfs@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 4223 bytes --]
> You got the right lead there, but I believe it's
>
> btrfs filesystem resize 3:max /
>
> --
> With respect,
> Roman
Thanks a lot, you got me one step further (but directly stuck again).
Unfortunately it now just shows that new space as Unallocated, together with
those 52gb i mentioned in my first mail.
Commands I tried to use them:
# btrfs filesystem sync / # (no output)
# btrfs subvolume sync / # (no output)
# btrfs balance / # please find output below
I also tried to add a new subvol hoping that one would be able to profit
from that new space (it didn't).
I assume I must add that unallocated space to any subvol, but have no clue
how to do so.
Again - no documentation found was helping.
Any Idea what I am missing?
Here's my command output:
# btrfs filesystem resize 3:max /
Resize '/' of '3:max'
# btrfs filesystem show
Label: none uuid: 26c2b9c2-7ef7-476c-825d-9931b6344c37
Total devices 3 FS bytes used 125.09GiB
devid 1 size 47.51GiB used 47.51GiB path /dev/sdb2
devid 2 size 32.00GiB used 32.00GiB path /dev/sdc
devid 3 size 500.00GiB used 47.52GiB path /dev/sdd
# btrfs filesystem usage /
Overall:
Device size: 579.51GiB
Device allocated: 127.02GiB
Device unallocated: 452.49GiB
Device missing: 0.00B
Used: 125.42GiB
Free (estimated): 452.73GiB (min: 226.49GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 24.00MiB (used: 0.00B)
Data,RAID0: Size:125.01GiB, Used:124.76GiB
/dev/sdb2 46.51GiB
/dev/sdc 31.99GiB
/dev/sdd 46.51GiB
Metadata,RAID1: Size:1.00GiB, Used:333.56MiB
/dev/sdb2 1.00GiB
/dev/sdd 1.00GiB
System,RAID1: Size:8.00MiB, Used:16.00KiB
/dev/sdc 8.00MiB
/dev/sdd 8.00MiB
Unallocated:
/dev/sdb2 1.00MiB
/dev/sdc 1.00MiB
/dev/sdd 452.48GiB
# btrfs balance /
WARNING:
Full balance without filters requested. This operation is very
intense and takes potentially very long. It is recommended to
use the balance filters to narrow down the scope of balance.
Use 'btrfs balance start --full-balance' option to skip this
warning. The operation will start in 10 seconds.
Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting balance without any filters.
ERROR: error during balancing '/': No space left on device
There may be more info in syslog - try dmesg | tail
# dmesg | tail
[ 6746.086714] BTRFS info (device sdb2): new size for /dev/sdb2 is
51013222400
[63115.423998] BTRFS info (device sdb2): resizing devid 3
[63115.424001] BTRFS info (device sdb2): new size for /dev/sdd is
536870912000
[64096.971566] sda: sda1
[64473.204054] BTRFS info (device sdb2): balance: start -d -m -s
[64473.204145] BTRFS info (device sdb2): relocating block group 135289372672
flags data|raid0
[64473.449111] BTRFS info (device sdb2): found 6 extents
[64473.514132] BTRFS info (device sdb2): found 6 extents
[64473.563164] BTRFS info (device sdb2): 49 enospc errors during balance
[64473.563167] BTRFS info (device sdb2): balance: ended with status: -28
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 8.0K 3.9G 1% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 17M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sdb2 580G 126G 251M 100% /
/dev/sdb2 580G 126G 251M 100% /.snapshots
/dev/sdb2 580G 126G 251M 100% /usr/local
/dev/sdb2 580G 126G 251M 100% /opt
/dev/sdb2 580G 126G 251M 100% /root
/dev/sdb2 580G 126G 251M 100% /boot/grub2/i386-pc
/dev/sdb2 580G 126G 251M 100% /boot/grub2/x86_64-efi
/dev/sdb2 580G 126G 251M 100% /srv
/dev/sdb2 580G 126G 251M 100% /var
/dev/sdb2 580G 126G 251M 100% /tmp
/dev/sdb2 580G 126G 251M 100% /home
/dev/sdb2 580G 126G 251M 100% /var/cache
/dev/sdb1 500M 5.3M 495M 2% /boot/efi
tmpfs 796M 0 796M 0% /run/user/0
Any help appreciated!
Thanks,
Heiner
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7542 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why doesn't btrfs find additional space after (VMware) disk extension?
2021-03-26 8:09 ` AW: " Wulfhorst, Heiner
@ 2021-03-26 8:44 ` Roman Mamedov
2021-03-26 9:42 ` AW: " Wulfhorst, Heiner
0 siblings, 1 reply; 6+ messages in thread
From: Roman Mamedov @ 2021-03-26 8:44 UTC (permalink / raw)
To: Wulfhorst, Heiner; +Cc: linux-btrfs@vger.kernel.org
On Fri, 26 Mar 2021 08:09:50 +0000
"Wulfhorst, Heiner" <Heiner.Wulfhorst@claas.com> wrote:
> > You got the right lead there, but I believe it's
> >
> > btrfs filesystem resize 3:max /
> >
> > --
> > With respect,
> > Roman
>
> Thanks a lot, you got me one step further (but directly stuck again).
> Unfortunately it now just shows that new space as Unallocated
That's OK
> I also tried to add a new subvol hoping that one would be able to profit
> from that new space (it didn't).
>
> I assume I must add that unallocated space to any subvol, but have no clue
> how to do so.
No, you don't need to, the free space is FS-wide, it does not belong to
subvolumes.
> Again - no documentation found was helping.
> Any Idea what I am missing?
> # btrfs filesystem show
> Label: none uuid: 26c2b9c2-7ef7-476c-825d-9931b6344c37
> Total devices 3 FS bytes used 125.09GiB
> devid 1 size 47.51GiB used 47.51GiB path /dev/sdb2
> devid 2 size 32.00GiB used 32.00GiB path /dev/sdc
> devid 3 size 500.00GiB used 47.52GiB path /dev/sdd
>
>
> # btrfs filesystem usage /
> Overall:
> Device size: 579.51GiB
> Device allocated: 127.02GiB
> Device unallocated: 452.49GiB
> Device missing: 0.00B
> Used: 125.42GiB
> Free (estimated): 452.73GiB (min: 226.49GiB)
> Data ratio: 1.00
> Metadata ratio: 2.00
> Global reserve: 24.00MiB (used: 0.00B)
>
> Data,RAID0: Size:125.01GiB, Used:124.76GiB
> /dev/sdb2 46.51GiB
> /dev/sdc 31.99GiB
> /dev/sdd 46.51GiB
>
> Metadata,RAID1: Size:1.00GiB, Used:333.56MiB
> /dev/sdb2 1.00GiB
> /dev/sdd 1.00GiB
>
> System,RAID1: Size:8.00MiB, Used:16.00KiB
> /dev/sdc 8.00MiB
> /dev/sdd 8.00MiB
>
> Unallocated:
> /dev/sdb2 1.00MiB
> /dev/sdc 1.00MiB
> /dev/sdd 452.48GiB
>
> # btrfs balance /
> WARNING:
>
> Full balance without filters requested. This operation is very
> intense and takes potentially very long. It is recommended to
> use the balance filters to narrow down the scope of balance.
> Use 'btrfs balance start --full-balance' option to skip this
> warning. The operation will start in 10 seconds.
> Use Ctrl-C to stop it.
> 10 9 8 7 6 5 4 3 2 1
> Starting balance without any filters.
> ERROR: error during balancing '/': No space left on device
My guess is that you ask FS to store data and metadata as RAID0 and RAID1,
i.e. each requiring *two* devices either for striping or mirroring, but you do
not actually have two devices with free space to write new data to, only one
(sdd).
With such setup of 47 + 32 + 500 GB, you will be able to store only about 160
GB of data on the FS. Or with 47 and 32 being already filled on the addition of
500GB, even less.
If you want to fully use all the disk space at cost of some performance (at
least for now), you can convert your data to "single":
btrfs balance start -dconvert=single /
It might not be necessary to convert all of it, just some will be enough to
give it a little room and also make all new block groups also "single".
So, at first try adding "-dlimit=10" to the above line.
--
With respect,
Roman
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Why doesn't btrfs find additional space after (VMware) disk extension?
2021-03-26 8:44 ` Roman Mamedov
@ 2021-03-26 9:42 ` Wulfhorst, Heiner
2021-03-26 10:14 ` Forza
0 siblings, 1 reply; 6+ messages in thread
From: Wulfhorst, Heiner @ 2021-03-26 9:42 UTC (permalink / raw)
To: linux-btrfs@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]
Thanks, Roman, you got me back on Track!
I am new to btrfs so I was assuming RAID0 means there is no need for equally
sized disks.
After `btrfs balance start -dconvert=single -dlimit=10 /' output of `btrfs
filesystem usage /' now shows:
Overall:
Device size: 579.51GiB
Device allocated: 126.99GiB
Device unallocated: 452.52GiB
Device missing: 0.00B
Used: 125.42GiB
Free (estimated): 452.72GiB (min: 226.46GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 24.05MiB (used: 0.00B)
Data,single: Size:19.00GiB, Used:18.98GiB
/dev/sdd 19.00GiB
Data,RAID0: Size:105.97GiB, Used:105.79GiB
/dev/sdb2 36.99GiB
/dev/sdc 31.99GiB
/dev/sdd 36.99GiB
Metadata,RAID1: Size:1.00GiB, Used:333.61MiB
/dev/sdb2 1.00GiB
/dev/sdd 1.00GiB
System,RAID1: Size:8.00MiB, Used:16.00KiB
/dev/sdc 8.00MiB
/dev/sdd 8.00MiB
Unallocated:
/dev/sdb2 9.52GiB
/dev/sdc 1.00MiB
/dev/sdd 443.00GiB
And finally:
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 8.0K 3.9G 1% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 17M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sdb2 580G 126G 20G 87% /
/dev/sdb2 580G 126G 20G 87% /.snapshots
/dev/sdb2 580G 126G 20G 87% /usr/local
/dev/sdb2 580G 126G 20G 87% /opt
/dev/sdb2 580G 126G 20G 87% /root
/dev/sdb2 580G 126G 20G 87% /boot/grub2/i386-pc
/dev/sdb2 580G 126G 20G 87% /boot/grub2/x86_64-efi
/dev/sdb2 580G 126G 20G 87% /srv
/dev/sdb2 580G 126G 20G 87% /var
/dev/sdb2 580G 126G 20G 87% /tmp
/dev/sdb2 580G 126G 20G 87% /home
/dev/sdb2 580G 126G 20G 87% /var/cache
/dev/sdb1 500M 5.3M 495M 2% /boot/efi
tmpfs 796M 0 796M 0% /run/user/0
Thanks a lot! I will now read further documentation regarding "btrfs single
vs RAID*" to understand exactly why and how and also convert remaining space
to single (it's just a test
system).
Thanks a lot!
BR,
Heiner
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7542 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Why doesn't btrfs find additional space after (VMware) disk extension?
2021-03-26 9:42 ` AW: " Wulfhorst, Heiner
@ 2021-03-26 10:14 ` Forza
0 siblings, 0 replies; 6+ messages in thread
From: Forza @ 2021-03-26 10:14 UTC (permalink / raw)
To: Wulfhorst, Heiner, linux-btrfs@vger.kernel.org
---- From: "Wulfhorst, Heiner" <Heiner.Wulfhorst@claas.com> -- Sent: 2021-03-26 - 10:42 ----
> Thanks, Roman, you got me back on Track!
>
> I am new to btrfs so I was assuming RAID0 means there is no need for equally
> sized disks.
>
> After `btrfs balance start -dconvert=single -dlimit=10 /' output of `btrfs
> filesystem usage /' now shows:
>
> Overall:
> Device size: 579.51GiB
> Device allocated: 126.99GiB
> Device unallocated: 452.52GiB
> Device missing: 0.00B
> Used: 125.42GiB
> Free (estimated): 452.72GiB (min: 226.46GiB)
> Data ratio: 1.00
> Metadata ratio: 2.00
> Global reserve: 24.05MiB (used: 0.00B)
>
> Data,single: Size:19.00GiB, Used:18.98GiB
> /dev/sdd 19.00GiB
>
> Data,RAID0: Size:105.97GiB, Used:105.79GiB
> /dev/sdb2 36.99GiB
> /dev/sdc 31.99GiB
> /dev/sdd 36.99GiB
>
> Metadata,RAID1: Size:1.00GiB, Used:333.61MiB
> /dev/sdb2 1.00GiB
> /dev/sdd 1.00GiB
>
> System,RAID1: Size:8.00MiB, Used:16.00KiB
> /dev/sdc 8.00MiB
> /dev/sdd 8.00MiB
>
> Unallocated:
> /dev/sdb2 9.52GiB
> /dev/sdc 1.00MiB
> /dev/sdd 443.00GiB
>
>
>
> And finally:
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> devtmpfs 3.9G 8.0K 3.9G 1% /dev
> tmpfs 3.9G 0 3.9G 0% /dev/shm
> tmpfs 3.9G 17M 3.9G 1% /run
> tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
> /dev/sdb2 580G 126G 20G 87% /
> /dev/sdb2 580G 126G 20G 87% /.snapshots
> /dev/sdb2 580G 126G 20G 87% /usr/local
> /dev/sdb2 580G 126G 20G 87% /opt
> /dev/sdb2 580G 126G 20G 87% /root
> /dev/sdb2 580G 126G 20G 87% /boot/grub2/i386-pc
> /dev/sdb2 580G 126G 20G 87% /boot/grub2/x86_64-efi
> /dev/sdb2 580G 126G 20G 87% /srv
> /dev/sdb2 580G 126G 20G 87% /var
> /dev/sdb2 580G 126G 20G 87% /tmp
> /dev/sdb2 580G 126G 20G 87% /home
> /dev/sdb2 580G 126G 20G 87% /var/cache
> /dev/sdb1 500M 5.3M 495M 2% /boot/efi
> tmpfs 796M 0 796M 0% /run/user/0
>
> Thanks a lot! I will now read further documentation regarding "btrfs single
> vs RAID*" to understand exactly why and how and also convert remaining space
> to single (it's just a test
> system).
>
> Thanks a lot!
>
> BR,
> Heiner
There is an excellent disk space calculator for Btrfs at https://www.carfax.org.uk/btrfs-usage/
You can test different disk sizes and RAID profiles to see what actual user disk space you get.
Regards,
Forza
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-26 10:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-25 15:47 Why doesn't btrfs find additional space after (VMware) disk extension? Wulfhorst, Heiner
2021-03-25 15:58 ` Roman Mamedov
2021-03-26 8:09 ` AW: " Wulfhorst, Heiner
2021-03-26 8:44 ` Roman Mamedov
2021-03-26 9:42 ` AW: " Wulfhorst, Heiner
2021-03-26 10:14 ` Forza
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).