Enlarging BTFS filesystem on Tumbleweed.
I want to enlarge the file system on my Tumbleweed partition and even after Googling the situation, I feel the whole procedure is definitely above my pay grade :) I have a 500 gig main drive split into various partitions. Disk /dev/sda: 447.13 GiB, 480103981056 bytes, 937703088 sectors Disk model: KINGSTON SA400S3 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: dos Disk identifier: 0xf73048ad Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 489330687 489328640 233.3G 83 Linux /dev/sda3 489334782 937699691 448364910 213.8G 5 Extended /dev/sda5 489334784 712566783 223232000 106.4G 83 Linux /dev/sda6 712568832 933502975 220934144 105.3G 83 Linux /dev/sda7 933505024 937699691 4194668 2G 82 Linux swap / Solaris Tumbleweed is on sda6, Debian Sid on sda1 using ext4, Fedora is on sda5 also with ext4 with swap space on sda7. I would like to delete Fedora from sda5 and enlarge sda6 to include that space . I'm planning KVM in Tumbleweed with a version of Fedora. What is the best way to go about this? I know partition work can only be done with the disk not mounted so it appears I'd have to boot from an external utility. If possible I'd like suggestions on the best way to proceed. From what I've read a BTRFS file system can only be enlarged from the front and not from the rear? All help appreciated. Thanks
W dniu 2.03.2023 o 21:49, Frank McCormick pisze:
I want to enlarge the file system on my Tumbleweed partition and even after Googling the situation, I feel the whole
procedure is definitely above my pay grade :)
I have a 500 gig main drive split into various partitions.
Disk /dev/sda: 447.13 GiB, 480103981056 bytes, 937703088 sectors Disk model: KINGSTON SA400S3 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: dos Disk identifier: 0xf73048ad
Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 489330687 489328640 233.3G 83 Linux /dev/sda3 489334782 937699691 448364910 213.8G 5 Extended /dev/sda5 489334784 712566783 223232000 106.4G 83 Linux /dev/sda6 712568832 933502975 220934144 105.3G 83 Linux /dev/sda7 933505024 937699691 4194668 2G 82 Linux swap / Solaris
Tumbleweed is on sda6, Debian Sid on sda1 using ext4, Fedora is on sda5 also with ext4 with swap space on sda7.
I would like to delete Fedora from sda5 and enlarge sda6 to include that space . I'm planning KVM in Tumbleweed with a version
of Fedora.
What is the best way to go about this? I know partition work can only be done with the disk not mounted
so it appears I'd have to boot from an external utility. If possible I'd like suggestions on the best way to
proceed.
From what I've read a BTRFS file system can only be enlarged from the front and not from the rear?
All help appreciated.
Thanks
Partitions can be enlarged by appending free space at the end. If you want to delete sda5 and enlarge sda6, that's not directly supported. You can instead try to copy your sda6 to sda5 (using dd command; you're lucky that sda5 is not smaller than sda6) and then delete sda6 and enlarge sda5. Some filesystems can be enlarged even when mounted. ext4, btrfs, xfs and many others can do. Before doing anything make sure to have a backup of important data. Also make sure that in /etc/fstab and /etc/default/grub there are no "/dev/sda*" but UUID. Otherwise your system will not boot if "/dev/sda*" numbering changes. I suggest using YaST2 Partitioner or gparted. They make life easier. To perform your changes from external system, I have 2 suggestions: - openSUSE Rescue LiveCD (go to https://get.opensuse.org/tumbleweed/ , select "Download" and then "Alternative Downloads") - SystemRescueCd https://www.system-rescue.org/ And for the future I suggest using LVM (you can't use it now, because you would need to wipe the whole disk). With it you wouldn't need to worry about partitions order.
On 3/2/23 16:33, Adam Mizerski wrote:
W dniu 2.03.2023 o 21:49, Frank McCormick pisze:
I want to enlarge the file system on my Tumbleweed partition and even after Googling the situation, I feel the whole
procedure is definitely above my pay grade :)
//snip//
What is the best way to go about this? Partitions can be enlarged by appending free space at the end. If you want to delete sda5 and enlarge sda6, that's not directly supported. You can instead try to copy your sda6 to sda5 (using dd command; you're lucky that sda5 is not smaller than sda6) and then delete sda6 and enlarge sda5.
I assume that after the copy I'd have to update grub otherwise it would refer to the old installation.
Some filesystems can be enlarged even when mounted. ext4, btrfs, xfs and many others can do.
Before doing anything make sure to have a backup of important data. Also make sure that in /etc/fstab and /etc/default/grub there are no "/dev/sda*" but UUID. Otherwise your system will not boot if "/dev/sda*" numbering changes.
/etc/fstab is all UUID.
I suggest using YaST2 Partitioner or gparted. They make life easier.
To perform your changes from external system, I have 2 suggestions: - openSUSE Rescue LiveCD (go to https://get.opensuse.org/tumbleweed/ , select "Download" and then "Alternative Downloads") - SystemRescueCd https://www.system-rescue.org/ I now have openSUSE rescue on a flashdrive...
And for the future I suggest using LVM (you can't use it now, because you would need to wipe the whole disk). With it you wouldn't need to worry about partitions order.
I'll keep it in mind for next time. Thanks for all that information.
Am 02.03.23 um 21:49 schrieb Frank McCormick:
I want to enlarge the file system on my Tumbleweed partition and even after Googling the situation, I feel the whole
procedure is definitely above my pay grade :)
I have a 500 gig main drive split into various partitions.
Disk /dev/sda: 447.13 GiB, 480103981056 bytes, 937703088 sectors Disk model: KINGSTON SA400S3 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: dos Disk identifier: 0xf73048ad
Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 489330687 489328640 233.3G 83 Linux /dev/sda3 489334782 937699691 448364910 213.8G 5 Extended /dev/sda5 489334784 712566783 223232000 106.4G 83 Linux /dev/sda6 712568832 933502975 220934144 105.3G 83 Linux /dev/sda7 933505024 937699691 4194668 2G 82 Linux swap / Solaris
Tumbleweed is on sda6, Debian Sid on sda1 using ext4, Fedora is on sda5 also with ext4 with swap space on sda7.
I would like to delete Fedora from sda5 and enlarge sda6 to include that space . I'm planning KVM in Tumbleweed with a version
of Fedora.
What is the best way to go about this? I know partition work can only be done with the disk not mounted
so it appears I'd have to boot from an external utility. If possible I'd like suggestions on the best way to
proceed.
From what I've read a BTRFS file system can only be enlarged from the front and not from the rear?
All help appreciated.
Thanks
Only some suggestions: 1) boot from external, i use systemrescuecd for that. OR from a second opensuse on a second installed hard drive. (using boot options in bios) 2) backup whole disk (not only partition) (dd+(p)bz2) to another large disk. example: dd ibs=1024 if=/dev/sda conv=noerror,sync | pbzip2 -c > /path/to/destination/backup-sda.img.bz2 (parallelbzip2 has to be installed for this example) 3) use gparted (graphical interface): delete what ever partition you like to delete, then move partitions so that you will get at the end of your partition you like to enlarge have free space. then enlage the partition. 4) if nessecarry, change your fstab file. done. ps: in gparted you can check what it can do with which filesystem. if you start it from your own nstallation of opensuse, maybe not all neccesarry backend programms are installed. (from system rescue cd it should installed) when not mount then: btrfs setup, move,enlarge, shrink, copy, check, change uuid, changename ext4 same swap same without changename if its mount (i would never change anything when mount) some options are not possible. simoN -- www.becherer.de ----------------------------------------------- - Das ist die vorlaeufig endgueltige Version! - Herbert C. Maier Dipl.-Ing. (FH) -----------------------------------------------
participants (3)
-
Adam Mizerski
-
Frank McCormick
-
Simon Becherer