debian jessie - need more space in home partition

Discussion in 'all things UNIX' started by Palancar, Dec 10, 2017.

  1. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,402
    I could really use your help here. I have a system that I created over a year ago and frankly I screwed up when I built the disk parameters. Its a LVM on LUKS setup with custom /boot on usb. Runs like a top!

    Back then I had the bright idea to set root and home the same size - not good. My system hardly uses root space and now home is getting pretty darn full while root sits with 50 Gig wide open. I am looking for a way to get 45 Gig more into HOME.

    Looking at what I options I have other than a complete virgin rebuild. Lots of custom tweaking so a rebuild would be a whole day at least to get to where I am now. I see from reading that LUKS and LVM are a bit tricky.

    One thing to mention is that I have 50 Gig I can free up just past the LUKS container on the drive platter. Maybe it might be easier to expand the LUKS container by 50 Gig and assign that to home. Doable, or a pipe dream here?

    I have great sector by sector backup images and I am not afraid to try most anything I can visualize beforehand.

    Assuming I wanted to tackle this; would it be easier to resize the space from root to home, OR just extend the LUKS container and assign that space to home? At this point I don't care about the 50 Gig sitting in root (lesson learned) but I need another 45 Gig for HOME. Virtual Machines use lots of space, LOL!
     
  2. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    9,252
    The simplest solution might be to just create a second LUKS volume in the available 50 GB, and configure that to mount at boot. You'd need to enter two passphrases, but hey. When creating new VMs, you'd need to edit the VDI location to your new space.
     
  3. fblais

    fblais Registered Member

    Joined:
    Jul 31, 2008
    Posts:
    1,340
    Location:
    Québec, Canada
    What about shrinking root to leave space to expand home?
     
  4. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    9,252
    Yes, he could boot from a LiveCD, decrypt the LUKS volume in terminal, and then use gparted to shrink /root and expand /home.

    https://medium.com/@tbeach/resize-a...thout-breaking-your-linux-system-6ef475619745
    https://askubuntu.com/questions/269...ion-and-allocate-free-space-to-home-partition

    And before that, he could also expand the LUKS volume to fill the disk

    https://unix.stackexchange.com/questions/320957/extend-a-luks-encrypted-partition-to-fill-disk

    That's a far more elegant solution. But it's riskier.
     
  5. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,402
    That is exactly what I would love to do. I have been doing alot of reading on this subject. LVM on LUKS is going to be on the edge for my abilities first time out of the box.

    It comes down to booting Live Disk, opening LUKS and then doing a resize. BUT its way more complicated when LVM's are in play. I expect to BRICK this partition but I don't care. Backups are good to go. I am already reading ahead for the possibility that I find this is more time than I want to spend here ---- > brick ----> restore ----- > brick------ > restore, etc.... I may rebuild from scratch instead, and if I do the question then becomes a re-do with Jessie or going to Stretch?

    At least I have some backup computers running too. If I take this offline for a few days I'll still be around.

    I appreciate the links above!
     
  6. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    9,252
    Hey, good luck :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.