[SOLVED] Expand BTRFS root in raid 1

elPresidente

New Member
Aug 4, 2022
3
0
1
Hello Forum,

I installed Proxmox and chose the option to use BTRFS in raid 1 configuration across 2 SSDs.

This has worked perfectly fine, but recently disk space is becoming low. I only have space for 2 drives in the case, so I would like to expand/replace these 2 drives with larger ones. I'm currently running Proxmox 7.2-7.

I've read the documentation page on BTRFS and searched this forum, but found no guidance for this procedure when using BTRFS, so...what's the most straight forward and reliable way to go about expanding/replacing the Proxmox boot/system disks?
 
For anyone else playing along, I seem to have had success in replacing 1 drive so far (in my case this was an nvme ssd).

Before doing anything I added the degraded option to the rootflags as shown here and made sure I could boot from a single drive.

Then I installed the new nvme ssd and booted form the gparted live usb. I used gparted to clone the partitions from the remaining proxmox drive to the blank nvme ssd. I didn't wait around for gparted to copy the full contents of btrfs data partition, but rather just made a blank btrfs partition of the same size. In hindsight it probably doesn't even need to be a formatted partition.

Then I booted proxmox and used the proxmox-boot-tool to format the new nvme ssd ESP partition.

Finally I used the btrfs replace command to replace the missing old nvme sdd btrfs partition with the new empty one.

I'm still to replace the other drive, and once I have I anticipate it should be possible to expand the btrfs partitions out to the full extent of the drive.
 
So I had to start over, as I found I couldn't boot from my newly replaced drive. Something with btrfs went south when only the new drive was in.

What ended up working was using the gparted live usb to setup the boot and EFI paritions (ensuring the flags were set as per the original proxmox drives).

Then I gradually swapped over to the new drives in a different system (with capacity for 3 drives), and used the gparted live usb to migrate the btrfs array across via the standard btrfs device add and delete commands.

After migrating to the first new drive, I placed 1 new and 1 old drive back into the system and used the proxmox-boot-tool to format and init the new drive, and verified I could boot from the new drive alone by removing the old one.

I repeated the above steps to replace the remaining drive with the 2nd newer one.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!