Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Linux Programming
  4. Shrinking root partiton

Shrinking root partiton

Scheduled Pinned Locked Moved Linux Programming
linuxquestion
7 Posts 5 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    megaadam
    wrote on last edited by
    #1

    On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience? And just trying to wrap my head around it is there "one filesystem size and one partition size?" I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning. Thanks : )

    "If we don't change direction, we'll end up where we're going"

    K J J K 4 Replies Last reply
    0
    • M megaadam

      On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience? And just trying to wrap my head around it is there "one filesystem size and one partition size?" I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning. Thanks : )

      "If we don't change direction, we'll end up where we're going"

      K Offline
      K Offline
      k5054
      wrote on last edited by
      #2

      When you try to resize the filesystem, are you entering numbers in the edit boxes, or using the slider? gparted won't resize the filesystem if the "Free Space Following" box is 0. Using the slider, the Free space following will automatically be filled in as you move the right-hand endpoint. A quick google search doesn't suggest that there are any issues with resize2fs, and in any case, if you watch the gparted screen, it uses resize2fs to do its work behind the scenes, anyway. But, as always, when modifying a filesystem, a backup of important data is wise. At the very least, go out and get yourself a USB drive of a suitable size to store your data, and back it up before proceeding. Then you're covered if the worst happens. Or if you just want to start again. Edit: I'd add that if your drive is more than 3-5 years old you should consider replacing it anyway.

      Keep Calm and Carry On

      M 2 Replies Last reply
      0
      • M megaadam

        On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience? And just trying to wrap my head around it is there "one filesystem size and one partition size?" I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning. Thanks : )

        "If we don't change direction, we'll end up where we're going"

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        I guess you could take the view that if it isn't important just overwrite everything. But if is is important you should have a back up anyways so another drive, just for that reason, makes sense. And then less risky if there is a problem (and you end up needing a complete re-install anyways.)

        megaadam wrote:

        I have 0.6 TB of data,

        And I just checked Amazon and first 1 TB usb drive is only $40 but 4th one down is only $20.

        1 Reply Last reply
        0
        • K k5054

          When you try to resize the filesystem, are you entering numbers in the edit boxes, or using the slider? gparted won't resize the filesystem if the "Free Space Following" box is 0. Using the slider, the Free space following will automatically be filled in as you move the right-hand endpoint. A quick google search doesn't suggest that there are any issues with resize2fs, and in any case, if you watch the gparted screen, it uses resize2fs to do its work behind the scenes, anyway. But, as always, when modifying a filesystem, a backup of important data is wise. At the very least, go out and get yourself a USB drive of a suitable size to store your data, and back it up before proceeding. Then you're covered if the worst happens. Or if you just want to start again. Edit: I'd add that if your drive is more than 3-5 years old you should consider replacing it anyway.

          Keep Calm and Carry On

          M Offline
          M Offline
          megaadam
          wrote on last edited by
          #4

          Thanks, I have tried every knob in GUI, including the ones you mention. Typing any high (GB) value into Free Space Following? It just snaps back to some low (MB) value. Seems that "minimum size" really is a minimum. I will borrow a TBdisk somewhere and try the somewhat promising resize2fs.

          "If we don't change direction, we'll end up where we're going"

          1 Reply Last reply
          0
          • K k5054

            When you try to resize the filesystem, are you entering numbers in the edit boxes, or using the slider? gparted won't resize the filesystem if the "Free Space Following" box is 0. Using the slider, the Free space following will automatically be filled in as you move the right-hand endpoint. A quick google search doesn't suggest that there are any issues with resize2fs, and in any case, if you watch the gparted screen, it uses resize2fs to do its work behind the scenes, anyway. But, as always, when modifying a filesystem, a backup of important data is wise. At the very least, go out and get yourself a USB drive of a suitable size to store your data, and back it up before proceeding. Then you're covered if the worst happens. Or if you just want to start again. Edit: I'd add that if your drive is more than 3-5 years old you should consider replacing it anyway.

            Keep Calm and Carry On

            M Offline
            M Offline
            megaadam
            wrote on last edited by
            #5

            In case you were wondering the issue was... It seems highly probable that it was LVM [Linux Volume Manager or similar]. This management layer effectively blocks gParted. There are separate tools for LVM. How to Shrink an LVM Volume Safely on Linux[^] https://askubuntu.com/questions/196125/how-can-i-resize-an-lvm-partition-i-e-physical-volume[^] So I did learn something... but with the elephant-up that LVM was giving me... I will probably nuke the disk anyway and go for the more contemporary zfs :p

            "If we don't change direction, we'll end up where we're going"

            1 Reply Last reply
            0
            • M megaadam

              On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience? And just trying to wrap my head around it is there "one filesystem size and one partition size?" I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning. Thanks : )

              "If we don't change direction, we'll end up where we're going"

              J Offline
              J Offline
              Jeremy Falcon
              wrote on last edited by
              #6

              Preface, I am not an expert on ext4 at all. But in general, shrinking a file system is a bit riskier than expanding one, but in practice not much more risky than defragmenting. Still, as mentioned, if your data is important, it should be backed up. If it's not, then the next time you install Linux consider having a separate partition for your user files that will remain if even if you wipe the OS one for a reinstall.

              Jeremy Falcon

              1 Reply Last reply
              0
              • M megaadam

                On my home Linux box I want to shrink my root 1.8 TB partition (ext4). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. Googling til the end of elephanting times led me to resize2f2 how dangerous is that, in your experience? And just trying to wrap my head around it is there "one filesystem size and one partition size?" I actually want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning. Thanks : )

                "If we don't change direction, we'll end up where we're going"

                K Offline
                K Offline
                kdbueno
                wrote on last edited by
                #7

                subservient partitioning works.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups