LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2018, 10:39 AM   #1
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Rep: Reputation: Disabled
Root drive is out of space, how to allot more room?


I am running Fedora, and have recently run out of space on my root drive. I can't even seem to remove packages because of this.

When my system was initially setup, I believe it was done in such a way that I can allot more space to the root drive when needed, but I'm not sure how to do this. Can someone please help?
 
Old 10-15-2018, 10:45 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Hi and welcome,

You can usually boot using a live media like a CD/DVD/USB and then adjust the partition sizes, or remove files to free up space.

One way to handle this is to copy off data and then remove it from there using a live boot situation, and then boot into your system and remove packages once you've freed up enough space to be able to take those actions when the system is running.

Is some portion of this just data that you can copy off to somewhere else?

You absolutely can adjust the size of the partition(s) using a live boot and then a tool like gparted. But every case and everyone's preferences are different. Plus it also depends if you have any free disk space to use to map into your root partition.
 
Old 10-15-2018, 12:30 PM   #3
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Is some portion of this just data that you can copy off to somewhere else?
I'm not really sure. How exactly can I view the contents of the root drive? My hunch is that I have only used it for installing packages, but like I mentioned, I can't seem to remove any packages without some sort of crash occurring.
 
Old 10-15-2018, 01:38 PM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,503

Rep: Reputation: Disabled
It may help to know what distro, & the sizes of your partitions.

##########
You can gain 5% of space back by using tune2fs -m 0, but it may not work on a full partition, I use it to have all available space for my /home directory/partition, & give just 1% to the / partition, just in case I need room to play.
##########
 
1 members found this post helpful.
Old 10-15-2018, 02:13 PM   #5
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
By default Fedora wants to do LVM, so it is possible it's set up to be able to expand if needed.

Post the output of the following commands:

Code:
lsblk -o +FSTYPE
fdisk -l
This will at least tell us how your partitions are set up.
 
1 members found this post helpful.
Old 10-15-2018, 06:28 PM   #6
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Original Poster
Rep: Reputation: Disabled
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT FSTYPE
sda 8:0 0 477G 0 disk
├─sda4 8:4 0 1M 0 part
├─sda2 8:2 0 128M 0 part
├─sda7 8:7 0 500M 0 part /boot ext4
├─sda5 8:5 0 500M 0 part ext4
├─sda3 8:3 0 250.3G 0 part ntfs
├─sda1 8:1 0 100M 0 part /boot/efi vfat
├─sda8 8:8 0 212.8G 0 part LVM2_member
│ ├─fedora-swap 253:1 0 7.8G 0 lvm [SWAP] swap
│ ├─fedora-home 253:2 0 155G 0 lvm /home ext4
│ └─fedora-root 253:0 0 50G 0 lvm / ext4
└─sda6 8:6 0 12.6G 0 part ntfs




Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
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: 9BD5D967-249F-424B-B691-F5CC71F615D3

Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 468991 262144 128M Microsoft reserved
/dev/sda3 468992 525381631 524912640 250.3G Microsoft basic data
/dev/sda4 525381632 525383679 2048 1M BIOS boot
/dev/sda5 525383680 526407679 1024000 500M Linux filesystem
/dev/sda6 973740032 1000214527 26474496 12.6G Microsoft basic data
/dev/sda7 526407680 527431679 1024000 500M Linux filesystem
/dev/sda8 527431680 973740031 446308352 212.8G Linux LVM

Partition table entries are not in disk order.


Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-swap: 7.8 GiB, 8388608000 bytes, 16384000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-home: 155 GiB, 166425788416 bytes, 325050368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
Old 10-15-2018, 06:51 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
As suggested above, LVM gives you the flexibility to move space around, but there are caveats - lets see " df -hT" as well before we start. You might also want to browse the lvresize manpage for background info.
 
Old 10-15-2018, 07:09 PM   #8
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Original Poster
Rep: Reputation: Disabled
> df -hT

Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 4.0K 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 42M 7.8G 1% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/fedora-root ext4 50G 50G 0 100% /
tmpfs tmpfs 7.8G 1.7M 7.8G 1% /tmp
/dev/sda7 ext4 477M 154M 294M 35% /boot
/dev/mapper/fedora-home ext4 153G 119G 27G 82% /home
/dev/sda1 vfat 96M 31M 66M 32% /boot/efi
tmpfs tmpfs 1.6G 16K 1.6G 1% /run/user/42
tmpfs tmpfs 1.6G 64K 1.6G 1% /run/user/1000
 
Old 10-15-2018, 07:10 PM   #9
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Original Poster
Rep: Reputation: Disabled
> df -hT

Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 4.0K 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 42M 7.8G 1% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/fedora-root ext4 50G 50G 0 100% /
tmpfs tmpfs 7.8G 1.7M 7.8G 1% /tmp
/dev/sda7 ext4 477M 154M 294M 35% /boot
/dev/mapper/fedora-home ext4 153G 119G 27G 82% /home
/dev/sda1 vfat 96M 31M 66M 32% /boot/efi
tmpfs tmpfs 1.6G 16K 1.6G 1% /run/user/42
tmpfs tmpfs 1.6G 64K 1.6G 1% /run/user/1000
 
Old 10-15-2018, 07:17 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
Code:
Filesystem              Type      Size  Used Avail Use% Mounted on
devtmpfs                devtmpfs  7.8G     0  7.8G   0% /dev
tmpfs                   tmpfs     7.8G  4.0K  7.8G   1% /dev/shm
tmpfs                   tmpfs     7.8G   42M  7.8G   1% /run
tmpfs                   tmpfs     7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/mapper/fedora-root ext4       50G   50G     0 100% /
tmpfs                   tmpfs     7.8G  1.7M  7.8G   1% /tmp
/dev/sda7               ext4      477M  154M  294M  35% /boot
/dev/mapper/fedora-home ext4      153G  119G   27G  82% /home
/dev/sda1               vfat       96M   31M   66M  32% /boot/efi
tmpfs                   tmpfs     1.6G   16K  1.6G   1% /run/user/42
tmpfs                   tmpfs     1.6G   64K  1.6G   1% /run/user/1000
See how much easier you can make it for everybody if you use [code] tags ?.
 
Old 10-15-2018, 07:45 PM   #11
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,733

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
My guess: Log files are not being rotated. Let's see
Code:
ls -l /var/log
 
1 members found this post helpful.
Old 10-15-2018, 07:56 PM   #12
Erdward
LQ Newbie
 
Registered: Oct 2018
Posts: 23

Original Poster
Rep: Reputation: Disabled
Code:
> ls -l /var/log
total 14608
drwxrwxr-x. 2 root   root               4096 Apr 15  2016 anaconda
drwx------. 2 root   root               4096 Aug 13 08:25 audit
-rw-r--r--. 1 root   root              14126 Oct 13 10:11 boot.log
-rw-------. 1 root   utmp               1536 Oct  9 13:35 btmp
-rw-------. 1 root   utmp                  0 Sep  4 10:24 btmp-20181001
drwxr-xr-x. 2 chrony chrony             4096 Nov 21  2016 chrony
drwxr-xr-x. 2 root   root               4096 Nov  7  2016 cluster
drwxr-xr-x. 2 lp     sys                4096 Jan 11  2017 cups
-rw-------. 1 root   root              53248 Oct 13 10:08 dnf.librepo.log
-rw-------. 1 root   root            1964637 Sep 17 09:15 dnf.librepo.log-20180917
-rw-------. 1 root   root            2830979 Sep 24 20:15 dnf.librepo.log-20180924
-rw-------. 1 root   root            1155486 Oct  2 09:31 dnf.librepo.log-20181002
-rw-------. 1 root   root            1327104 Oct  5 17:04 dnf.librepo.log-20181007
-rw-------. 1 root   root               4096 Oct 13 10:08 dnf.log
-rw-------. 1 root   root              74468 Sep 17 09:15 dnf.log-20180917
-rw-------. 1 root   root             110941 Sep 24 20:15 dnf.log-20180924
-rw-------. 1 root   root              39044 Oct  2 09:31 dnf.log-20181002
-rw-------. 1 root   root              49152 Oct  5 17:04 dnf.log-20181007
-rw-------. 1 root   root                686 Oct 13 10:08 dnf.rpm.log
-rw-------. 1 root   root               1715 Sep 17 09:15 dnf.rpm.log-20180917
-rw-------. 1 root   root               2555 Sep 24 20:15 dnf.rpm.log-20180924
-rw-------. 1 root   root                980 Oct  2 09:30 dnf.rpm.log-20181002
-rw-------. 1 root   root               1372 Oct  5 17:04 dnf.rpm.log-20181007
-rw-r--r--. 1 root   root              56776 Oct 13 10:11 firewalld
drwx--x--x. 2 root   gdm                4096 Mar  6  2017 gdm
drwxr-xr-x. 2 root   root               4096 Mar 10  2017 glusterfs
-rw-------. 1 root   root               5260 Mar 30  2017 grubby
-rw-------. 1 root   root                528 Oct 13 08:06 hawkey.log
-rw-------. 1 root   root              77623 Sep 17 09:15 hawkey.log-20180917
-rw-------. 1 root   root              95226 Sep 24 20:15 hawkey.log-20180924
-rw-------. 1 root   root              40138 Oct  2 09:31 hawkey.log-20181002
-rw-------. 1 root   root              49752 Oct  5 16:04 hawkey.log-20181007
drwx------. 2 root   root               4096 Dec 22  2016 httpd
drwxr-sr-x+ 3 root   systemd-journal    4096 Oct  1  2016 journal
-rw-r--r--. 1 root   root             292292 Oct 13 10:12 lastlog
drwx------. 3 root   root               4096 Nov 14  2016 libvirt
drwx------. 2 root   root               4096 Feb  4  2016 ppp
-rw-r--r--. 1 root   root               1040 Feb 22  2017 README
drwx------. 3 root   root               4096 Mar  9  2017 samba
drwx------. 2 root   root               4096 Dec  7  2016 speech-dispatcher
drwxr-x---. 2 root   root               4096 Mar 16  2017 sssd
-rw-------. 1 root   root                  0 Apr  8  2016 tallylog
-rw-------. 1 root   root               4397 Mar 30  2017 wpa_supplicant.log
-rw-------. 1 root   root            1595152 Sep 17  2016 wpa_supplicant.log-20160907
-rw-------. 1 root   root              32136 Oct  4  2016 wpa_supplicant.log-20161004
-rw-------. 1 root   root            1667082 Dec 10  2016 wpa_supplicant.log-20161022
-rw-------. 1 root   root            2944923 Mar 29  2017 wpa_supplicant.log-20161227
-rw-rw-r--. 1 root   utmp             251520 Oct 13 10:12 wtmp
-rw-------. 1 root   root                  0 Jan  1  2018 yum.log
-rw-------. 1 root   root               7845 Jun 22  2017 yum.log-20180101
 
Old 10-15-2018, 09:29 PM   #13
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
A 50G root filesystem should be more than enough with a separate /home. Those log file don't seem to be using much -- 14MB is barely a blip on a 50G filesystem. Let's see the output from "du -h -x --max-depth=1 /". Don't leave out the "-x" option. You don't want du to descend into pseudo-filesystems like /proc and /sys.
 
1 members found this post helpful.
Old 10-15-2018, 09:33 PM   #14
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,733

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
...beat me to it. Just wanted to say my guess was wrong. Definitely need to see the du as rknichols recommended.
 
Old 10-16-2018, 02:57 AM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
My Fedora has 20G for root - recently upped from 15G. This system has been in continuous use since late May 2015 according to journalctl, so something is definitely amiss. I occasionally have to clean out PackageKit, but only in the region of 4-5 Gig. I use a slight variation of the above - "sudo du / -xh | sort -hr | head".

As for the initial request, there isn't a lot of spare even in /home, but if push comes to shove you can reduce the size of that by say 10G (using lvresize with -r; very important that), then do likewise to add the space to the root. We needed to be sure you weren't using XFS on /home - ext4 is good.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allot free space from one partition to other omniok Linux - Newbie 9 02-12-2015 07:20 AM
External usb drive taking space on root fs? eMcJagger Linux - Hardware 1 06-20-2006 04:51 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
Allot space to a new user ArulPrabhuT Programming 3 08-14-2004 08:52 AM
Root out of space, and hard drive has none too :/ WH16 Linux - Newbie 14 01-20-2004 06:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration