• Make root partition larger - Topic split

    Original topic location

    @manuel To evaluate that, could you show the output of these commands:

    lsblk -fm
    sudo fdisk -l

    $ lsblk -fm
    NAME   FSTYPE LABEL        UUID                                 FSAVAIL FSUSE% MOUNTPOINT                    SIZE OWNER GROUP MODE
    sda                                                                                                        465.8G             brw-rw----
    ├─sda1 vfat   boot         DCC2-0431                             251.7M     0% /boot/efi                     256M             brw-rw----
    ├─sda2 ext4   root         73ef6045-faa6-4539-a7f1-71a12b7c5ae8   14.4G    49% /                            29.3G             brw-rw----
    ├─sda3 ext4   AntergosHome 480002a3-14c3-4b7c-b11f-eb6644b48998  208.5G    46% /home                       430.4G             brw-rw----
    └─sda4 swap   AntergosSwap df459671-0e19-475f-bdb3-3762d3b717b1                [SWAP]                        5.9G             brw-rw----
    sdb                                                                                                          1.8T             brw-rw----
    └─sdb1 ext4   Apocalypse   095f446a-1a2a-41f6-947e-06ffbd34ed3a    1.4T    15% /run/media/major/Apocalypse   1.8T             brw-rw----
    $ sudo fdisk -l
    Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
    Disk model: Hitachi HDP72505
    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: gpt
    Disk identifier: 2ABA87A6-1332-454E-8444-F16A96599E19
    Device         Start       End   Sectors   Size Type
    /dev/sda1       2048    526335    524288   256M EFI System
    /dev/sda2     526336  61966335  61440000  29.3G Linux filesystem
    /dev/sda3   61966336 964538367 902572032 430.4G Linux home
    /dev/sda4  964538368 976773134  12234767   5.9G Linux swap
    Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Disk model: WDC WD20EARS-00M
    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: 0xd6b0675b
    Device     Boot Start        End    Sectors  Size Id Type
    /dev/sdb1        2048 3907028991 3907026944  1.8T 83 Linux
  • @Firespray
    There are some alternative ways, but they depend on what you want to achieve.

    One alternative is: use the 2TB disk as a temporary storage for /home (and / if needed), then reinstall Antergos, maybe don’t create a separate /home partition?

  • I may do some experimenting at some point,
    but that does give me a place to start thankyou

  • As @manuel said it does depend on what you want to do.

    I checked my setup, I have installations of Antergos, Ubuntu and OpenSuse Leap, all on a single hard disk.
    When possible I opted to make the root partitions 50Gb, but most are 35Gb.
    The /home partition is a separate btrfs partition.

    One possible set of steps is

    • boot a live usb linux distro, maybe Antergos, it would depend if gparted or qtparted were available
    • backup the /home partition on to some location on sdb1
    • resize the /home partition (/sda3) using gparted or qtparted (down by however much you want to expand the root partition (/sda2) by/
    • then move the /home partition (/sda3) down, again using gparted or qtparted ( would take a long time I think)
    • then resize the root partition (/sda2) to fill the empty space following it.

    Did a bit of googling and found https://www.howtoforge.com/partitioning_with_gparted which describes how to shrink a partition
    He used gparted-live see https://gparted.org/livecd.php

    Finally I would suggest that you attempt this only if you feel comfortable and confident doing this correctly.
    Backing up the home directory and moving the partition will both take some time.
    Good luck!

    EDIT: For backup rsync should work, I would probably use sudo rsync blah blah

  • @BlaiseD

    Good finds and good outline on a path to take.
    Something I might consider as well, and might work for others too.

    It’s nice to know options that are available in this situation but a backup drive is needed to save information so I’m thinking quickest way for me I may have
    an extra hard drive, do fresh install on new drive and fix the partition sizes to higher levels I want. Copy old /home to new /home, keep old drive as backup.

    I’ll just have to remember to make the config adjustment from the other thread so root doesn’t get filled with log files again.

  • @Firespray
    Just trying to think what are the easy commands for the partitioning you showed first.
    Note that I didn’t test any of this, so be careful!

    First, update system (optional, not exactly required but useful still):

    pacman -Syyu
    reboot             # and now boot with the USB installer stick!

    then at the live session:

    cd /run/media/major/Apocalypse  # make sure this exists and points to the 2TB disk!
    mkdir BACKUP                    # may choose a better name for the backup folder
    cd BACKUP
    cp -a /. ./                     # this takes a long time, maybe a few hours!

    You may want to use option -v (like cp -av) to see all file names while copying (lots of output!).

    Now you have an exact backup of your system on the 2TB disk. Be sure there were no copying errors.

    And now you may change your sda as you wish, probably reinstall Antergos to it.
    To maximize the available space and minimize the limitations of space allocation, I recommend making only 2 partitions:

    /boot/efi  # like you have now
    /          # all remaining space here

    So no /home, and no swap partition. You may later create a swap file (https://wiki.archlinux.org/index.php/Swap#Swap_file), if needed.

    Now you have a working new Antergos installation. So boot to this new installed Antergos and make sure /run/media/major/Apocalypse is available.

    You have some alternatives again.

    1. You may leave all data to the 2TB disk and use it from there (if that makes any sense in your use case).
    2. Or you may copy the data from Apocalypse to your folders under the new /home folder. This again takes lots of time.

    Alternative 1 details:

    • Create “pointers”, i.e. symbolic links, to the directories at BACKUP/home/<user>/*, for example
    cd  # goes to the new $HOME
    rmdir Documents && ln -s /run/media/major/Apocalypse/BACKUP$HOME/Documents
    • Note: there is nothing between BACKUP and $HOME above, it is not a typo.

    Alternative 2 details:

    • Copy (with cp -a) selectively the folders you want to the new /home/user folder(s). If you want the old configs (like $HOME/.config and $HOME/.local), that may cause some adjusting, since the new Antergos install may have slightly different defaults.
    rmdir Documents && cp -a /run/media/major/Apocalypse/BACKUP$HOME/Documents ./
    • With this alternative you’ll have a backup of all your data. That may (or may not) be useful in case there’s a data failure later.

    OK, quite a long post, but maybe gives you some ideas and reassures that it can be done.

  • That is VERY useful & very clear!

    I’m sure there are base files for setups of installed programs for whatever desktop is used, but
    What is in /root & why is it 15GB?

    or are the linux programs and desktop full installs go to /root, just config files in /home?

    I understand why my /home is so big, mostly due to .wine installed programs.

    I understand log files and backups getting out of hand why it pegged out my 30GB of space, but I’m curious because linux is so small itself, and in the grand scheme of things, I haven’t really installed much more than a default KDE desktop, so is KDE that big? I did some searching and can’t really find the answer to that.
    I’m very fond of KDE and what it can do, so before I say much else I’m wondering about that.

  • @Firespray
    The root partition fills up easily (in time) mainly because of the package cache. You can remove the cache with e.g. sudo pacman -Scc. And that should not harm anything in the system.

    Many system configurations are in /etc or /usr/share, but there may be other places depending on the apps.

    Each user’s configurations are usually under $HOME/.config or $HOME/.local. Again, there may be other files and folders under $HOME depending on the apps (check with ls -la).

    To find the size of a folder and subfolders, you could give e.g. this command:

    du -hd 1 <foldername>
    # Examples:
    du -hd 1 $HOME
    sudo du -hd 1 /

    This way you can find out what takes so much space.

  • I often use Filelight https://www.kde.org/applications/utilities/filelight/ or k4dirstat or qdirstat to figure out where the space is.
    filelight and k4dirstat are kde apps so installing will pull in more stuff than you want.
    qdirstat should “only” pull in qt.
    All are available on antergos.

partition41 root27 topic7 larger1 Posts 9Views 155
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.