Skip to contentSkip to conversation

Cannot resize filesystem: not enough free space

DISCUSSION Jakob Schöttl 2 participants 4 messages Jan 24, 2021 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Help please, increasing the filesystem size doesn't work.

When mounting my btrfs filesystem, I had errors saying, "no space left on device". Now I managed to mount the filesystem with -o skip_balance but:

# btrfs fi df /mnt
Data, RAID1: total=147.04GiB, used=147.02GiB
System, RAID1: total=8.00MiB, used=48.00KiB
Metadata, RAID1: total=1.00GiB, used=458.84MiB
GlobalReserve, single: total=181.53MiB, used=0.00B

It is full and resize doesn't work although both block devices sda and sdb have more 250 GB and more nominal capacity (I don't have partitions, btrfs is directly on sda and sdb):

# fdisk -l /dev/sd{a,b}*
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
[...]
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
[...]

I tried:

# btrfs fi resize 230G /mnt
runs without errors but has no effect
# btrfs fi resize max /mnt
runs without errors but has no effect
# btrfs fi resize +1G /mnt
ERROR: unable to resize '/mnt': no enough free space

Any ideas? Thank you!

#1 lore raw
Quoted 11 lines · Jakob Schöttl

Help please, increasing the filesystem size doesn't work.

When mounting my btrfs filesystem, I had errors saying, "no space left on device". Now I managed to mount the filesystem with -o skip_balance but:

# btrfs fi df /mnt
Data, RAID1: total=147.04GiB, used=147.02GiB
System, RAID1: total=8.00MiB, used=48.00KiB
Metadata, RAID1: total=1.00GiB, used=458.84MiB
GlobalReserve, single: total=181.53MiB, used=0.00B

Can you show the output of "sudo btrfs fi show" as well?

Hugo.

Quoted 22 lines

It is full and resize doesn't work although both block devices sda and sdb have more 250 GB and more nominal capacity (I don't have partitions, btrfs is directly on sda and sdb):

# fdisk -l /dev/sd{a,b}*
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
[...]
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
[...]

I tried:

# btrfs fi resize 230G /mnt
runs without errors but has no effect
# btrfs fi resize max /mnt
runs without errors but has no effect
# btrfs fi resize +1G /mnt
ERROR: unable to resize '/mnt': no enough free space

Any ideas? Thank you!

Signature · 4 lines
Hugo Mills             | Attempted murder, now honestly, what is that? Do
hugo@... carfax.org.uk | they give a Nobel Prize for attempted chemistry?
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                          Sideshow Bob
#2 lore raw
Quoted 13 lines · Hugo Mills
Quoted 11 lines · Jakob Schöttl

Help please, increasing the filesystem size doesn't work.

When mounting my btrfs filesystem, I had errors saying, "no space left on device". Now I managed to mount the filesystem with -o skip_balance but:

# btrfs fi df /mnt
Data, RAID1: total=147.04GiB, used=147.02GiB
System, RAID1: total=8.00MiB, used=48.00KiB
Metadata, RAID1: total=1.00GiB, used=458.84MiB
GlobalReserve, single: total=181.53MiB, used=0.00B
Quoted 4 lines

Can you show the output of "sudo btrfs fi show" as well?

Hugo.

Thanks, Hugo, for the quick response.

# btrfs fi show /mnt/
Label: 'data'  uuid: fc991007-6ef3-4c2c-9ca7-b4d637fccafb
       Total devices 2 FS bytes used 148.43GiB
       devid    1 size 232.89GiB used 149.05GiB path /dev/sda
       devid    2 size 149.05GiB used 149.05GiB path /dev/sdb

Oh, now I see! Resize only worked for one sda!

# btrfs fi resize 1:max /mnt/
# btrfs fi resize 2:max /mnt/
# btrfs fi show /mnt/
Label: 'data'  uuid: fc991007-6ef3-4c2c-9ca7-b4d637fccafb
       Total devices 2 FS bytes used 150.05GiB
       devid    1 size 232.89GiB used 151.05GiB path /dev/sda
       devid    2 size 465.76GiB used 151.05GiB path /dev/sdb

Now it works. Thank you!

Quoted 22 lines
Quoted 22 lines

It is full and resize doesn't work although both block devices sda and sdb have more 250 GB and more nominal capacity (I don't have partitions, btrfs is directly on sda and sdb):

# fdisk -l /dev/sd{a,b}*
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
[...]
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
[...]

I tried:

# btrfs fi resize 230G /mnt
runs without errors but has no effect
# btrfs fi resize max /mnt
runs without errors but has no effect
# btrfs fi resize +1G /mnt
ERROR: unable to resize '/mnt': no enough free space

Any ideas? Thank you!

Signature · 4 lines
Jakob Schöttl
Phone: 0176 45762916
E-mail: [email protected]
PGP-key: 0x25055C7F
#3 lore raw
Quoted 40 lines · Jakob Schöttl
Quoted 15 lines · Hugo Mills
Quoted 8 lines · Jakob Schöttl

Help please, increasing the filesystem size doesn't work.

When mounting my btrfs filesystem, I had errors saying, "no space left
on device". Now I managed to mount the filesystem with -o skip_balance but:

Quoted 5 lines
# btrfs fi df /mnt
Data, RAID1: total=147.04GiB, used=147.02GiB
System, RAID1: total=8.00MiB, used=48.00KiB
Metadata, RAID1: total=1.00GiB, used=458.84MiB
GlobalReserve, single: total=181.53MiB, used=0.00B
Quoted 3 lines

Can you show the output of "sudo btrfs fi show" as well?

Hugo.

Thanks, Hugo, for the quick response.

# btrfs fi show /mnt/
Label: 'data'  uuid: fc991007-6ef3-4c2c-9ca7-b4d637fccafb
       Total devices 2 FS bytes used 148.43GiB
       devid    1 size 232.89GiB used 149.05GiB path /dev/sda
       devid    2 size 149.05GiB used 149.05GiB path /dev/sdb

Oh, now I see! Resize only worked for one sda!

# btrfs fi resize 1:max /mnt/
# btrfs fi resize 2:max /mnt/
# btrfs fi show /mnt/
Label: 'data'  uuid: fc991007-6ef3-4c2c-9ca7-b4d637fccafb
       Total devices 2 FS bytes used 150.05GiB
       devid    1 size 232.89GiB used 151.05GiB path /dev/sda
       devid    2 size 465.76GiB used 151.05GiB path /dev/sdb
Quoted 1 line

Now it works. Thank you!

Note that the new configuration is going to waste about 232 GiB of
/dev/sdb, because you've got RAID-1, and there won't be spare space to mirror anything onto once /dev/sda fills up.

You can add a third device of 232 GiB (250 GB) or more to the FS
and that'll allow the use of the remaining space on /dev/sdb.

Hugo.

Quoted 26 lines
Quoted 24 lines
Quoted 24 lines

It is full and resize doesn't work although both block devices sda and
sdb have more 250 GB and more nominal capacity (I don't have partitions,
btrfs is directly on sda and sdb):

# fdisk -l /dev/sd{a,b}*
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
[...]
Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
[...]

I tried:

# btrfs fi resize 230G /mnt
runs without errors but has no effect
# btrfs fi resize max /mnt
runs without errors but has no effect
# btrfs fi resize +1G /mnt
ERROR: unable to resize '/mnt': no enough free space

Any ideas? Thank you!

Signature · 4 lines
Hugo Mills             | Have found Lost City of Atlantis. High Priest is
hugo@... carfax.org.uk | winning at quoits.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                       Terry Pratchett