LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   System shows "Low Disk Space" but "df -h" indicates it has space (https://www.linuxquestions.org/questions/linux-newbie-8/system-shows-low-disk-space-but-df-h-indicates-it-has-space-4175663212/)

skyworld_chen 10-26-2019 07:40 AM

System shows "Low Disk Space" but "df -h" indicates it has space
 
Hi,
when I start my CentOS 7 through VMware workstation, I got message on "Low Disk Space". But when I run "df -h", I got these responds:
Code:

user02@localhost ~]$ df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/sda3                    114G  114G  200K 100% /
devtmpfs                      5.9G    0  5.9G  0% /dev
tmpfs                        5.9G    0  5.9G  0% /dev/shm
tmpfs                        5.9G  13M  5.9G  1% /run
tmpfs                        5.9G    0  5.9G  0% /sys/fs/cgroup
/dev/sda1                    297M  271M  26M  92% /boot
/dev/mapper/vg_eda-home      100G  3.2G  97G  4% /home
/dev/mapper/vg_eda-tools_eda  147G  82G  66G  56% /tools_eda
.host:/                      531G  429G  102G  81% /mnt/hgfs
tmpfs                        1.2G  24K  1.2G  1% /run/user/1002

I'm quite confused because the /tools_eda and /home can provide more than 100G space. The /tools_eda and /home is the space I added through lvm, as figure below shows:
Code:

vgdisplay -v
  --- Volume group ---
  VG Name              vg_eda
  System ID           
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  11
  VG Access            read/write
  VG Status            resizable
  MAX LV                0
  Cur LV                2
  Open LV              2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size              479.99 GiB
  PE Size              4.00 MiB
  Total PE              122878
  Alloc PE / Size      122878 / 479.99 GiB
  Free  PE / Size      0 / 0 
  VG UUID              iKdogw-Am6E-Ip1z-6J5q-F7sD-Urcl-bVc3LR
 
  --- Logical volume ---
  LV Path                /dev/vg_eda/home
  LV Name                home
  VG Name                vg_eda
  LV UUID                FRwAjR-SVjT-a3Yn-0S4s-HVBa-CokG-1j0XMB
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-09-22 22:50:23 +0800
  LV Status              available
  # open                1
  LV Size                100.00 GiB
  Current LE            25600
  Segments              1
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    8192
  Block device          253:0
 
  --- Logical volume ---
  LV Path                /dev/vg_eda/tools_eda
  LV Name                tools_eda
  VG Name                vg_eda
  LV UUID                7PQokA-Mv8D-07cf-elvo-0hvu-d0tG-YQKfVN
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-09-24 14:19:35 +0800
  LV Status              available
  # open                1
  LV Size                379.99 GiB
  Current LE            97278
  Segments              2
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    8192
  Block device          253:1
 
  --- Physical volumes ---
  PV Name              /dev/sdb1   
  PV UUID              u8SDhd-ThMT-X3X7-Xix0-I0G6-bJna-toz88m
  PV Status            allocatable
  Total PE / Free PE    63999 / 0
 
  PV Name              /dev/sda4   
  PV UUID              zp8KVw-sHKq-jnY4-dvAZ-ztxI-lsxb-hQxSX2
  PV Status            allocatable
  Total PE / Free PE    58879 / 0

Code:

lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_eda/home
  LV Name                home
  VG Name                vg_eda
  LV UUID                FRwAjR-SVjT-a3Yn-0S4s-HVBa-CokG-1j0XMB
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-09-22 22:50:23 +0800
  LV Status              available
  # open                1
  LV Size                100.00 GiB
  Current LE            25600
  Segments              1
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    8192
  Block device          253:0
 
  --- Logical volume ---
  LV Path                /dev/vg_eda/tools_eda
  LV Name                tools_eda
  VG Name                vg_eda
  LV UUID                7PQokA-Mv8D-07cf-elvo-0hvu-d0tG-YQKfVN
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-09-24 14:19:35 +0800
  LV Status              available
  # open                1
  LV Size                379.99 GiB
  Current LE            97278
  Segments              2
  Allocation            inherit
  Read ahead sectors    auto
  - currently set to    8192
  Block device          253:1

Is there anything I did wrong?

scasey 10-26-2019 09:33 AM

Quote:

Originally Posted by skyworld_chen (Post 6050831)
Hi,
when I start my CentOS 7 through VMware workstation, I got message on "Low Disk Space". But when I run "df -h", I got these responds:
Code:

user02@localhost ~]$ df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/sda3                    114G  114G  200K 100% /
.snip.


The root space is full. In my experience, that’s most often caused by an unmanaged log file in /var/log

teckk 10-26-2019 09:34 AM

/(root) is full
Code:

/dev/sda3                    114G  114G  200K 100% /
/boot has 26M free
Code:

/dev/sda1                    297M  271M  26M  92% /boot
$HOME has 97 GB free
Code:

/dev/mapper/vg_eda-home      100G  3.2G  97G  4% /home

skyworld_chen 10-26-2019 09:48 AM

thanks for kind reply. What confused me is that even though /root is full, there is still spare space for the disk, as /home and /tools_eda shows (I was told lvm could be used for such case), why system reports disk full? what is the relationship between /root and other directories?

scasey 10-26-2019 09:55 AM

Quote:

Originally Posted by skyworld_chen (Post 6050871)
thanks for kind reply. What confused me is that even though /root is full, there is still spare space for the disk, as /home and /tools_eda shows (I was told lvm could be used for such case), why system reports disk full? what is the relationship between /root and other directories?

root is where everything except /boot, /home and /tool-era live. So /bin, /user, /etc, /var, etc. Basically that’s where the OS is.

Lysander666 10-26-2019 10:02 AM

Your / partition is extremely important and, as scasey says, is where your OS is. If it is full, you're going to run into a whole host of problems, including not being able to log into your desktop when you reboot. Yes, your entire disk is not full, but /, your most important partition is, and unless you clear some stuff, your whole disk may as well be full since you won't be able to use your OS properly.

Your / partition is currently 114GB full, which is crazy. It shouldn't even really be a quarter that full. You're going to have to do some research into some serious cleaning.

scasey 10-26-2019 10:21 AM

For comparison. root partitions on my headless server:
Code:

/dev/mapper/centos-root  50G  8.4G  42G  17% /
And on this desktop:
Code:

/dev/sda3        50G  8.5G  39G  19% /
Both are CentOS 7 installs on 500GB drives.

michaelk 10-26-2019 10:24 AM

In addition,
Code:

Filesystem                    Size  Used Avail Use% Mounted on
/dev/sda3                    114G  114G  200K 100% /
/dev/sda1                    297M  271M  26M  92% /boot
/dev/mapper/vg_eda-home      100G  3.2G  97G  4% /home
/dev/mapper/vg_eda-tools_eda  147G  82G  66G  56% /tools_eda

In a nutshell filesystems are separate spaces from each other. LVM makes it easier to enlarge a filesystem and merge more then one partition or disk into a single volume group/logical volume. However, /(root) is not part of a LVM and just adding a volume group does not add space to the root partition. If /(root) contains data that can be easily moved to /tools_eda that would free up space.

Without knowing how the virtual drive sda is partitioned or what type of filesystems they use I will assume they are xfs by default. You can not shrink xfs filesystems and therefore you can not easily move space from /home to /.

Lysander666 10-26-2019 10:26 AM

Quote:

Originally Posted by scasey (Post 6050882)
For comparison. root partitions on my headless server...

And for further comparison for the OP, root sizes from my desktop:

Code:

/dev/sdc1        30G  27G  959M  97% /
And my main laptop:

Code:

/dev/root        30G  28G  760M  98% /
Both running Slackware.

Soon I'm going to have to do a little cleaning myself.

skyworld_chen 10-26-2019 07:52 PM

thanks for all of your kind reply. I guess what you mean is that "/" is similar to windows system "C:" while other directories, like /eda_tools or /home, etc is similar to other disk "D:" or "E:", ..., right? The "C:" is full while other disk still have space.

scasey 10-26-2019 09:07 PM

Quote:

Originally Posted by skyworld_chen (Post 6051000)
thanks for all of your kind reply. I guess what you mean is that "/" is similar to windows system "C:" while other directories, like /eda_tools or /home, etc is similar to other disk "D:" or "E:", ..., right? The "C:" is full while other disk still have space.

Sortof...but use "partition" rather than "disk" A disk can contain more than one partition. Yours has several. But I think you're getting the concept, and I'm just nit-picking the words you're using.

Yes, if a partition is full, then you'll get warnings/errors. If the root partition is full, your computer may not be able to start.

skyworld_chen 10-27-2019 04:31 AM

got it. Thanks very much

JeremyBoden 11-20-2019 10:36 AM

I don't think you've quite got it.

In Windows the C: drive is often allocated as 95% - or bigger.

Linux usually divides the disk into several partitions which cannot easily be resized on the fly.

So for example you can fill / whilst /home has loads of free space - if / and /home correspond to different partitions.
There are good reasons for this slight added complexity - your system programs and your data are kept separate, which makes data backups much easier.


All times are GMT -5. The time now is 01:33 AM.