You are not logged in.

#1 2022-10-09 04:37:11

7skysky
Member
Registered: 2022-09-27
Posts: 9

Increase Size of Root Partition (Arch Linux)

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sdb      8:16   0 931.5G  0 disk 
├─sdb1   8:17   0   511M  0 part /boot
├─sdb2   8:18   0  19.5G  0 part /
└─sdb3   8:19   0 911.5G  0 part /home
zram0  254:0    0     4G  0 disk [SWAP]
Filesystem      Size  Used Avail Use% Mounted on
dev             7.7G     0  7.7G   0% /dev
run             7.8G  1.9M  7.8G   1% /run
/dev/sdb2        20G   17G  1.9G  90% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           7.8G  4.0K  7.8G   1% /tmp
/dev/sdb1       510M  108M  403M  22% /boot
/dev/sdb3       897G   64G  788G   8% /home
tmpfs           1.6G  236K  1.6G   1% /run/user/1000

My root partition is rapidly running out of space.

Is anyone aware of a step-by-step tutorial (for newbies) on how to increase the size of the root partition?

Offline

#2 2022-10-09 05:04:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Increase Size of Root Partition (Arch Linux)

First, determine what is taking up the space. ncdu is a helpful tool for diagnosing this issue.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2022-10-09 09:44:31

7skysky
Member
Registered: 2022-09-27
Posts: 9

Re: Increase Size of Root Partition (Arch Linux)

jasonwryan wrote:

First, determine what is taking up the space. ncdu is a helpful tool for diagnosing this issue.

Thank you for this suggestion.

First, I cleared the pacman cache with:

pacman -Scc

...which brought down the root partition to 70% usage.

I then installed and ran ncdu as root. It was apparent that the Wine application was taking up the most space. I deleted Wine, which brought down the root partition to 63% usage.

I would still like to increase the size of the root partition. Any further suggestions?

Offline

#4 2022-10-09 10:26:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,167

Re: Increase Size of Root Partition (Arch Linux)

changing partition size is a low level operation  that can lead to severe data loss.

first step :
backup your files*

Rsync is often used for that, personally I like its full system backup method *  .
For more general  info check https://wiki.archlinux.org/title/Synchr … p_programs

* Note that for all backups you need a device with enough free space to hold everything.
My desktop has 750 GB drivespace, while my laptop has 1 TB so a 2 TB external usb drive can hold no more then 1 full uncompressed backup of both.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2022-10-09 15:50:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,659

Re: Increase Size of Root Partition (Arch Linux)

Lone_Wolf wrote:

first step :
backup your files*

Second step:  Verify your backups.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#6 2022-10-09 17:37:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,481

Re: Increase Size of Root Partition (Arch Linux)

Finally you'll have to do this offline, ie. from a live system (booted from a USB key) and preferably using eg. gparted.

On a lower level, the /home partition needs to be shrunk and moved, https://wiki.archlinux.org/title/Fdisk# … partitions which is what makes the process not only prone to data loss but also very slow.

Offline

#7 2022-10-10 01:49:23

krutoileshii
Member
Registered: 2019-01-15
Posts: 45

Re: Increase Size of Root Partition (Arch Linux)

I have done this exact thing twice. Once to increase the size of root partition and second time to move the whole thing to a separate nvme drive. 

Like everyone else above mentioned, make sure you have backups and you verified them.
I was only changing my home and my root partitions with the rest unchanged. so i only backed up those two and left my home, files, alone as they were already on a different nvme drive. For backups, I just made a partition copy with dd. Also, backed up the partition table just in case.
Didn't run into any issues with using rsync.

Offline

Board footer

Powered by FluxBB