How can one change the current partition lay-out of a running Tumbleweed system?
The current lay-out is this (with /dev/nvme0n1p5 being divided in different btrfs ‘subpartitions’ as suggested by the installer):
|**Partition
|
**|**Type
**|**Mount Point
**|**Label
**|**Partition Label
**|**Size
**|**Used
**|
|/dev/nvme0n1p1
|fat32
|/boot/efi
|SYSTEM_DRV
|EFI Reserved Partition
|260,00 MB
|44,66MB
|
|/dev/nvme0n1p2
|unknown
|||Microsoft Reserved Partition
16,00MB
/dev/nvme0n1p3
ntfs
Basic Data Partition
200,00GB
101,18GB
unallocated
unknown
—
/dev/nvme0n1p5
brtfs
/
81,99GB
/dev/nvme0n1p6
linuxswap
swap
0B
/dev/nvme0n1p4
ntfs
Basic Data Partition
1,95GB
593,57GB
I’d like to incorporate the unallocated space in /dev/nvme0n1p5, keep the Windows installation as-is and increase the size of the swap space, ideally without reinstalling everything. KDE Partition Manager doesn’t seem able to handle this scenario however. If necessary I can also boot a live USB stick.
You seem to think that reorganizing your complete system while it is running is possible (you say “How can one change the current partition lay-out of a running Tumbleweed system?” and you try a partitioning tool from your desktop). This is not the case (like you can not change the tires of your car while driving).
So you need a (maybe called life/rescue system) booted from another medium then the disk you want to reorganize.
And be prepared that this is not that easy. The unallocated space that you want to add to partition 5 is before it and not contiguous at it’s end. Thus a lot of moving back and forward is involved. And a serious thought out plan should be made.
Whatever you decide to do in the end, make extra backups of everything before you start.
If it is not enough to just boot into a live USB stick and change the partitioning, how do I do such moving back and forth? I presume that just copying my user files is not enough here. What plan needs to be made in this situation?
Hi
Just use YaST Partitioner to create say an xfs partition, mount as say /data and use as required… eg as root user create a directory called for example mystuff and change the owner to your user and group, and use as required.
I use something similar with a /data partition and have directories for example Documents, then in my $HOME directory I remove the created one and softlink to the /data/Documents one.
Remove existing partition 5 from btrfs. This will move all data to the new device.
Delete existing partition 5
Add its space to the new partition (partition 5 will now be after the new partition)
Enlarge btrfs on the new partition
Every step can be done online and you should be able to reboot while 2 is running. One may even stop at step 1, but having multiple devices complicates management so if possible I would rather avoid it.
Of course having separate filesystem for data has it own advantages, so it is up to the user to decide.
The easiest option available is booting into the live USB stick. Use gparted to move and resize /dev/nvme0n1p5. However this will go wrong when interrupted for some reason and you may need to reinstall.
A safe option is to create a new partition /dev/nvme0n1p7. Add this device to the existing btrfs. You can do this while booted into Tumbleweed. When done remove /dev/nvme0n1p5 and resize both /dev/nvme0n1p7 and btrfs. Documentation says snapper works only with single devices. Thus disable it before adding the new device and re-enable it when done.
Use of swap is questionable. You may omit it. If this causes issues on your system you can add it again without further ado.