I have a Debian 11 system on VirtualBox VM, and I am now trying to increase its disk size.
I create this Debian 11 with btrfs file system for my main division at the beginning, so right now, it should already run on btrfs system with my existed volume.
What I already done:
use fdisk to create a new section from the volume I added in my vdi file use order fdisk /dev/sda
, the new section called /dev/sda4
and
mkfs.btrfs -L extand /dev/sda4
to make it a btrfs file system.
so right now:
fdisk -l shows:
Disk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A5328659-9CBF-49AE-BF68-F9F4670D45C8
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 2050047 999424 488M Linux filesystem
/dev/sda3 2050048 16775167 14725120 7G Linux LVM
/dev/sda4 16775168 52428766 35653599 17G Linux filesystem
Disk /dev/mapper/debian--vg-root: 6.03 GiB, 6476005376 bytes, 12648448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/debian--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
btrfs filesystem show :
Label: none uuid: 3ea73e8c-64ac-442c-8c88-2675908cecdd
Total devices 1 FS bytes used 4.68GiB
devid 1 size 6.03GiB used 6.03GiB path /dev/mapper/debian--vg-root
Label: 'extand' uuid: ef622e2c-9c19-415e-a8d7-6e60ef448bc2
Total devices 1 FS bytes used 192.00KiB
devid 1 size 17.00GiB used 536.00MiB path /dev/sda4
df :
Filesystem 1K-blocks Used Available Use% Mounted on
udev 990920 0 990920 0% /dev
tmpfs 201748 20780 180968 11% /run
/dev/mapper/debian--vg-root 6324224 5103168 0 100% /
tmpfs 1008720 0 1008720 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
/dev/sda2 481642 87234 369423 20% /boot
/dev/sda1 523244 3484 519760 1% /boot/efi
tmpfs 201744 0 201744 0% /run/user/0
What should I do next?
I tried the resize2fs
, that doesn't work on btrfs file system, and I don't know how and where to mount the /dev/sda4 to use btrfs filesystem resize
order.