Linux – expand btrfs partition

To format existing partition to btrfs:

#mkfs.btrfs -L btrfs /dev/sda3 -f
btrfs-progs v4.19.1
See http://btrfs.wiki.kernel.org for more information.

Label:              btrfs
UUID:               9d900959-0054-42a4-b99b-ad8eff6b6490
Node size:          16384
Sector size:        4096
Filesystem size:    2.14TiB
Block group profiles:
  Data:             single            8.00MiB
  Metadata:         DUP               1.00GiB
  System:           DUP               8.00MiB
SSD detected:       no
Incompat features:  extref, skinny-metadata
Number of devices:  1
Devices:
   ID        SIZE  PATH
    1     2.14TiB  /dev/sda3

check format of existing partitions:

# fsck -N /dev/sda3
fsck from util-linux 2.36.2
[/sbin/fsck.btrfs (1) -- /dev/sda3] fsck.btrfs /dev/sda3
# fsck -N /dev/sda2
fsck from util-linux 2.36.2
[/sbin/fsck.btrfs (1) -- /] fsck.btrfs /dev/sda2
# lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 vfat   FAT32       72C7-9A85                               506M     1% /boot/efi
├─sda2 btrfs              515d42a1-b51b-4d8c-8268-9731fd1912e9  529.8M    95% /
├─sda3 btrfs        btrfs 9d900959-0054-42a4-b99b-ad8eff6b6490
└─sda4 swap   1           e64e50b3-47c8-45fe-8743-de8dcf512664                [SWAP]

Check existing brfs partition:

# btrfs device usage /
/dev/sda2, ID: 1
   Device size:            40.00GiB
   Device slack:              0.00B
   Data,single:            37.94GiB
   Metadata,DUP:            2.00GiB
   System,DUP:             64.00MiB
   Unallocated:             1.00MiB

Add sda3 to existing btrfs partition:

# btrfs device add /dev/sda3 /
/dev/sda3 appears to contain an existing filesystem (btrfs).
ERROR: use the -f option to force overwrite of /dev/sda3
# btrfs device add /dev/sda3 / -f
# btrfs device usage /
/dev/sda2, ID: 1
   Device size:            40.00GiB
   Device slack:              0.00B
   Data,single:            37.94GiB
   Metadata,DUP:            2.00GiB
   System,DUP:             64.00MiB
   Unallocated:             1.00MiB

/dev/sda3, ID: 2
   Device size:             2.14TiB
   Device slack:              0.00B
   Unallocated:             2.14TiB

Job Done

Reference:

https://www.man7.org/linux/man-pages/man8/mkfs.btrfs.8.html

https://linuxhint.com/resize_a_btrfs_filesystem/

Expanding Array on HP ProLiant server

Stage 1 – Physically install the HDDs

Stage 2 – Expand the Array

  1. Start HP Array Configuration Utility:
  1. Select Array that you want to expand and click the Expand Array Button:
Once you press Save the array will start the transformation process.
The speed will depend on amount of data on the existing array and size of the array.
In this example the existing drive has 135GB size with 15GB free:
The expansion rate was approx 9GB per hour
While the process is running you will see these alerts:
You can further increase the speed of the transformation by changing the controller settings (set transformation priority to High):
Changing the priority to High might have an impact on server performance (read/write operations)

Stage 3 – Extend Logical Drive

Select the drive that you want to extend and click the Extend Logical Drive:

accept the default and click save

Read the warning and Click OK
(it basically says that if you are running windows 2000 you might have problems, otherwise you are fine)

That process usually takes just a few seconds/minutes (press refresh button to confirm it’s finished)
To verify open Windows Computer Management/Disk Management:

Stage 4 – Extend OS volume

From command prompt issue commands as listed below:

Verify that all went OK: