Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc_resizefs does not allocate space on all disks of a multi disk btrfs volume #3937

Open
ubuntu-server-builder opened this issue May 12, 2023 · 2 comments
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1955858

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2021-12-28T01:05:59.703006+00:00
date_fix_committed = None
date_fix_released = None
id = 1955858
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1955858
milestone = None
owner = nothing4you
owner_name = Richard Schwab
private = False
status = triaged
submitter = nothing4you
submitter_name = Richard Schwab
tags = []
duplicates = []

Launchpad user Richard Schwab(nothing4you) wrote on 2021-12-28T01:05:59.703006+00:00

cloud provider: self-hosted, proxmox

cloud-init config:
growpart:
  mode: auto
  devices:
    - /dev/sda1
    - /dev/sdb1
    - /dev/sdc1
    - /dev/sdd1

I have a multi disk btrfs volume as root fs for the vm.
Each disk needs to grow on first boot and the btrfs filesystem should be resized.
Partitions are grown just fine and btrfs detects that, however, running btrfs filesystem resize max / as currently used in

return ("btrfs", "filesystem", "resize", "max", mount_point)
does not account for having multiple disks.

From the btrfs-filesystem man page (debian 11, Btrfs v5.10.1):

The devid can be found in the output of btrfs filesystem show and defaults to 1 if not specified.

Since a devid is not passed only the first disk will be resized, other disks will stay with "slack" space.

This is after I manually resized disk id 2 for testing, before it also had 3GiB slack:

root@test-vm:~# btrfs device usage /
/dev/sda1, ID: 1
   Device size: 4.00GiB
   Device slack: 3.50KiB
   Data,RAID10: 310.25MiB
   Metadata,RAID10: 64.00MiB
   System,RAID10: 8.00MiB
   Unallocated: 3.62GiB

/dev/sdb1, ID: 2
   Device size: 4.00GiB
   Device slack: 3.50KiB
   Data,RAID10: 310.25MiB
   Metadata,RAID10: 64.00MiB
   System,RAID10: 8.00MiB
   Unallocated: 3.62GiB

/dev/sdc1, ID: 3
   Device size: 4.00GiB
   Device slack: 3.00GiB
   Data,RAID10: 310.25MiB
   Metadata,RAID10: 64.00MiB
   System,RAID10: 8.00MiB
   Unallocated: 640.73MiB

/dev/sdd1, ID: 4
   Device size: 4.00GiB
   Device slack: 3.00GiB
   Data,RAID10: 310.25MiB
   Metadata,RAID10: 64.00MiB
   System,RAID10: 8.00MiB
   Unallocated: 640.73MiB

@ubuntu-server-builder ubuntu-server-builder added bug Something isn't working correctly launchpad Migrated from Launchpad labels May 12, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Richard Schwab(nothing4you) wrote on 2021-12-28T01:05:59.703006+00:00

Launchpad attachments: cloud-init.tar.gz

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2022-01-06T15:14:17.489796+00:00

Thank you for the detailed report. This is a use case we should support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant