News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • /root full can't resize

    Posted on RetiredGeek Comment on the AskWoody Lounge

    This topic contains 8 replies, has 4 voices, and was last updated by  mn– 1 month, 2 weeks ago.

    • Author
      Posts
    • #2010496 Reply

      RetiredGeek
      AskWoody MVP

      Hey Y’all,

      I’m a relative newbie to Linux Mint and I’m having a problem with my /root being full and not being able to update.

      I’ve tried to purge the old versions of the kernel but it won’t run for lack of disk space. I’ve moved my Win 8.1 virtual machine files off to an network drive but still no luck.

      Next I tried resizing the disks with a USB key version of gparted. I managed to get that done but then the machine won’t boot. I tried MJP’s solution in #1971464 but I get an error when I try to install boot-repair (E: Unable to locate package boot-repair)?

      Here’s what gparted looks like before I started.
      gparted1
      GParted won’t let me resize the extended partition /dev/sda2 unless first delete /dev/sda5, but then of course it won’t boot.
      Sure glad I have Macrium Reflect Images of that drive!

      Ideas? (please be very specific for this newbie!)

      😎

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      Attachments:
    • #2010527 Reply

      mn–
      AskWoody Lounger

      Ok, this is a fairly standard thing… first, please confirm that it is indeed /root that is full and not /boot?

      The capture shows a /boot that is close to full, but doesn’t show a /root … which indeed usually isn’t a separate mount point but part of /. And if your / is full it’s a rather different situation than /boot being full.

      Oh hey, it says sda5 has LVM on it. That may or may not make this easier… might not even need to reboot at all before finishing, depending what’s actually in there.

      Having LVM means you can without rebooting move everything off sda5 and then do whatever with it, if you have other disks free. USB disk works, except leaving it there long term is a bit unwieldy. Especially if this is a laptop. I note you have only /dev/sda shown, do you have other physical disks attached?

      Reducing sda5 in place might be possible, but you need to resize 1) filesystem inside logical volume 2) logical volume inside PV 3) PV inside partition and finally 4) partition. You may also need to move extents within the PV to free up space at the appropriate physical location.

      Not all filesystem types can be reduced in size, though with some (ext2/3/4 at least) you can get a single command to do first 1 and then 2.

      As to how to do all this… well. There’s currently a bit of a lack of *good* graphical tools for this, but KVPM (if you can stomach some KDE dependencies) is what I’d start with. Gparted doesn’t deal with LVM internals.
      (I’m used to doing LVM work on the command line myself…)

      So. What do you have in the “mint-vg” volume group? (“sudo vgdisplay -v”, “sudo lvdisplay -v”, “ls -l /dev/mint-vg”, …)

    • #2015311 Reply

      RetiredGeek
      AskWoody MVP

      MN,

      Thanks for your thorough reply. Unfortunately, I got to it after I solved the problem, I should have subscribed to the topic my bad. When I get the time I’ll try messing with the LVM partitioning.

      I found that I could make space by using Update Manager to delete old versions of the kernel. I had tried to do this with instructions I found on the web using terminal but they all errored out for not enough space.

      For anyone who’s interested here the process to remove old kernels:

      1. Check that the kernel you want to remove isn’t Active.
        • Update Manager
        • View -> Linux Kernels
        • Click on the oldest kernel and make sure is doesn’t show as Active.
        • Click on the Remove button.
        • Provide your password.
        • Done
      2. Done, rinse wash repeat for all non-active kernels. You may want to keep one or to of the most current non-active kernels JIC  you have to revert. Note: You may see kernels that show an Install button, just ignore those.

      Another thing I discovered along the way was that the Repository keys can be invalid (out of date) you can fix this by:

      sudo apt-get –keyserver keys.gnupg.net –recv-keys 1397BC53640DB551

      -OR-

      wget -gO- https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add –

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2015313 Reply

      MrJimPhelps
      AskWoody_MVP

      Bruce:

      In the picture you posted, the slider bar is on the left end of the partition. I wonder if you could have perhaps grabbed it and slid it to the right, thereby shrinking the size of the partition.

      Of course, you would have first had to free up some space on the partition before shrinking it. I know this sounds like a dumb question, but were you not able to move a bunch of stuff from that partition to another? I moved all of my videos and pics to my 2nd hard drive to free up space on the drive, because it was full.

      Oh well, no matter. You got it done.

      Jim

      Group "L" (Linux Mint)
      with Windows 8.1 running in a VM
      • #2016010 Reply

        mn–
        AskWoody Lounger

        Of course, you would have first had to free up some space on the partition before shrinking it. I know this sounds like a dumb question, but were you not able to move a bunch of stuff from that partition to another?

        … and in this case it’s likely not even the case of the disk being *actually* full, it’s just that there’s an intermediate container layer involved that Gparted doesn’t handle.

        Because Gparted recognizes that the disk is full of a LVM “Physical Volume” container and then doesn’t look inside the container.

        LVM does make various kinds of interesting and useful things possible, but unavoidably more complicated as well.

        For anyone who’s interested here the process to remove old kernels

        … for most people, a “sudo apt-get autoremove” every now and then will remove some of those.

        The kernel branch metapackage system works with that, so theoretically you don’t have to prune old kernels by hand unless you also installed them by hand.

        Another thing I discovered along the way was that the Repository keys can be invalid (out of date) you can fix this by:

        sudo apt-get –keyserver keys.gnupg.net –recv-keys

        … of course then you’ll need to know *which* repository you need to rekey and choose the key id appropriately.

        Many of us have multiple repositories configured. You seem to be rekeying the Google repository here.

        • #2016171 Reply

          wavy
          AskWoody Plus

          mn

          LVM does make various kinds of interesting and useful things possible, but unavoidably more complicated as well.

          quote feature did not work quite right there

          I was wondering what LVM was useful for, Wikipedia seemed to be saying it was for spanning physical disks as one volume (like a dynamic disk for windows). For a single disk what advantages are there for a LVM setup?

          🍻

          Just because you don't know where you are going doesn't mean any road will get you there.
          • This reply was modified 1 month, 2 weeks ago by  wavy.
          • #2016234 Reply

            mn–
            AskWoody Lounger

            For a single disk what advantages are there for a LVM setup?

            Well the big one is snapshot capability for filesystem types that don’t have it natively. Not as efficient as Btrfs or Zfs native snapshots, but you can get it. (Need to have some free space within the PV to put your snapshot LVs in. How much, will depend on specifics.)

            You also get a lot more flexibility in space allocation than with direct partitions, including thin-provisioned logical volumes that can grow and shrink dynamically based on how much data there is. Oh and online resize between logical volumes even when you don’t have online resize for partitions. (Only some filesystem types can be resized while mounted, though.)

            Yes, you can put the PV within an encrypted container so your snapshots and whatever stay encrypted too.

            And then some more if your “single disk” is a hardware RAID array or something like that.

            (Also the case of moving parts of the system temporarily somewhere else when you need to rearrange things to free up space or redo the partition table or whatever… but that’s not exactly a single-disk system at that time… and neither is the “large HDD + small cache SSD” setup.)

            1 user thanked author for this post.
            • #2016598 Reply

              wavy
              AskWoody Plus

              Thanks mn-

              WAY beyond my perceived needs !!

              🍻

              Just because you don't know where you are going doesn't mean any road will get you there.
            • #2016631 Reply

              mn–
              AskWoody Lounger

              Yeah, then again it’s not exactly hard to find cases where someone would like to do something and gets told “you could do this if you’d used LVM back when you did the initial install”. The need is often only perceived much later.

              BTDT… well in my case it went “if LVM had been available on Linux too, instead of just HP-UX and AIX, back when…”

              And Gparted still not having proper support for LVM doesn’t help things.

              1 user thanked author for this post.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: /root full can't resize

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.