Moving btrfs to the left

First of all, I do have to say that the feeling of Garuda is pretty nice after some modification. I’ve dual booted KDE Neon with Garuda, which was working pretty well, but now i want to wipe KDE Neon and use Garuda completely

The Problem: The btrfs partition is at (almost) the end of the disk. KDE neon sits before garuda.

What I thought: I could boot a random live stick lying around and use GParted to move the btrfs partition to the left and expand it.
My concern is that, when I move the whole partition is, that I might scramble the boot part (or anything else) of it or am I safe because the boot partition is separate from the btrfs.
I couldn’t find much documentation about it or I am just over reacting.

Does anybody know what would be best to do?

Layout of the Partitions

nvme0n1     259:0    0 465.8G  0 disk
## here is 1MB unallocated
├─nvme0n1p1 259:1    0   300M  0 part /boot/efi
##here is 293GB unallocated
├─nvme0n1p3 259:2    0  34.4G  0 part [SWAP]
└─nvme0n1p4 259:3    0 137.6G  0 part /var/tmp
/var/log
/var/cache
/home
/root
/srv
/

The /boot/efi seems to be a leftover of KDE neon (which I am not using).
The swap memory is at the end.

System:
Kernel: 6.12.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=a2757781-af6f-4193-be47-e69e126d1168 rw rootflags=subvol=@
quiet loglevel=3 ibt=off
Desktop: KDE Plasma v: 6.2.5 tk: Qt v: N/A info: frameworks v: 6.10.0
wm: kwin_wayland vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Desktop System: Micro-Star product: MS-7B46 v: 2.0
serial: <superuser required>
Mobo: Micro-Star model: Z370 SLI PLUS (MS-7B46) v: 2.0
serial: <superuser required> uuid: <superuser required>
UEFI: American Megatrends v: A.90 date: 01/07/2020
CPU:
Info: model: Intel Core i7-8700K bits: 64 type: MT MCP arch: Coffee Lake
gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6
model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF8
Topology: cpus: 1x dies: 1 clusters: 6 cores: 6 threads: 12 tpc: 2
smt: enabled cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB
desc: 6x256 KiB L3: 12 MiB desc: 1x12 MiB
Speed (MHz): avg: 5006 min/max: 800/5000 scaling: driver: intel_pstate
governor: powersave cores: 1: 5006 2: 5006 3: 5006 4: 5006 5: 5006 6: 5006
7: 5006 8: 5006 9: 5006 10: 5006 11: 5006 12: 5006 bogomips: 88796
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA TU102 [GeForce RTX 2080 Ti Rev. A] vendor: Gigabyte
driver: nvidia v: 565.77 alternate: nouveau,nvidia_drm non-free: 550/565.xx+
status: current (as of 2025-01; EOL~2026-12-xx) arch: Turing code: TUxxx
process: TSMC 12nm FF built: 2018-2022 pcie: gen: 2 speed: 5 GT/s
lanes: 16 link-max: gen: 3 speed: 8 GT/s ports: active: none off: DP-3
empty: DP-1, DP-2, HDMI-A-1, Unknown-2 bus-ID: 01:00.0 chip-ID: 10de:1e07
class-ID: 0300
Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
compositor: kwin_wayland driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch display-ID: 0
Monitor-1: DP-3 model: Samsung LC34G55T serial: <filter> built: 2024 res:
mode: 3440x1440 hz: 165 scale: 125% (1.25) to: 2752x1152 dpi: 109 gamma: 1.2
size: 798x334mm (31.42x13.15") diag: 869mm (34.2") modes: max: 3440x1440
min: 640x480
API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia gbm:
drv: nvidia surfaceless: drv: nvidia wayland: drv: nvidia x11: drv: nvidia
API: OpenGL v: 4.6.0 vendor: nvidia v: 565.77 glx-v: 1.4
direct-render: yes renderer: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
memory: 10.74 GiB display-ID: :1.0
API: Vulkan v: 1.4.303 layers: 11 device: 0 type: discrete-gpu name: NVIDIA
GeForce RTX 2080 Ti driver: N/A device-ID: 10de:1e07
surfaces: xcb,xlib,wayland
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor gpu: corectrl, nvidia-settings,
nvidia-smi wl: wayland-info x11: xdpyinfo, xprop, xrandr
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
chip-ID: 8086:a2f0 class-ID: 0403
Device-2: NVIDIA TU102 High Definition Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:10f7 class-ID: 0403
Device-3: Mark of the Unicorn M Series driver: cdc_acm,snd-usb-audio
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-2:3
chip-ID: 07fd:000b class-ID: 0a00 serial: <filter>
API: ALSA v: k6.12.9-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e
v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
IF: eno1 state: down mac: <filter>
Device-2: Aquantia AQtion AQC107 NBase-T/IEEE 802.3an Ethernet [Atlantic
10G] driver: atlantic v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 4
port: N/A bus-ID: 03:00.0 chip-ID: 1d6a:07b1 class-ID: 0200 temp: 58.0 C
IF: enp3s0 state: up speed: 2500 Mbps duplex: full mac: <filter>
Info: services: NetworkManager, sshd, systemd-timesyncd
Drives:
Local Storage: total: 6.15 TiB used: 120.17 GiB (1.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Seagate model: FireCuda 510 SSD
ZP500GM30001 size: 465.76 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: STOSC014
temp: 42.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:4 vendor: Samsung
model: MZVLW256HEHP-000H1 size: 238.47 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: CXB73H1Q temp: 37.9 C scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST6000DM003-2CY186
size: 5.46 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5425 serial: <filter> fw-rev: 0001 scheme: GPT
Partition:
ID-1: / raw-size: 137.64 GiB size: 137.64 GiB (100.00%)
used: 120.16 GiB (87.3%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:3
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 10 MiB (3.3%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 137.64 GiB size: 137.64 GiB (100.00%)
used: 120.16 GiB (87.3%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:3
ID-4: /var/log raw-size: 137.64 GiB size: 137.64 GiB (100.00%)
used: 120.16 GiB (87.3%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:3
ID-5: /var/tmp raw-size: 137.64 GiB size: 137.64 GiB (100.00%)
used: 120.16 GiB (87.3%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:3
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 31.28 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo-rle,lzo,lz4,lz4hc,deflate,842 max-streams: 12
dev: /dev/zram0
ID-2: swap-2 type: partition size: 34.4 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:2
Sensors:
System Temperatures: cpu: 32.0 C mobo: N/A
Fan Speeds (rpm): N/A
Info:
Memory: total: 32 GiB available: 31.28 GiB used: 3.76 GiB (12.0%)
Processes: 342 Power: uptime: 4m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 12.46 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 257 default: graphical
tool: systemctl
Packages: pm: dpkg pkgs: 0 pm: pacman pkgs: 1974 libs: 581
tools: octopi,pamac,paru pm: flatpak pkgs: 0 Compilers: clang: 19.1.6
gcc: 14.2.1 alt: 13 Shell: garuda-inxi default: fish v: 3.7.1
running-in: konsole inxi: 3.3.37
Garuda (2.6.26-1.1):
System install date:     2024-11-30
Last full system update: 2025-01-15
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       Probably (Run as root to verify)
Failed units:

you can modify the partition size, just not delete any of them

It Should WorkTM, however all partitioning operations carry a risk of data loss. Compared to other more common partitioning operations, moving a partition “to the left” is generally more complex and carries additional risks. You should make sure your backups are appropriate for a data loss event before you begin.

5 Likes

I mean is grub inside the btrfs partition? If so, would chroot outside the os to update grub be enough to get the bootloader back?

At the moment sadly I don’t have “adequate” gear for backup, since every drive is needed as is in my setup. This is my main workstation to get a lot of things done and I’ve used alot of time to make garuda to my likings (setup printers, “de-rice”, moved my applications and configs), which I would try to avoid.

This is the reason why I am asking here, maybe someone had the same issue and tried it itself.

In the end, I’ll try it out and see what happens and leave this post as documentation for the next user.

i would backup the dot files to like google drive or something so you dont have to configure the looks an shortcuts an all that.
Make sure to not remove the fat partition that hold the boot info. Moving the first sector of a partition is always sketchy so have a usb with garuda on it just in case.

With Btrfs, you can add the other partition to your btrfs filesystem. You don’t need to move anything. This is one of the advantages of using Btrfs, the data doesn’t need to be contiguous.

You just use btrfs device add to add the partition to / and then run btrfs balance.

No, this is your EFI partition. You are absolutely using it.

The part of grub that begins the boot process is actually in the EFI partition.

As long the identifier grub is using to find the / filesystem doesn’t change, you won’t need to change grub.

5 Likes

I did that what you said and added btrfs device add nvme0n1p2 / and did btrfs balance / which went fast (2mins).
Now it seems to work, I have more space on the root disk, but the KDE-partition manager shows it is still unallocated (unknown) and without a lock… the system partition is already full, and it does work indeed.
Dolphin shows me an option to mount this 293gb drive, but nothing happens when I click it (no error).

Edit: Typo

Have you rebooted? It is possible that KDE partition manager just doesn’t understand that config.

2 Likes

well umm, I did…
now inam unable to boot at all. It jumped right into grub rescue, and with all possible ls (hdX,Y) it says filesystem not readable. Whilst trying to chroot into the system with a live stick, I couldn’t manage to mount the fs at all. Even in GParted says device 2 is missing…

You didnt remove the fat 32 partition thats located before the garuda btrfs partition. With the boot info did you?

no I didn’t, it still sits there untouched.


This is from the live stick, errors retrieved after trying to mount it

EDIT:
Okay I see what the problem now is. When I tried to add the btrfs device add nvme0n1p2 / it had an error, since before I ran that, I made the partition with the KDE-Partitionmanager. I removed that partition and ran the command again. It worked, why?
After that I ran btrfs balance / as dalto said. And it balanced itself. Now: It did everything somehow on unallocated space. I have no clue how this is even possible, but the system ran fine. After reboot, BOOM grub rescue. Neither in the grub rescue or on the live stick I could even mount the system, since it ‘balanced’ itself over the root partition and the unallocated space.
I love myself for not making a backup, so I lost everything.

Ah and the FAT32 partition is a leftover of the previous KDE neon instance

My tip for anyone trying to dual boot with an existing system trying to get away from the current system: put it on another disk, otherwise pray

Wait…are you positive you lost everything. It may just be a matter of properly mounting the filesystem.

How are you trying to mount it? Although, it is strange that it is showing as unallocated space.

Well, yes I am. It seems to be a bug of btrfs with writing to unallocated space.
I then tried to make a new btrfs filesystem over it and uhhhh… yeah didn’t work.

Thank you all for help aynways (no sarcasm intended).
I already have reinstalled garuda (I have work to be done and gladly there isn’t much ultra important data gone, it still is agonizing).

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.