Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Merge EXT4 partitions?

  1. #1
    Join Date
    Mar 2008
    Location
    Ireland
    Beans
    831
    Distro
    Ubuntu 17.10 Artful Aardvark

    Merge EXT4 partitions?

    How would this be done? I installed Gparted but it doesnt seem to give me an option to merge. The default disk tool doesn't give me any options either.

    Help! My current partition is 90% full so this is quite urgent!
    Projects - PhotoFlare Image Editor | Xwii | URT-2D | BHR
    Hardware - System 76 - Galago UltraPro

  2. #2
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,096
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Merge EXT4 partitions?

    There's no option for 'merging' partitions in GParted. You'll have to do it manually.

    You need to update your backup of your data which you (of course) keep on some other disk or media
    Then simply copy files from the partition (file system) you don't want to the other one that you do want to keep.
    Finally use GParted to delete the partition you don't want and resize the one containing your files you do want to fill the new empty disk space.
    Ubuntu user since 2004 (Warty Warthog)

  3. #3
    Join Date
    Mar 2008
    Location
    Ireland
    Beans
    831
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Merge EXT4 partitions?

    Ok I want the free space of 1 in this picture to be part of 2. So do I just click resize on partition marked as 2?

    There is no data on the unallocated space so its pretty safe.

    Attached Images Attached Images
    Projects - PhotoFlare Image Editor | Xwii | URT-2D | BHR
    Hardware - System 76 - Galago UltraPro

  4. #4
    Join Date
    Feb 2010
    Location
    U.K.
    Beans
    782
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Merge EXT4 partitions?

    Looks like you need to resize the extended partition sda3 first before then resizing sda7 within it.

    It will probably take a fair amount of time to do. And as with anything partition related - back up first - things can go wrong.

    And why 3 swap partitions?

  5. #5
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,096
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Merge EXT4 partitions?

    I installed Gparted but it doesnt seem to give me an option to merge.
    Also you shouldn't be working on a file system while it's mounted.
    You'll need to right-click on your swap areas and click 'swapoff' to unmount those, and even more to the extreme, if /dev/sad7 is really the / (or 'root) partition of the operating system you installed GParted in you probably won't be able to do anything. By the looks of your GParted screencap it is.

    Remember Ubuntu is free and it's unrestricted so you can install as many different copies of it as you like. The best way to use GParted for working on your computer's hard disk(s) is to run it from another operating system. An auxiliary Ubuntu installation in in a different hard disk or a USB flash memory stick would be ideal, or even just boot your Ubuntu Live CD which you probably used for installing with.

    If you're looking for a nice light-weight distro that has the most up to date version of GParted plus a number of other useful applications you might consider downloading yourself a copy of Parted Magic Live CD, (or USB).
    Ubuntu user since 2004 (Warty Warthog)

  6. #6
    Join Date
    Mar 2008
    Location
    Ireland
    Beans
    831
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Merge EXT4 partitions?

    And why 3 swap partitions?
    The extra swap partitions were created when I was messing with partitions and trying to merge them.

    So today I decided to delete the additional swap partitions. Turns out it wasn't a great idea as now my PC is not able to boot!

    I get a message:

    Error: No such partition
    grub rescue>
    I am posting this from an Ubuntu live disk... is there any way to recover from this without doing a re-install?
    Projects - PhotoFlare Image Editor | Xwii | URT-2D | BHR
    Hardware - System 76 - Galago UltraPro

  7. #7
    Join Date
    Mar 2008
    Location
    Ireland
    Beans
    831
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Merge EXT4 partitions?

    Ah my technical skills are better than I thought. Fixed my grub by using the terminal through the live CD.

    Now I have already expanded the disk to take back the extra swap space. However I think Gparted only allows you to expand if the unallocated space is next to a white section of the disk partition.

    However in this picture you will see its next to the yellow data section of the partition. I don't think there is a way to get this space onto the Linux disk!
    Attached Images Attached Images
    Projects - PhotoFlare Image Editor | Xwii | URT-2D | BHR
    Hardware - System 76 - Galago UltraPro

  8. #8
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,096
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Merge EXT4 partitions?

    The yellow and white areas are no more than a graphical representation showing how full your file system is, but you are correct in your observation that it's much easier to move the 'end', (or right) of the ext file system than it is to move the start (or left) of it.

    Not so long ago it was not really considered possible to 'move' that end of a partition containing a Gnu/Linux file system.
    GParted does have the ability to resize Gnu/Linux file systems and partitions to the left and has been able to do that for some time now, but it seems to take almost forever to do it, especially if you have a large partition containing a lot of files.

    A much faster but slightly more complicated way to move the partition to the left would be to first remove all the files, (to your backup disk or even better, to a second backup), then resize the partition as small as possible.
    Then just use the copy and paste function in GParted to copy the entire partition and paste it to a new location to the left.
    Delete the original copy of the partition and resize the new copy to the right, then copy the files back in again.
    It's more work for the user, but if you're waiting to use the computer for something it can save a lot of time.

    A problem that can happen is if you have already removed as many files as you can and resized as small as possible, but the partition is still to large to fit in the free space area.
    That's when GParted's ability to resize Gnu/Linux partitions (file systems) to the left comes in handy.
    It's also the easiest for the user, especially if you have lots of time and are in no hurry to use the computer for a while. (Like maybe you have some other computer to use in the meantime, or are planning on being away or asleep, etc.
    Last edited by Herman; December 15th, 2011 at 07:43 PM. Reason: corrections
    Ubuntu user since 2004 (Warty Warthog)

  9. #9
    Join Date
    Mar 2008
    Location
    Ireland
    Beans
    831
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Merge EXT4 partitions?

    So Gparted can attach this space to the left? It seems to me that it won't allow it.
    Projects - PhotoFlare Image Editor | Xwii | URT-2D | BHR
    Hardware - System 76 - Galago UltraPro

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Merge EXT4 partitions?

    You cannot attach it to the left. You have to move extended partition left and then move your ext4 partition left and expand to the right. The move to the left can take a very long time and has then a higher risk as a power failure or other issues may corrupt entire system. That is why everyone discusses good backups. You have to do this from liveCD so you can unmount & swapoff mounted partitions (little key shows mounted).

    Another alternative or two. With Windows dual booting, it is better to have a shared read/write NTFS partition for any data you may want in both systems. Then you can make the Windows system much smaller like 50GB and make it read only in Ubuntu. You then can either make a Linux data partition out of the other free space or move /home into the free space.
    You may then move some data from your / (root) into the data or NTFS shared partitions and have more total space. The disadvantage is you have several data partitions and have to plan or organize where you put data and how much goes into each partition. If interested in data partition(s) I have posted it many times and can link to that or post again.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •